diff --git a/.github/AL-Go-Settings.json b/.github/AL-Go-Settings.json index 696c499f5e..2bf3cdc72a 100644 --- a/.github/AL-Go-Settings.json +++ b/.github/AL-Go-Settings.json @@ -6,7 +6,7 @@ "runs-on": "windows-latest", "cacheImageName": "", "UsePsSession": false, - "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/29.0.46774.0/base", + "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/29.0.46924.0/base", "country": "base", "useProjectDependencies": true, "repoVersion": "29.0", diff --git a/Apps/APAC/EDocumentFormats/PINT A-NZ/app/app.json b/Apps/APAC/EDocumentFormats/PINT A-NZ/app/app.json index 96bf77e756..4cf710c341 100644 --- a/Apps/APAC/EDocumentFormats/PINT A-NZ/app/app.json +++ b/Apps/APAC/EDocumentFormats/PINT A-NZ/app/app.json @@ -23,7 +23,7 @@ "TranslationFile" ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 28005, diff --git a/Apps/APAC/EDocumentFormats/PINT A-NZ/test/app.json b/Apps/APAC/EDocumentFormats/PINT A-NZ/test/app.json index 0f2601631b..f6e60588a2 100644 --- a/Apps/APAC/EDocumentFormats/PINT A-NZ/test/app.json +++ b/Apps/APAC/EDocumentFormats/PINT A-NZ/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/app.json b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/app.json index a9b6574c56..9420850fde 100644 --- a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/app.json +++ b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/AT/EDocument_AT/demo data/app.json b/Apps/AT/EDocument_AT/demo data/app.json index 31447344c0..babe9e6928 100644 --- a/Apps/AT/EDocument_AT/demo data/app.json +++ b/Apps/AT/EDocument_AT/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/AT/HybridBCLast_AT/app/app.json b/Apps/AT/HybridBCLast_AT/app/app.json index f24eb6e6b0..4d720959be 100644 --- a/Apps/AT/HybridBCLast_AT/app/app.json +++ b/Apps/AT/HybridBCLast_AT/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/AT/IntrastatAT/app/app.json b/Apps/AT/IntrastatAT/app/app.json index 19de013686..349e5c5a23 100644 --- a/Apps/AT/IntrastatAT/app/app.json +++ b/Apps/AT/IntrastatAT/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 11150, diff --git a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/app.json b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/app.json index 256dd8c4b8..bd4ffd4935 100644 --- a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/app.json +++ b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/AU/EDocument_AU/demo data/app.json b/Apps/AU/EDocument_AU/demo data/app.json index a3e8c0ee85..0150c9a8b2 100644 --- a/Apps/AU/EDocument_AU/demo data/app.json +++ b/Apps/AU/EDocument_AU/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/AU/HybridBCLast_AU/app/app.json b/Apps/AU/HybridBCLast_AU/app/app.json index 47ecfd94b3..29cca07489 100644 --- a/Apps/AU/HybridBCLast_AU/app/app.json +++ b/Apps/AU/HybridBCLast_AU/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/AU/Onprem Permissions AU/app/app.json b/Apps/AU/Onprem Permissions AU/app/app.json index 53dcd1bcae..f3f683bac0 100644 --- a/Apps/AU/Onprem Permissions AU/app/app.json +++ b/Apps/AU/Onprem Permissions AU/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json index 4da28095f5..bcb2705d1c 100644 --- a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json +++ b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/BE/EDocument_BE/demo data/app.json b/Apps/BE/EDocument_BE/demo data/app.json index 81031027c0..0153073f84 100644 --- a/Apps/BE/EDocument_BE/demo data/app.json +++ b/Apps/BE/EDocument_BE/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 11451, diff --git a/Apps/BE/HybridBCLast_BE/app/app.json b/Apps/BE/HybridBCLast_BE/app/app.json index 5cfa2a8d39..d70d4f92ab 100644 --- a/Apps/BE/HybridBCLast_BE/app/app.json +++ b/Apps/BE/HybridBCLast_BE/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/BE/IntrastatBE/app/app.json b/Apps/BE/IntrastatBE/app/app.json index 44190970d5..ecf98c3d05 100644 --- a/Apps/BE/IntrastatBE/app/app.json +++ b/Apps/BE/IntrastatBE/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 11346, diff --git a/Apps/BE/PeppolBE/App/app.json b/Apps/BE/PeppolBE/App/app.json index 1330acda67..0c511c36de 100644 --- a/Apps/BE/PeppolBE/App/app.json +++ b/Apps/BE/PeppolBE/App/app.json @@ -21,7 +21,7 @@ } ], "internalsVisibleTo": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 37310, diff --git a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/app.json b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/app.json index 13f8326aee..89453072f8 100644 --- a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/app.json +++ b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/CA/EDocument_CA/demo data/app.json b/Apps/CA/EDocument_CA/demo data/app.json index 439d4bea1d..cb6fa2dea4 100644 --- a/Apps/CA/EDocument_CA/demo data/app.json +++ b/Apps/CA/EDocument_CA/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/CA/HybridBCLast_CA/app/app.json b/Apps/CA/HybridBCLast_CA/app/app.json index be10d5e9ab..0fd41d06d0 100644 --- a/Apps/CA/HybridBCLast_CA/app/app.json +++ b/Apps/CA/HybridBCLast_CA/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/CH/ContosoCoffeeDemoDatasetCH/app/app.json b/Apps/CH/ContosoCoffeeDemoDatasetCH/app/app.json index 514cc0e135..d00914bd67 100644 --- a/Apps/CH/ContosoCoffeeDemoDatasetCH/app/app.json +++ b/Apps/CH/ContosoCoffeeDemoDatasetCH/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "target": "OnPrem", "resourceFolders": [ diff --git a/Apps/CH/EDocument_CH/demo data/app.json b/Apps/CH/EDocument_CH/demo data/app.json index 0e931235a3..0c567746cd 100644 --- a/Apps/CH/EDocument_CH/demo data/app.json +++ b/Apps/CH/EDocument_CH/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/CH/HybridBCLast_CH/app/app.json b/Apps/CH/HybridBCLast_CH/app/app.json index 8926703ec7..56f962fbc2 100644 --- a/Apps/CH/HybridBCLast_CH/app/app.json +++ b/Apps/CH/HybridBCLast_CH/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/CH/SwissQRBill/app/app.json b/Apps/CH/SwissQRBill/app/app.json index 1012f02509..7f11dd1318 100644 --- a/Apps/CH/SwissQRBill/app/app.json +++ b/Apps/CH/SwissQRBill/app/app.json @@ -26,7 +26,7 @@ "to": 11520 } ], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/CH/SwissQRBill/test/app.json b/Apps/CH/SwissQRBill/test/app.json index 0f8ac6dca4..50ea27dcb4 100644 --- a/Apps/CH/SwissQRBill/test/app.json +++ b/Apps/CH/SwissQRBill/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148090, diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/app.json b/Apps/CZ/AdvancePaymentsLocalization/app/app.json index 24e43f440e..dfe8cb8a0c 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/app.json +++ b/Apps/CZ/AdvancePaymentsLocalization/app/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/CZ/AdvancePaymentsLocalization/demo data/app.json b/Apps/CZ/AdvancePaymentsLocalization/demo data/app.json index 095ad0bd33..1dccad9365 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/demo data/app.json +++ b/Apps/CZ/AdvancePaymentsLocalization/demo data/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, "allowDownloadingSource": true, diff --git a/Apps/CZ/AdvancePaymentsLocalization/test/app.json b/Apps/CZ/AdvancePaymentsLocalization/test/app.json index c0811b553b..71332059b5 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/test/app.json +++ b/Apps/CZ/AdvancePaymentsLocalization/test/app.json @@ -56,7 +56,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148000, diff --git a/Apps/CZ/AdvancedLocalizationPack/app/app.json b/Apps/CZ/AdvancedLocalizationPack/app/app.json index 91e0e3959d..b0436a556c 100644 --- a/Apps/CZ/AdvancedLocalizationPack/app/app.json +++ b/Apps/CZ/AdvancedLocalizationPack/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/CZ/AdvancedLocalizationPack/test/app.json b/Apps/CZ/AdvancedLocalizationPack/test/app.json index c59a52c066..427ea33bbf 100644 --- a/Apps/CZ/AdvancedLocalizationPack/test/app.json +++ b/Apps/CZ/AdvancedLocalizationPack/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148000, diff --git a/Apps/CZ/BankingDocumentsLocalization/app/app.json b/Apps/CZ/BankingDocumentsLocalization/app/app.json index 4a94fd2b55..260051286a 100644 --- a/Apps/CZ/BankingDocumentsLocalization/app/app.json +++ b/Apps/CZ/BankingDocumentsLocalization/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/CZ/BankingDocumentsLocalization/demo data/app.json b/Apps/CZ/BankingDocumentsLocalization/demo data/app.json index a95ac2d8f0..7a8e17df17 100644 --- a/Apps/CZ/BankingDocumentsLocalization/demo data/app.json +++ b/Apps/CZ/BankingDocumentsLocalization/demo data/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, "allowDownloadingSource": true, diff --git a/Apps/CZ/BankingDocumentsLocalization/test/app.json b/Apps/CZ/BankingDocumentsLocalization/test/app.json index 40da9b73b7..b47ce1f25f 100644 --- a/Apps/CZ/BankingDocumentsLocalization/test/app.json +++ b/Apps/CZ/BankingDocumentsLocalization/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148000, diff --git a/Apps/CZ/CashDeskLocalization/app/app.json b/Apps/CZ/CashDeskLocalization/app/app.json index c2940baa83..d80b2d7cd7 100644 --- a/Apps/CZ/CashDeskLocalization/app/app.json +++ b/Apps/CZ/CashDeskLocalization/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/CZ/CashDeskLocalization/demo data/app.json b/Apps/CZ/CashDeskLocalization/demo data/app.json index 2b28e95a63..165946771a 100644 --- a/Apps/CZ/CashDeskLocalization/demo data/app.json +++ b/Apps/CZ/CashDeskLocalization/demo data/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, "allowDownloadingSource": true, diff --git a/Apps/CZ/CashDeskLocalization/test/app.json b/Apps/CZ/CashDeskLocalization/test/app.json index 785ede8319..3c5062dfec 100644 --- a/Apps/CZ/CashDeskLocalization/test/app.json +++ b/Apps/CZ/CashDeskLocalization/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148000, diff --git a/Apps/CZ/CompensationLocalization/app/app.json b/Apps/CZ/CompensationLocalization/app/app.json index d6a96fa4f4..e9b4e22c01 100644 --- a/Apps/CZ/CompensationLocalization/app/app.json +++ b/Apps/CZ/CompensationLocalization/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/CZ/CompensationLocalization/demo data/app.json b/Apps/CZ/CompensationLocalization/demo data/app.json index 970a14b5d7..f5cd5451be 100644 --- a/Apps/CZ/CompensationLocalization/demo data/app.json +++ b/Apps/CZ/CompensationLocalization/demo data/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, "allowDownloadingSource": true, diff --git a/Apps/CZ/CompensationLocalization/test/app.json b/Apps/CZ/CompensationLocalization/test/app.json index c8cc5e695d..c0a76f7694 100644 --- a/Apps/CZ/CompensationLocalization/test/app.json +++ b/Apps/CZ/CompensationLocalization/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148000, diff --git a/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/app.json b/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/app.json index 67b50220f4..e3c23cf96a 100644 --- a/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/app.json +++ b/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Reports/AdjustExchangeRatesCZL.Report.al b/Apps/CZ/CoreLocalizationPack/app/Src/Reports/AdjustExchangeRatesCZL.Report.al index 7ea33d6be2..c9482c88a4 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Reports/AdjustExchangeRatesCZL.Report.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Reports/AdjustExchangeRatesCZL.Report.al @@ -2135,6 +2135,7 @@ report 31004 "Adjust Exchange Rates CZL" end; if Post then begin + VarGenJournalLine."Zero Src. Curr. Amount" := true; OnPostGenJnlLineOnBeforeGenJnlPostLineRun(GenJnlPostLine, VarGenJournalLine, DimensionSetEntry); GenJnlPostLine.Run(VarGenJournalLine); exit(GenJnlPostLine.GetNextTransactionNo()); diff --git a/Apps/CZ/CoreLocalizationPack/app/app.json b/Apps/CZ/CoreLocalizationPack/app/app.json index 168404e3c7..4fd476c9ee 100644 --- a/Apps/CZ/CoreLocalizationPack/app/app.json +++ b/Apps/CZ/CoreLocalizationPack/app/app.json @@ -27,7 +27,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/CZ/CoreLocalizationPack/test/app.json b/Apps/CZ/CoreLocalizationPack/test/app.json index a43c22c7af..1e822a5904 100644 --- a/Apps/CZ/CoreLocalizationPack/test/app.json +++ b/Apps/CZ/CoreLocalizationPack/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148000, diff --git a/Apps/CZ/EDocument_CZ/demo data/app.json b/Apps/CZ/EDocument_CZ/demo data/app.json index 07c80e8b40..2e25668090 100644 --- a/Apps/CZ/EDocument_CZ/demo data/app.json +++ b/Apps/CZ/EDocument_CZ/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/CZ/FixedAssetLocalization/app/app.json b/Apps/CZ/FixedAssetLocalization/app/app.json index 62f89ca2d3..a3ef3e5292 100644 --- a/Apps/CZ/FixedAssetLocalization/app/app.json +++ b/Apps/CZ/FixedAssetLocalization/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/CZ/FixedAssetLocalization/demo data/app.json b/Apps/CZ/FixedAssetLocalization/demo data/app.json index 7ff9a71825..208d1a345c 100644 --- a/Apps/CZ/FixedAssetLocalization/demo data/app.json +++ b/Apps/CZ/FixedAssetLocalization/demo data/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, "allowDownloadingSource": true, diff --git a/Apps/CZ/FixedAssetLocalization/test/app.json b/Apps/CZ/FixedAssetLocalization/test/app.json index 1c908f401c..a3c801a2e9 100644 --- a/Apps/CZ/FixedAssetLocalization/test/app.json +++ b/Apps/CZ/FixedAssetLocalization/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148000, diff --git a/Apps/CZ/HybridBCLast_CZ/app/app.json b/Apps/CZ/HybridBCLast_CZ/app/app.json index a57e41ab92..a51bd0317f 100644 --- a/Apps/CZ/HybridBCLast_CZ/app/app.json +++ b/Apps/CZ/HybridBCLast_CZ/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/CZ/IntrastatCZ/app/app.json b/Apps/CZ/IntrastatCZ/app/app.json index d3c4db417b..74d39370cb 100644 --- a/Apps/CZ/IntrastatCZ/app/app.json +++ b/Apps/CZ/IntrastatCZ/app/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, "allowDownloadingSource": true, diff --git a/Apps/CZ/IntrastatCZ/demo data/app.json b/Apps/CZ/IntrastatCZ/demo data/app.json index 4a5be064a9..df1d5e8a47 100644 --- a/Apps/CZ/IntrastatCZ/demo data/app.json +++ b/Apps/CZ/IntrastatCZ/demo data/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, "allowDownloadingSource": true, diff --git a/Apps/CZ/IntrastatCZ/test/app.json b/Apps/CZ/IntrastatCZ/test/app.json index 8292b7bf7b..06ca786b57 100644 --- a/Apps/CZ/IntrastatCZ/test/app.json +++ b/Apps/CZ/IntrastatCZ/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148000, diff --git a/Apps/CZ/Onprem Permissions CZ/app/app.json b/Apps/CZ/Onprem Permissions CZ/app/app.json index 29e88ab8cb..c94605ec1a 100644 --- a/Apps/CZ/Onprem Permissions CZ/app/app.json +++ b/Apps/CZ/Onprem Permissions CZ/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/DACH/Onprem Permissions DACH/app/app.json b/Apps/DACH/Onprem Permissions DACH/app/app.json index 5cd0050ca1..236a8980df 100644 --- a/Apps/DACH/Onprem Permissions DACH/app/app.json +++ b/Apps/DACH/Onprem Permissions DACH/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/app.json b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/app.json index 2183e2a88f..b39961a2aa 100644 --- a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/app.json +++ b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/app.json @@ -23,7 +23,7 @@ "TranslationFile" ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/DE/EDocumentDE/app/app.json b/Apps/DE/EDocumentDE/app/app.json index 6e47234ad6..ad60cadeea 100644 --- a/Apps/DE/EDocumentDE/app/app.json +++ b/Apps/DE/EDocumentDE/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 13914, diff --git a/Apps/DE/EDocumentDE/app/src/PEPPOL/EDocPEPPOLValidationDE.Codeunit.al b/Apps/DE/EDocumentDE/app/src/PEPPOL/EDocPEPPOLValidationDE.Codeunit.al index b9a2dcce86..8cae27c424 100644 --- a/Apps/DE/EDocumentDE/app/src/PEPPOL/EDocPEPPOLValidationDE.Codeunit.al +++ b/Apps/DE/EDocumentDE/app/src/PEPPOL/EDocPEPPOLValidationDE.Codeunit.al @@ -1,5 +1,6 @@ namespace Microsoft.eServices.EDocument.IO.Peppol; +using Microsoft.eServices.EDocument.Formats; using Microsoft.Sales.Document; using Microsoft.Sales.Peppol; @@ -7,8 +8,23 @@ codeunit 13921 "EDoc PEPPOL Validation DE" { EventSubscriberInstance = Manual; + var + BuyerReference: Enum "E-Document Buyer Reference"; + + procedure SetBuyerReference(NewBuyerReference: Enum "E-Document Buyer Reference") + begin + BuyerReference := NewBuyerReference; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"PEPPOL Validation", 'OnCheckSalesDocumentOnBeforeCheckCustomerVATRegNo', '', false, false)] + local procedure SkipCustomerVATRegNoCheck(var IsHandled: Boolean) + begin + if BuyerReference = BuyerReference::"Customer Reference" then + IsHandled := true; + end; + [EventSubscriber(ObjectType::Codeunit, Codeunit::"PEPPOL Validation", 'OnCheckSalesDocumentOnBeforeCheckYourReference', '', false, false)] - local procedure SkipCheckOnCheckSalesDocumentOnBeforeCheckYourReference(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) + local procedure SkipCheckOnCheckSalesDocumentOnBeforeCheckYourReference(var IsHandled: Boolean) begin IsHandled := true; end; @@ -18,4 +34,4 @@ codeunit 13921 "EDoc PEPPOL Validation DE" begin SalesHeader.TestField("Sell-to E-Mail"); end; -} +} \ No newline at end of file diff --git a/Apps/DE/EDocumentDE/app/src/XRechnung/ExportXRechnungDocument.Codeunit.al b/Apps/DE/EDocumentDE/app/src/XRechnung/ExportXRechnungDocument.Codeunit.al index 0cebb53276..041264438f 100644 --- a/Apps/DE/EDocumentDE/app/src/XRechnung/ExportXRechnungDocument.Codeunit.al +++ b/Apps/DE/EDocumentDE/app/src/XRechnung/ExportXRechnungDocument.Codeunit.al @@ -4,6 +4,7 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.eServices.EDocument.Formats; +using Microsoft.Bank.BankAccount; using Microsoft.CRM.Team; using Microsoft.eServices.EDocument; using Microsoft.Finance.Currency; @@ -158,7 +159,7 @@ codeunit 13916 "Export XRechnung Document" InsertAccountingSupplierParty(SalesInvoiceHeader."Responsibility Center", SalesInvoiceHeader."Salesperson Code", RootXMLNode); InsertAccountingCustomerParty(RootXMLNode, SalesInvoiceHeader); InsertDelivery(RootXMLNode, SalesInvoiceHeader); - InsertPaymentMeans(RootXMLNode, '68', 'PayeeFinancialAccount', SalesInvoiceHeader."Company Bank Account Code"); + InsertPaymentMeans(RootXMLNode, '58', 'PayeeFinancialAccount', SalesInvoiceHeader."Company Bank Account Code"); InsertPaymentTerms(RootXMLNode, SalesInvoiceHeader."Payment Terms Code"); InsertVATAmounts(SalesInvLine, LineVATAmount, LineAmount, LineDiscAmount, SalesInvoiceHeader."Prices Including VAT", Currency); InsertInvDiscountAllowanceCharge(LineAmounts, SalesInvLine, CurrencyCode, RootXMLNode, LineDiscAmount, LineAmount, Currency."Amount Rounding Precision"); @@ -203,7 +204,7 @@ codeunit 13916 "Export XRechnung Document" InsertAccountingSupplierParty(SalesCrMemoHeader."Responsibility Center", SalesCrMemoHeader."Salesperson Code", RootXMLNode); InsertAccountingCustomerParty(RootXMLNode, SalesCrMemoHeader); InsertDelivery(RootXMLNode, SalesCrMemoHeader); - InsertPaymentMeans(RootXMLNode, '68', '', SalesCrMemoHeader."Company Bank Account Code"); + InsertPaymentMeans(RootXMLNode, '58', '', SalesCrMemoHeader."Company Bank Account Code"); InsertPaymentTerms(RootXMLNode, SalesCrMemoHeader."Payment Terms Code"); InsertVATAmounts(SalesCrMemoLine, LineVATAmount, LineAmount, LineDiscAmount, SalesCrMemoHeader."Prices Including VAT", Currency); InsertInvDiscountAllowanceCharge(LineAmounts, SalesCrMemoLine, CurrencyCode, RootXMLNode, LineDiscAmount, LineAmount, Currency."Amount Rounding Precision"); @@ -233,6 +234,7 @@ codeunit 13916 "Export XRechnung Document" begin GetSetups(); PEPPOLMgt.TransferHeaderToSalesInvoiceHeader(ServiceInvoiceHeader, SalesInvoiceHeader); + SalesInvoiceHeader."Company Bank Account Code" := ServiceInvoiceHeader."Company Bank Account Code"; ServiceInvoiceLine.SetRange("Document No.", ServiceInvoiceHeader."No."); if ServiceInvoiceLine.FindSet() then repeat @@ -258,7 +260,7 @@ codeunit 13916 "Export XRechnung Document" InsertAccountingSupplierParty(SalesInvoiceHeader."Responsibility Center", SalesInvoiceHeader."Salesperson Code", RootXMLNode); InsertAccountingCustomerParty(RootXMLNode, SalesInvoiceHeader); InsertDelivery(RootXMLNode, SalesInvoiceHeader); - InsertPaymentMeans(RootXMLNode, '68', 'PayeeFinancialAccount', SalesInvoiceHeader."Company Bank Account Code"); + InsertPaymentMeans(RootXMLNode, '58', 'PayeeFinancialAccount', SalesInvoiceHeader."Company Bank Account Code"); InsertPaymentTerms(RootXMLNode, SalesInvoiceHeader."Payment Terms Code"); InsertVATAmounts(TempSalesInvLine, LineVATAmount, LineAmount, LineDiscAmount, SalesInvoiceHeader."Prices Including VAT", Currency); InsertInvDiscountAllowanceCharge(LineAmounts, TempSalesInvLine, CurrencyCode, RootXMLNode, LineDiscAmount, LineAmount, Currency."Amount Rounding Precision"); @@ -288,6 +290,7 @@ codeunit 13916 "Export XRechnung Document" begin GetSetups(); PEPPOLMgt.TransferHeaderToSalesCrMemoHeader(ServiceCrMemoHeader, SalesCrMemoHeader); + SalesCrMemoHeader."Company Bank Account Code" := ServiceCrMemoHeader."Company Bank Account Code"; ServiceCrMemoLine.SetRange("Document No.", ServiceCrMemoHeader."No."); if ServiceCrMemoLine.FindSet() then repeat @@ -312,7 +315,7 @@ codeunit 13916 "Export XRechnung Document" InsertAccountingSupplierParty(SalesCrMemoHeader."Responsibility Center", SalesCrMemoHeader."Salesperson Code", RootXMLNode); InsertAccountingCustomerParty(RootXMLNode, SalesCrMemoHeader); InsertDelivery(RootXMLNode, SalesCrMemoHeader); - InsertPaymentMeans(RootXMLNode, '68', '', SalesCrMemoHeader."Company Bank Account Code"); + InsertPaymentMeans(RootXMLNode, '58', '', SalesCrMemoHeader."Company Bank Account Code"); InsertPaymentTerms(RootXMLNode, SalesCrMemoHeader."Payment Terms Code"); InsertVATAmounts(TempSalesCrMemoLine, LineVATAmount, LineAmount, LineDiscAmount, SalesCrMemoHeader."Prices Including VAT", Currency); InsertInvDiscountAllowanceCharge(LineAmounts, TempSalesCrMemoLine, CurrencyCode, RootXMLNode, LineDiscAmount, LineAmount, Currency."Amount Rounding Precision"); @@ -536,22 +539,23 @@ codeunit 13916 "Export XRechnung Document" local procedure InsertPayeeFinancialAccount(var PaymentMeansElement: XmlElement; PayeeFinancialAccount: Text[30]; CompanyBankAccountCode: Code[20]); var PayeeFinancialAccountElement: XmlElement; + IBAN: Text[50]; + SWIFTCode: Code[20]; begin PayeeFinancialAccountElement := XmlElement.Create(PayeeFinancialAccount, XmlNamespaceCAC); - if CompanyBankAccountCode <> '' then - PayeeFinancialAccountElement.Add(XmlElement.Create('ID', XmlNamespaceCBC, CompanyBankAccountCode)) - else - PayeeFinancialAccountElement.Add(XmlElement.Create('ID', XmlNamespaceCBC, CompanyInformation."Bank Account No.")); - InsertFinancialInstitutionBranch(PayeeFinancialAccountElement); + GetBankAccountPaymentDetails(CompanyBankAccountCode, IBAN, SWIFTCode); + PayeeFinancialAccountElement.Add(XmlElement.Create('ID', XmlNamespaceCBC, GetIBAN(IBAN))); + if SWIFTCode <> '' then + InsertFinancialInstitutionBranch(PayeeFinancialAccountElement, SWIFTCode); PaymentMeansElement.Add(PayeeFinancialAccountElement); end; - local procedure InsertFinancialInstitutionBranch(var RootElement: XmlElement); + local procedure InsertFinancialInstitutionBranch(var RootElement: XmlElement; SWIFTCode: Code[20]); var FinancialInstitutionBranchElement: XmlElement; begin FinancialInstitutionBranchElement := XmlElement.Create('FinancialInstitutionBranch', XmlNamespaceCAC); - FinancialInstitutionBranchElement.Add(XmlElement.Create('ID', XmlNamespaceCBC, CompanyInformation."Bank Branch No.")); + FinancialInstitutionBranchElement.Add(XmlElement.Create('ID', XmlNamespaceCBC, GetIBAN(SWIFTCode))); RootElement.Add(FinancialInstitutionBranchElement); end; @@ -599,7 +603,7 @@ codeunit 13916 "Export XRechnung Document" PriceElement: XmlElement; begin PriceElement := XmlElement.Create('Price', XmlNamespaceCAC); - PriceElement.Add(XmlElement.Create('PriceAmount', XmlNamespaceCBC, XmlAttribute.Create('currencyID', CurrencyCode), FormatDecimalUnlimited(UnitPrice))); + PriceElement.Add(XmlElement.Create('PriceAmount', XmlNamespaceCBC, XmlAttribute.Create('currencyID', CurrencyCode), FormatFourDecimal(UnitPrice))); RootElement.Add(PriceElement); end; @@ -820,7 +824,8 @@ codeunit 13916 "Export XRechnung Document" if CustomerGLN <> '' then InsertPartyIdentification(PartyElement, CustomerGLN) else - InsertPartyIdentification(PartyElement, GetVATRegistrationNo(VATRegNo, PostalAddress."Country/Region Code")); + if VATRegNo <> '' then + InsertPartyIdentification(PartyElement, GetVATRegistrationNo(VATRegNo, PostalAddress."Country/Region Code")); InsertPartyName(PartyElement, PartyName); InsertAddress(PartyElement, 'PostalAddress', PostalAddress); @@ -836,7 +841,7 @@ codeunit 13916 "Export XRechnung Document" begin TaxCategoryElement := XmlElement.Create(TaxCategory, XmlNamespaceCAC); TaxCategoryElement.Add(XmlElement.Create('ID', XmlNamespaceCBC, TaxCategoryID)); - TaxCategoryElement.Add(XmlElement.Create('Percent', XmlNamespaceCBC, FormatFiveDecimal(Percent))); + TaxCategoryElement.Add(XmlElement.Create('Percent', XmlNamespaceCBC, FormatDecimal(Percent))); if Percent = 0 then TaxCategoryElement.Add(XmlElement.Create('TaxExemptionReasonCode', XmlNamespaceCBC, 'VATEX-EU-O')); InsertTaxScheme(TaxCategoryElement); @@ -1022,7 +1027,7 @@ codeunit 13916 "Export XRechnung Document" if PricesIncVAT then ExcludeVAT(SalesInvLine, Currency."Amount Rounding Precision"); InvoiceLineElement.Add(XmlElement.Create('ID', XmlNamespaceCBC, Format(SalesInvLine."Line No."))); - InvoiceLineElement.Add(XmlElement.Create('InvoicedQuantity', XmlNamespaceCBC, XmlAttribute.Create('unitCode', GetUoMCode(SalesInvLine."Unit of Measure Code")), FormatDecimalUnlimited(SalesInvLine.Quantity))); + InvoiceLineElement.Add(XmlElement.Create('InvoicedQuantity', XmlNamespaceCBC, XmlAttribute.Create('unitCode', GetUoMCode(SalesInvLine."Unit of Measure Code")), FormatDecimal(SalesInvLine.Quantity))); InvoiceLineElement.Add(XmlElement.Create('LineExtensionAmount', XmlNamespaceCBC, XmlAttribute.Create('currencyID', CurrencyCode), FormatDecimal(SalesInvLine.Amount + SalesInvLine."Inv. Discount Amount"))); if SalesInvLine."Shipment Date" <> 0D then InsertInvoicePeriod(InvoiceLineElement, SalesInvLine."Shipment Date", SalesInvLine."Shipment Date"); @@ -1061,7 +1066,7 @@ codeunit 13916 "Export XRechnung Document" if PricesIncVAT then ExcludeVAT(SalesCrMemoLine, Currency."Amount Rounding Precision"); CrMemoLineElement.Add(XmlElement.Create('ID', XmlNamespaceCBC, Format(SalesCrMemoLine."Line No."))); - CrMemoLineElement.Add(XmlElement.Create('CreditedQuantity', XmlNamespaceCBC, XmlAttribute.Create('unitCode', GetUoMCode(SalesCrMemoLine."Unit of Measure Code")), FormatDecimalUnlimited(SalesCrMemoLine.Quantity))); + CrMemoLineElement.Add(XmlElement.Create('CreditedQuantity', XmlNamespaceCBC, XmlAttribute.Create('unitCode', GetUoMCode(SalesCrMemoLine."Unit of Measure Code")), FormatDecimal(SalesCrMemoLine.Quantity))); CrMemoLineElement.Add(XmlElement.Create('LineExtensionAmount', XmlNamespaceCBC, XmlAttribute.Create('currencyID', CurrencyCode), FormatDecimal(SalesCrMemoLine.Amount + SalesCrMemoLine."Inv. Discount Amount"))); InsertOrderLineReference(CrMemoLineElement, SalesCrMemoLine."Line No."); if SalesCrMemoLine."Shipment Date" <> 0D then @@ -1324,18 +1329,10 @@ codeunit 13916 "Export XRechnung Document" exit(Format(Round(VarDecimal, 0.01), 0, 9)); end; - procedure FormatDecimalUnlimited(VarDecimal: Decimal): Text - begin - exit(Format(VarDecimal, 0, 9)); - end; - -#if not CLEAN29 - [Obsolete('FormatFourDecimal is no longer used internally. Quantity and unit price fields are now exported with unlimited precision per EN 16931. For VAT percentages, use FormatFiveDecimal. For quantity and unit price, use FormatDecimalUnlimited.', '29.0')] procedure FormatFourDecimal(VarDecimal: Decimal): Text[30]; begin exit(Format(Round(VarDecimal, 0.0001), 0, 9)); end; -#endif procedure FormatFiveDecimal(VarDecimal: Decimal): Text[30]; begin @@ -1446,6 +1443,33 @@ codeunit 13916 "Export XRechnung Document" GeneralLedgerSetup.Get(); OnAfterGetSetups(CompanyInformation, GeneralLedgerSetup); end; + + local procedure GetIBAN(IBAN: Text[50]) IBANFormatted: Text[50] + begin + // Format IBAN to remove spaces and ensure it is in uppercase + if IBAN = '' then + exit(''); + IBANFormatted := UpperCase(DelChr(IBAN, '=', ' ')); + exit(CopyStr(IBANFormatted, 1, 50)); + end; + + local procedure GetBankAccountPaymentDetails(BankAccountCode: Code[20]; var IBAN: Text[50]; var SWIFTCode: Code[20]) + var + BankAccount: Record "Bank Account"; + begin + Clear(IBAN); + Clear(SWIFTCode); + + if BankAccountCode <> '' then + if BankAccount.Get(BankAccountCode) then begin + IBAN := BankAccount.IBAN; + SWIFTCode := BankAccount."SWIFT Code"; + exit; + end; + + IBAN := CompanyInformation.IBAN; + SWIFTCode := CompanyInformation."SWIFT Code"; + end; #endregion [IntegrationEvent(false, false)] diff --git a/Apps/DE/EDocumentDE/app/src/XRechnung/XRechnungFormat.Codeunit.al b/Apps/DE/EDocumentDE/app/src/XRechnung/XRechnungFormat.Codeunit.al index 83bcc9e5b4..8bfa38feb2 100644 --- a/Apps/DE/EDocumentDE/app/src/XRechnung/XRechnungFormat.Codeunit.al +++ b/Apps/DE/EDocumentDE/app/src/XRechnung/XRechnungFormat.Codeunit.al @@ -4,6 +4,7 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.eServices.EDocument.Formats; +using Microsoft.Bank.BankAccount; using Microsoft.eServices.EDocument; using Microsoft.eServices.EDocument.IO.Peppol; using Microsoft.Foundation.Company; @@ -27,10 +28,14 @@ codeunit 13914 "XRechnung Format" implements "E-Document" EDocImportXRechnung: Codeunit "Import XRechnung Document"; procedure Check(var SourceDocumentHeader: RecordRef; EDocumentService: Record "E-Document Service"; EDocumentProcessingPhase: Enum "E-Document Processing Phase") + var + CompanyInformation: Record "Company Information"; begin OnBeforeCheck(SourceDocumentHeader, EDocumentService, EDocumentProcessingPhase); - CheckCompanyInfoMandatory(); + CheckCompanyInfoMandatory(CompanyInformation); + CheckBankAccountIBANMandatory(SourceDocumentHeader, CompanyInformation); CheckBuyerReferenceMandatory(EDocumentService, SourceDocumentHeader); + EDocPEPPOLValidationDE.SetBuyerReference(EDocumentService."Buyer Reference"); BindSubscription(EDocPEPPOLValidationDE); EDocPEPPOLBIS30.Check(SourceDocumentHeader, EDocumentService, EDocumentProcessingPhase); UnbindSubscription(EDocPEPPOLValidationDE); @@ -77,18 +82,52 @@ codeunit 13914 "XRechnung Format" implements "E-Document" TempBlob.FromRecord(TempRecordExportBuffer, TempRecordExportBuffer.FieldNo("File Content")); end; - local procedure CheckCompanyInfoMandatory() - var - CompanyInformation: Record "Company Information"; + local procedure CheckCompanyInfoMandatory(var CompanyInformation: Record "Company Information") begin CompanyInformation.Get(); CompanyInformation.TestField("E-Mail"); end; - local procedure CheckBuyerReferenceMandatory(EDocumentService: Record "E-Document Service"; SourceDocumentHeader: RecordRef) + local procedure CheckBankAccountIBANMandatory(SourceDocumentHeader: RecordRef; var CompanyInformation: Record "Company Information") var + BankAccount: Record "Bank Account"; SalesInvoiceHeader: Record "Sales Invoice Header"; + ServiceInvoiceHeader: Record "Service Invoice Header"; + BankAccountCodeFieldRef: FieldRef; + CheckBankAccount: Boolean; + BankAccountCode: Code[20]; + BankAccFieldNo: Integer; + begin + if not (SourceDocumentHeader.Number() in + [Database::"Sales Header", + Database::"Sales Invoice Header", + Database::"Sales Cr.Memo Header", + Database::"Service Header", + Database::"Service Invoice Header", + Database::"Service Cr.Memo Header"]) + then + exit; + + BankAccFieldNo := SalesInvoiceHeader.FieldNo("Company Bank Account Code"); + if SourceDocumentHeader.Number() in [Database::"Service Header", Database::"Service Invoice Header", Database::"Service Cr.Memo Header"] then + BankAccFieldNo := ServiceInvoiceHeader.FieldNo("Company Bank Account Code"); + + BankAccountCodeFieldRef := SourceDocumentHeader.Field(BankAccFieldNo); + BankAccountCode := BankAccountCodeFieldRef.Value(); + + if BankAccountCode <> '' then + CheckBankAccount := BankAccount.Get(BankAccountCode); + + if CheckBankAccount then + BankAccount.TestField(IBAN) + else + CompanyInformation.TestField(IBAN); + end; + + local procedure CheckBuyerReferenceMandatory(EDocumentService: Record "E-Document Service"; SourceDocumentHeader: RecordRef) + var Customer: Record Customer; + SalesInvoiceHeader: Record "Sales Invoice Header"; CustomerNoFieldRef: FieldRef; YourReferenceFieldRef: FieldRef; begin diff --git a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al index 8e81e0d9b5..7357b0168d 100644 --- a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al +++ b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al @@ -782,7 +782,7 @@ codeunit 13917 "Export ZUGFeRD Document" repeat if LineVATAmount.ContainsKey(SalesInvLine."VAT %") and LineAmount.ContainsKey(SalesInvLine."VAT %") then begin InsertTaxElement(SettlementElement, FormatDecimal(LineVATAmount.Get(SalesInvLine."VAT %")), FormatDecimal(LineAmount.Get(SalesInvLine."VAT %")), - GetTaxCategoryID(SalesInvLine."Tax Category", SalesInvLine."VAT Bus. Posting Group", SalesInvLine."VAT Prod. Posting Group"), FormatFiveDecimal(SalesInvLine."VAT %"), + GetTaxCategoryID(SalesInvLine."Tax Category", SalesInvLine."VAT Bus. Posting Group", SalesInvLine."VAT Prod. Posting Group"), FormatFourDecimal(SalesInvLine."VAT %"), SalesInvLine."VAT %" = 0); LineAmount.Remove(SalesInvLine."VAT %"); LineVATAmount.Remove(SalesInvLine."VAT %"); @@ -799,7 +799,7 @@ codeunit 13917 "Export ZUGFeRD Document" repeat if LineVATAmount.ContainsKey(SalesCrMemoLine."VAT %") and LineAmount.ContainsKey(SalesCrMemoLine."VAT %") then begin InsertTaxElement(SettlementElement, FormatDecimal(LineVATAmount.Get(SalesCrMemoLine."VAT %")), FormatDecimal(LineAmount.Get(SalesCrMemoLine."VAT %")), - GetTaxCategoryID(SalesCrMemoLine."Tax Category", SalesCrMemoLine."VAT Bus. Posting Group", SalesCrMemoLine."VAT Prod. Posting Group"), FormatFiveDecimal(SalesCrMemoLine."VAT %"), + GetTaxCategoryID(SalesCrMemoLine."Tax Category", SalesCrMemoLine."VAT Bus. Posting Group", SalesCrMemoLine."VAT Prod. Posting Group"), FormatFourDecimal(SalesCrMemoLine."VAT %"), SalesCrMemoLine."VAT %" = 0); LineAmount.Remove(SalesCrMemoLine."VAT %"); @@ -901,13 +901,13 @@ codeunit 13917 "Export ZUGFeRD Document" SpecifiedLineTradeAgreementElement := XmlElement.Create('SpecifiedLineTradeAgreement', XmlNamespaceRAM); NetPriceProductTradePriceElement := XmlElement.Create('NetPriceProductTradePrice', XmlNamespaceRAM); - ChargeAmountElement := XmlElement.Create('ChargeAmount', XmlNamespaceRAM, FormatDecimalUnlimited(SalesInvoiceLine."Unit Price")); + ChargeAmountElement := XmlElement.Create('ChargeAmount', XmlNamespaceRAM, FormatFourDecimal(SalesInvoiceLine."Unit Price")); NetPriceProductTradePriceElement.Add(ChargeAmountElement); SpecifiedLineTradeAgreementElement.Add(NetPriceProductTradePriceElement); InvoiceLineElement.Add(SpecifiedLineTradeAgreementElement); SpecifiedLineTradeDeliveryElement := XmlElement.Create('SpecifiedLineTradeDelivery', XmlNamespaceRAM); - BilledQuantityElement := XmlElement.Create('BilledQuantity', XmlNamespaceRAM, FormatDecimalUnlimited(SalesInvoiceLine.Quantity)); + BilledQuantityElement := XmlElement.Create('BilledQuantity', XmlNamespaceRAM, FormatFourDecimal(SalesInvoiceLine.Quantity)); BilledQuantityElement.SetAttribute('unitCode', GetUoMCode(SalesInvoiceLine."Unit of Measure Code")); SpecifiedLineTradeDeliveryElement.Add(BilledQuantityElement); InvoiceLineElement.Add(SpecifiedLineTradeDeliveryElement); @@ -918,7 +918,7 @@ codeunit 13917 "Export ZUGFeRD Document" ApplicableTradeTaxElement := XmlElement.Create('ApplicableTradeTax', XmlNamespaceRAM); ApplicableTradeTaxElement.Add(XmlElement.Create('TypeCode', XmlNamespaceRAM, 'VAT')); ApplicableTradeTaxElement.Add(XmlElement.Create('CategoryCode', XmlNamespaceRAM, GetTaxCategoryID(SalesInvoiceLine."Tax Category", SalesInvoiceLine."VAT Bus. Posting Group", SalesInvoiceLine."VAT Prod. Posting Group"))); - ApplicableTradeTaxElement.Add(XmlElement.Create('RateApplicablePercent', XmlNamespaceRAM, FormatFiveDecimal(SalesInvoiceLine."VAT %"))); + ApplicableTradeTaxElement.Add(XmlElement.Create('RateApplicablePercent', XmlNamespaceRAM, FormatFourDecimal(SalesInvoiceLine."VAT %"))); SpecifiedLineTradeSettlementElement.Add(ApplicableTradeTaxElement); if SalesInvoiceLine."Shipment Date" <> 0D then @@ -986,13 +986,13 @@ codeunit 13917 "Export ZUGFeRD Document" SpecifiedLineTradeAgreementElement := XmlElement.Create('SpecifiedLineTradeAgreement', XmlNamespaceRAM); NetPriceProductTradePriceElement := XmlElement.Create('NetPriceProductTradePrice', XmlNamespaceRAM); - ChargeAmountElement := XmlElement.Create('ChargeAmount', XmlNamespaceRAM, FormatDecimalUnlimited(SalesCrMemoLine."Unit Price")); + ChargeAmountElement := XmlElement.Create('ChargeAmount', XmlNamespaceRAM, FormatFourDecimal(SalesCrMemoLine."Unit Price")); NetPriceProductTradePriceElement.Add(ChargeAmountElement); SpecifiedLineTradeAgreementElement.Add(NetPriceProductTradePriceElement); CrMemoLineElement.Add(SpecifiedLineTradeAgreementElement); SpecifiedLineTradeDeliveryElement := XmlElement.Create('SpecifiedLineTradeDelivery', XmlNamespaceRAM); - BilledQuantityElement := XmlElement.Create('BilledQuantity', XmlNamespaceRAM, FormatDecimalUnlimited(SalesCrMemoLine.Quantity)); + BilledQuantityElement := XmlElement.Create('BilledQuantity', XmlNamespaceRAM, FormatFourDecimal(SalesCrMemoLine.Quantity)); BilledQuantityElement.SetAttribute('unitCode', GetUoMCode(SalesCrMemoLine."Unit of Measure Code")); SpecifiedLineTradeDeliveryElement.Add(BilledQuantityElement); CrMemoLineElement.Add(SpecifiedLineTradeDeliveryElement); @@ -1003,7 +1003,7 @@ codeunit 13917 "Export ZUGFeRD Document" ApplicableTradeTaxElement := XmlElement.Create('ApplicableTradeTax', XmlNamespaceRAM); ApplicableTradeTaxElement.Add(XmlElement.Create('TypeCode', XmlNamespaceRAM, 'VAT')); ApplicableTradeTaxElement.Add(XmlElement.Create('CategoryCode', XmlNamespaceRAM, GetTaxCategoryID(SalesCrMemoLine."Tax Category", SalesCrMemoLine."VAT Bus. Posting Group", SalesCrMemoLine."VAT Prod. Posting Group"))); - ApplicableTradeTaxElement.Add(XmlElement.Create('RateApplicablePercent', XmlNamespaceRAM, FormatFiveDecimal(SalesCrMemoLine."VAT %"))); + ApplicableTradeTaxElement.Add(XmlElement.Create('RateApplicablePercent', XmlNamespaceRAM, FormatFourDecimal(SalesCrMemoLine."VAT %"))); SpecifiedLineTradeSettlementElement.Add(ApplicableTradeTaxElement); if SalesCrMemoLine."Shipment Date" <> 0D then @@ -1111,7 +1111,7 @@ codeunit 13917 "Export ZUGFeRD Document" AllowanceChargeElement.Add(XmlElement.Create('ActualAmount', XmlNamespaceRAM, FormatDecimal(Amount))); AllowanceChargeElement.Add(XmlElement.Create('Reason', XmlNamespaceRAM, AllowanceChargeReason)); if InsertCategoryTax then - InsertCategoryTradeTax(AllowanceChargeElement, TaxCategory, FormatFiveDecimal(Percent)); + InsertCategoryTradeTax(AllowanceChargeElement, TaxCategory, FormatFourDecimal(Percent)); RootXMLNode.Add(AllowanceChargeElement); end; @@ -1304,22 +1304,9 @@ codeunit 13917 "Export ZUGFeRD Document" exit(Format(VarDecimal, 0, TypeHelper.GetXMLAmountFormatWithTwoDecimalPlaces())) end; - procedure FormatDecimalUnlimited(VarDecimal: Decimal): Text - begin - exit(Format(VarDecimal, 0, 9)); - end; - -#if not CLEAN29 - [Obsolete('FormatFourDecimal is no longer used internally. Quantity and unit price fields are now exported with unlimited precision per EN 16931. For VAT percentages, use FormatFiveDecimal. For quantity and unit price, use FormatDecimalUnlimited.', '29.0')] procedure FormatFourDecimal(VarDecimal: Decimal): Text begin - exit(Format(VarDecimal, 0, '')); - end; -#endif - - procedure FormatFiveDecimal(VarDecimal: Decimal): Text - begin - exit(Format(Round(VarDecimal, 0.00001), 0, 9)); + exit(Format(VarDecimal, 0, '')) end; procedure GetUoMCode(UoMCode: Code[10]): Text; diff --git a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ZUGFeRDFormat.Codeunit.al b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ZUGFeRDFormat.Codeunit.al index 59e3b0aeff..a579031afd 100644 --- a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ZUGFeRDFormat.Codeunit.al +++ b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ZUGFeRDFormat.Codeunit.al @@ -31,6 +31,7 @@ codeunit 13920 "ZUGFeRD Format" implements "E-Document" OnBeforeCheck(SourceDocumentHeader, EDocumentService, EDocumentProcessingPhase); CheckCompanyInfoMandatory(); CheckBuyerReferenceMandatory(EDocumentService, SourceDocumentHeader); + EDocPEPPOLValidationDE.SetBuyerReference(EDocumentService."Buyer Reference"); BindSubscription(EDocPEPPOLValidationDE); EDocPEPPOLBIS30.Check(SourceDocumentHeader, EDocumentService, EDocumentProcessingPhase); UnbindSubscription(EDocPEPPOLValidationDE); diff --git a/Apps/DE/EDocumentDE/demo data/app.json b/Apps/DE/EDocumentDE/demo data/app.json index 2eb966b13d..538f4a363e 100644 --- a/Apps/DE/EDocumentDE/demo data/app.json +++ b/Apps/DE/EDocumentDE/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 11370, diff --git a/Apps/DE/EDocumentDE/test/app.json b/Apps/DE/EDocumentDE/test/app.json index 3a3f31176c..8c60e454b8 100644 --- a/Apps/DE/EDocumentDE/test/app.json +++ b/Apps/DE/EDocumentDE/test/app.json @@ -50,7 +50,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 13918, diff --git a/Apps/DE/EDocumentDE/test/src/XRechnungXMLDocumentTests.Codeunit.al b/Apps/DE/EDocumentDE/test/src/XRechnungXMLDocumentTests.Codeunit.al index dc8bb5387f..c51be136eb 100644 --- a/Apps/DE/EDocumentDE/test/src/XRechnungXMLDocumentTests.Codeunit.al +++ b/Apps/DE/EDocumentDE/test/src/XRechnungXMLDocumentTests.Codeunit.al @@ -4,6 +4,7 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.eServices.EDocument.Formats; +using Microsoft.Bank.BankAccount; using Microsoft.eServices.EDocument; using Microsoft.eServices.EDocument.Integration; using Microsoft.Finance.Currency; @@ -49,11 +50,28 @@ codeunit 13918 "XRechnung XML Document Tests" LibraryEdocument: Codeunit "Library - E-Document"; Assert: Codeunit Assert; ExportXRechnungFormat: Codeunit "XRechnung Format"; - ExportXRechnungDocument: Codeunit "Export XRechnung Document"; IncorrectValueErr: Label 'Incorrect value for %1', Locked = true; IsInitialized: Boolean; #region SalesInvoice + [Test] + procedure CheckSalesInvoiceInXRechnungFormatVATRegNoNotMandatoryWithCustomerReference(); + var + SalesHeader: Record "Sales Header"; + begin + // [SCENARIO] When Buyer Reference is Customer Reference, VAT Registration No. is not required if customer has E-Invoice Routing No. + Initialize(); + + // [GIVEN] Buyer Reference is Customer Reference + SetEdocumentServiceBuyerReference("E-Document Buyer Reference"::"Customer Reference"); + + // [GIVEN] Sales Invoice for a customer with E-Invoice Routing No. but without VAT Registration No. + SalesHeader.Get("Sales Document Type"::Invoice, CreateSalesDocumentWithCustomerWithoutVATRegNo("Sales Document Type"::Invoice, Enum::"Sales Line Type"::Item)); + + // [WHEN/THEN] Check does not throw an error - VAT Registration No. is not required + CheckSalesHeader(SalesHeader); + end; + [Test] procedure ExportPostedSalesInvoiceInXRechnungFormatVerifyHeaderData(); var @@ -195,7 +213,37 @@ codeunit 13918 "XRechnung XML Document Tests" ExportInvoice(SalesInvoiceHeader, TempXMLBuffer); // [THEN] XRechnung Electronic Document is created with bank informarion as payment means - VerifyPaymentMeans(TempXMLBuffer, '/ubl:Invoice/cac:PaymentMeans'); + VerifyPaymentMeans(TempXMLBuffer, '/ubl:Invoice/cac:PaymentMeans', CompanyInformation.IBAN, CompanyInformation."SWIFT Code"); + end; + + [Test] + procedure ExportPostedSalesInvoiceInXRechnungFormatVerifyBankAccountPaymentMeans(); + var + BankAccount: Record "Bank Account"; + SalesInvoiceHeader: Record "Sales Invoice Header"; + TempXMLBuffer: Record "XML Buffer" temporary; + BankAccountIBAN: Text[50]; + BankAccountSWIFT: Text[20]; + begin + // [SCENARIO 496414] Export posted sales invoice uses Bank Account IBAN and SWIFT Code when Company Bank Account Code is specified + Initialize(); + + // [GIVEN] Create Bank Account with specific IBAN and SWIFT Code + BankAccountIBAN := LibraryUtility.GenerateMOD97CompliantCode(); + BankAccountSWIFT := LibraryUtility.GenerateGUID(); + LibraryERM.CreateBankAccount(BankAccount); + BankAccount.IBAN := BankAccountIBAN; + BankAccount."SWIFT Code" := BankAccountSWIFT; + BankAccount.Modify(true); + + // [GIVEN] Create and Post Sales Invoice with Bank Account Code + SalesInvoiceHeader.Get(CreateAndPostSalesDocumentWithBankAccount("Sales Document Type"::Invoice, Enum::"Sales Line Type"::Item, BankAccount."No.")); + + // [WHEN] Export XRechnung Electronic Document. + ExportInvoice(SalesInvoiceHeader, TempXMLBuffer); + + // [THEN] XRechnung Electronic Document uses Bank Account IBAN and SWIFT Code + VerifyPaymentMeans(TempXMLBuffer, '/ubl:Invoice/cac:PaymentMeans', BankAccountIBAN, BankAccountSWIFT); end; [Test] @@ -761,7 +809,37 @@ codeunit 13918 "XRechnung XML Document Tests" // [WHEN] Export XRechnung Electronic Document. ExportCreditMemo(SalesCrMemoHeader, TempXMLBuffer); - // [THEN] XRechnung Electronic Document is created with bank informarion as payment means + // [THEN] XRechnung Electronic Document is created with payment means code + VerifyPaymentMeans(TempXMLBuffer, '/ns0:CreditNote/cac:PaymentMeans'); + end; + + [Test] + procedure ExportPostedSalesCrMemoInXRechnungFormatVerifyBankAccountPaymentMeans(); + var + BankAccount: Record "Bank Account"; + SalesCrMemoHeader: Record "Sales Cr.Memo Header"; + TempXMLBuffer: Record "XML Buffer" temporary; + BankAccountIBAN: Text[50]; + BankAccountSWIFT: Text[20]; + begin + // [SCENARIO 496414] Export posted sales cr. memo uses Bank Account IBAN and SWIFT Code when Company Bank Account Code is specified + Initialize(); + + // [GIVEN] Create Bank Account with specific IBAN and SWIFT Code + BankAccountIBAN := LibraryUtility.GenerateMOD97CompliantCode(); + BankAccountSWIFT := LibraryUtility.GenerateGUID(); + LibraryERM.CreateBankAccount(BankAccount); + BankAccount.IBAN := BankAccountIBAN; + BankAccount."SWIFT Code" := BankAccountSWIFT; + BankAccount.Modify(true); + + // [GIVEN] Create and Post sales cr. memo with Bank Account Code + SalesCrMemoHeader.Get(CreateAndPostSalesDocumentWithBankAccount("Sales Document Type"::"Credit Memo", Enum::"Sales Line Type"::Item, BankAccount."No.")); + + // [WHEN] Export XRechnung Electronic Document. + ExportCreditMemo(SalesCrMemoHeader, TempXMLBuffer); + + // [THEN] XRechnung Electronic Document has payment means code VerifyPaymentMeans(TempXMLBuffer, '/ns0:CreditNote/cac:PaymentMeans'); end; @@ -1389,14 +1467,25 @@ codeunit 13918 "XRechnung XML Document Tests" exit(LibrarySales.PostSalesDocument(SalesHeader, true, true)); end; + local procedure CreateAndPostSalesDocumentWithBankAccount(DocumentType: Enum "Sales Document Type"; LineType: Enum "Sales Line Type"; BankAccountCode: Code[20]): Code[20]; + var + SalesHeader: Record "Sales Header"; + begin + CreateSalesHeader(SalesHeader, DocumentType); + SalesHeader.Validate("Company Bank Account Code", BankAccountCode); + SalesHeader.Modify(true); + CreateSalesLine(SalesHeader, LineType, false); + exit(LibrarySales.PostSalesDocument(SalesHeader, true, true)); + end; + local procedure CreatePurchDocument(var PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Purchase Document Type") var PurchaseLine: Record "Purchase Line"; begin CreatePurchHeader(PurchaseHeader, DocumentType); LibraryPurchase.CreatePurchaseLine( - PurchaseLine, PurchaseHeader, PurchaseLine.Type::Item, LibraryInventory.CreateItemNo(), LibraryRandom.RandDecInRange(10, 20, 5)); - PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDec(50, 5)); + PurchaseLine, PurchaseHeader, PurchaseLine.Type::Item, LibraryInventory.CreateItemNo(), LibraryRandom.RandInt(10)); + PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDec(50, 2)); PurchaseLine.Modify(true); end; @@ -1467,13 +1556,18 @@ codeunit 13918 "XRechnung XML Document Tests" end; local procedure CreateSalesHeader(var SalesHeader: Record "Sales Header"; DocumentType: Enum "Sales Document Type"); + begin + CreateSalesHeader(SalesHeader, DocumentType, CreateCustomer()); + end; + + local procedure CreateSalesHeader(var SalesHeader: Record "Sales Header"; DocumentType: Enum "Sales Document Type"; CustomerNo: Code[20]); var PostCode: Record "Post Code"; PaymentTermsCode: Code[10]; begin LibraryERM.FindPostCode(PostCode); PaymentTermsCode := LibraryERM.FindPaymentTermsCode(); - LibrarySales.CreateSalesHeader(SalesHeader, DocumentType, CreateCustomer()); + LibrarySales.CreateSalesHeader(SalesHeader, DocumentType, CustomerNo); SalesHeader.Validate("Sell-to Contact", SalesHeader."No."); SalesHeader.Validate("Bill-to Address", LibraryUtility.GenerateGUID()); SalesHeader.Validate("Bill-to City", PostCode.City); @@ -1495,6 +1589,7 @@ codeunit 13918 "XRechnung XML Document Tests" Customer.Validate("Country/Region Code", CompanyInformation."Country/Region Code"); Customer.Validate("VAT Registration No.", CompanyInformation."VAT Registration No."); Customer.Validate("E-Invoice Routing No.", LibraryUtility.GenerateRandomText(20)); + Customer.Validate("E-Mail", LibraryUtility.GenerateRandomEmail()); Customer.Modify(true); exit(Customer."No.") end; @@ -1522,8 +1617,8 @@ codeunit 13918 "XRechnung XML Document Tests" UnitOfMeasure."International Standard Code" := LibraryUtility.GenerateGUID(); UnitOfMeasure.Modify(true); LibrarySales.CreateSalesLine( - SalesLine, SalesHeader, LineType, LibraryInventory.CreateItemNo(), LibraryRandom.RandDecInRange(10, 20, 5)); - SalesLine.Validate("Unit Price", LibraryRandom.RandDecInRange(100, 200, 5)); + SalesLine, SalesHeader, LineType, LibraryInventory.CreateItemNo(), LibraryRandom.RandDecInRange(10, 20, 2)); + SalesLine.Validate("Unit Price", LibraryRandom.RandDecInRange(100, 200, 2)); SalesLine.Validate("Unit of Measure", UnitOfMeasure.Code); SalesLine.Validate("Tax Category", LibraryRandom.RandText(2)); if LineDiscount then @@ -1638,6 +1733,19 @@ codeunit 13918 "XRechnung XML Document Tests" ExportXRechnungFormat.Check(SourceDocumentHeader, EDocumentService, "E-Document Processing Phase"::Release); end; + local procedure CreateSalesDocumentWithCustomerWithoutVATRegNo(DocumentType: Enum "Sales Document Type"; LineType: Enum "Sales Line Type"): Code[20]; + var + Customer: Record Customer; + SalesHeader: Record "Sales Header"; + begin + Customer.Get(CreateCustomer()); + Customer."VAT Registration No." := ''; + Customer.Modify(true); + CreateSalesHeader(SalesHeader, DocumentType, Customer."No."); + CreateSalesLine(SalesHeader, LineType, false); + exit(SalesHeader."No."); + end; + local procedure ExportInvoice(SalesInvoiceHeader: Record "Sales Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary); var SalesInvoiceLine: Record "Sales Invoice Line"; @@ -1852,7 +1960,20 @@ codeunit 13918 "XRechnung XML Document Tests" Path: Text; begin Path := DocumentTok + '/cbc:PaymentMeansCode'; - Assert.AreEqual('68', GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual('58', GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + end; + + local procedure VerifyPaymentMeans(var TempXMLBuffer: Record "XML Buffer" temporary; DocumentTok: Text; ExpectedIBAN: Text; ExpectedSWIFT: Text); + var + Path: Text; + begin + VerifyPaymentMeans(TempXMLBuffer, DocumentTok); + Path := DocumentTok + '/cac:PayeeFinancialAccount/cbc:ID'; + Assert.AreEqual(ExpectedIBAN, GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + if ExpectedSWIFT <> '' then begin + Path := DocumentTok + '/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:ID'; + Assert.AreEqual(ExpectedSWIFT, GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + end; end; local procedure VerifyPaymentTerms(PaymentTermsCode: Code[10]; var TempXMLBuffer: Record "XML Buffer" temporary; DocumentTok: Text); @@ -1871,7 +1992,7 @@ codeunit 13918 "XRechnung XML Document Tests" Path: Text; begin Path := DocumentTaxTotalTok + '/cbc:TaxAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(GetTotalTaxAmount(SalesInvoiceHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(GetTotalTaxAmount(SalesInvoiceHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyTaxTotals(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -1880,7 +2001,7 @@ codeunit 13918 "XRechnung XML Document Tests" Path: Text; begin Path := DocumentTaxTotalsTok + '/cbc:TaxAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(GetTotalTaxAmount(SalesCrMemoHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(GetTotalTaxAmount(SalesCrMemoHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyTaxTotals(ServiceInvoiceHeader: Record "Service Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -1889,7 +2010,7 @@ codeunit 13918 "XRechnung XML Document Tests" Path: Text; begin Path := ServiceDocumentTaxTotalTok + '/cbc:TaxAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(GetTotalTaxAmount(ServiceInvoiceHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(GetTotalTaxAmount(ServiceInvoiceHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyTaxTotals(ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -1898,7 +2019,7 @@ codeunit 13918 "XRechnung XML Document Tests" Path: Text; begin Path := ServiceDocumentTaxTotalsTok + '/cbc:TaxAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(GetTotalTaxAmount(ServiceCrMemoHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(GetTotalTaxAmount(ServiceCrMemoHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyLegalMonetaryTotal(SalesInvoiceHeader: Record "Sales Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -1909,13 +2030,13 @@ codeunit 13918 "XRechnung XML Document Tests" begin CalculateLineAmounts(SalesInvoiceHeader, LineAmounts); Path := DocumentLegalMonetaryTotalTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalTok + '/cbc:TaxExclusiveAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalTok + '/cbc:TaxInclusiveAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalTok + '/cbc:PayableAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyLegalMonetaryTotal(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -1926,13 +2047,13 @@ codeunit 13918 "XRechnung XML Document Tests" begin CalculateLineAmounts(SalesCrMemoHeader, LineAmounts); Path := DocumentLegalMonetaryTotalsTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalsTok + '/cbc:TaxExclusiveAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalsTok + '/cbc:TaxInclusiveAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalsTok + '/cbc:PayableAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyLegalMonetaryTotal(ServiceInvoiceHeader: Record "Service Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -1943,13 +2064,13 @@ codeunit 13918 "XRechnung XML Document Tests" begin CalculateLineAmounts(ServiceInvoiceHeader, LineAmounts); Path := ServiceDocumentLegalMonetaryTotalTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalTok + '/cbc:TaxExclusiveAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalTok + '/cbc:TaxInclusiveAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalTok + '/cbc:PayableAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyLegalMonetaryTotal(ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -1960,13 +2081,13 @@ codeunit 13918 "XRechnung XML Document Tests" begin CalculateLineAmounts(ServiceCrMemoHeader, LineAmounts); Path := ServiceDocumentLegalMonetaryTotalsTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalsTok + '/cbc:TaxExclusiveAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalsTok + '/cbc:TaxInclusiveAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalsTok + '/cbc:PayableAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyInvoiceLine(SalesInvoiceHeader: Record "Sales Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -2000,15 +2121,15 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:ID'; Assert.AreEqual(Format(ServiceInvoiceLine."Line No."), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:InvoicedQuantity'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(ServiceInvoiceLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceInvoiceLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(ServiceInvoiceLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceInvoiceLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cbc:Name'; Assert.AreEqual(ServiceInvoiceLine."Description", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:SellersItemIdentification/cbc:ID'; Assert.AreEqual(ServiceInvoiceLine."No.", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Price/cbc:PriceAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(ServiceInvoiceLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceInvoiceLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifySecondServiceInvoiceLine(ServiceInvoiceLine: Record "Service Invoice Line"; var TempXMLBuffer: Record "XML Buffer" temporary; DocumentTok: Text) @@ -2018,15 +2139,15 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:ID'; Assert.AreEqual(Format(ServiceInvoiceLine."Line No."), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:InvoicedQuantity'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(ServiceInvoiceLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceInvoiceLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(ServiceInvoiceLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceInvoiceLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cbc:Name'; Assert.AreEqual(ServiceInvoiceLine."Description", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:SellersItemIdentification/cbc:ID'; Assert.AreEqual(ServiceInvoiceLine."No.", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Price/cbc:PriceAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(ServiceInvoiceLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceInvoiceLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyServiceCrMemoLine(ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -2048,15 +2169,15 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:ID'; Assert.AreEqual(Format(ServiceCrMemoLine."Line No."), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:CreditedQuantity '; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(ServiceCrMemoLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceCrMemoLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(ServiceCrMemoLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceCrMemoLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cbc:Name'; Assert.AreEqual(ServiceCrMemoLine."Description", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:SellersItemIdentification/cbc:ID'; Assert.AreEqual(ServiceCrMemoLine."No.", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Price/cbc:PriceAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(ServiceCrMemoLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceCrMemoLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifySecondServiceCrMemoLine(ServiceCrMemoLine: Record "Service Cr.Memo Line"; var TempXMLBuffer: Record "XML Buffer" temporary; DocumentTok: Text) @@ -2066,15 +2187,15 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:ID'; Assert.AreEqual(Format(ServiceCrMemoLine."Line No."), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:CreditedQuantity '; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(ServiceCrMemoLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceCrMemoLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(ServiceCrMemoLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceCrMemoLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cbc:Name'; Assert.AreEqual(ServiceCrMemoLine."Description", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:SellersItemIdentification/cbc:ID'; Assert.AreEqual(ServiceCrMemoLine."No.", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Price/cbc:PriceAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(ServiceCrMemoLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceCrMemoLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyFirstInvoiceLine(SalesInvoiceLine: Record "Sales Invoice Line"; var TempXMLBuffer: Record "XML Buffer" temporary; DocumentTok: Text); @@ -2084,15 +2205,15 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:ID'; Assert.AreEqual(Format(SalesInvoiceLine."Line No."), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:InvoicedQuantity'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(SalesInvoiceLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesInvoiceLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cbc:Name'; Assert.AreEqual(SalesInvoiceLine."Description", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:SellersItemIdentification/cbc:ID'; Assert.AreEqual(SalesInvoiceLine."No.", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Price/cbc:PriceAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(SalesInvoiceLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesInvoiceLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:ClassifiedTaxCategory/cbc:ID'; Assert.AreEqual(SalesInvoiceLine."Tax Category", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:InvoicePeriod/cbc:StartDate'; @@ -2108,15 +2229,15 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:ID'; Assert.AreEqual(Format(SalesInvoiceLine."Line No."), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:InvoicedQuantity'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(SalesInvoiceLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesInvoiceLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cbc:Name'; Assert.AreEqual(SalesInvoiceLine."Description", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:SellersItemIdentification/cbc:ID'; Assert.AreEqual(SalesInvoiceLine."No.", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Price/cbc:PriceAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(SalesInvoiceLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesInvoiceLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:ClassifiedTaxCategory/cbc:ID'; Assert.AreEqual(SalesInvoiceLine."Tax Category", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:InvoicePeriod/cbc:StartDate'; @@ -2136,11 +2257,11 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:AllowanceChargeReason'; Assert.AreEqual('LineDiscount', GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:MultiplierFactorNumeric'; - Assert.AreEqual(ExportXRechnungDocument.FormatFiveDecimal(SalesInvoiceLine."Line Discount %"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFiveDecimal(SalesInvoiceLine."Line Discount %"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:Amount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesInvoiceLine."Line Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceLine."Line Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:BaseAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesInvoiceLine."Unit Price" * SalesInvoiceLine.Quantity), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceLine."Unit Price" * SalesInvoiceLine.Quantity), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyInvoiceWithInvDiscount(SalesInvoiceHeader: Record "Sales Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -2152,11 +2273,11 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:AllowanceChargeReason'; Assert.AreEqual('Document discount', GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:MultiplierFactorNumeric'; - Assert.AreEqual(ExportXRechnungDocument.FormatFiveDecimal(100 * SalesInvoiceHeader."Invoice Discount Amount" / (SalesInvoiceHeader."Invoice Discount Amount" + SalesInvoiceHeader.Amount)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFiveDecimal(100 * SalesInvoiceHeader."Invoice Discount Amount" / (SalesInvoiceHeader."Invoice Discount Amount" + SalesInvoiceHeader.Amount)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:Amount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesInvoiceHeader."Invoice Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceHeader."Invoice Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:BaseAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesInvoiceHeader."Invoice Discount Amount" + SalesInvoiceHeader.Amount), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceHeader."Invoice Discount Amount" + SalesInvoiceHeader.Amount), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyCrMemoLine(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -2178,15 +2299,15 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:ID'; Assert.AreEqual(Format(SalesCrMemoLine."Line No."), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:CreditedQuantity '; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(SalesCrMemoLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesCrMemoLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cbc:Name'; Assert.AreEqual(SalesCrMemoLine."Description", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:SellersItemIdentification/cbc:ID'; Assert.AreEqual(SalesCrMemoLine."No.", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Price/cbc:PriceAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(SalesCrMemoLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesCrMemoLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:ClassifiedTaxCategory/cbc:ID'; Assert.AreEqual(SalesCrMemoLine."Tax Category", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:InvoicePeriod/cbc:StartDate'; @@ -2202,15 +2323,15 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:ID'; Assert.AreEqual(Format(SalesCrMemoLine."Line No."), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:CreditedQuantity '; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(SalesCrMemoLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:LineExtensionAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesCrMemoLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cbc:Name'; Assert.AreEqual(SalesCrMemoLine."Description", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:SellersItemIdentification/cbc:ID'; Assert.AreEqual(SalesCrMemoLine."No.", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Price/cbc:PriceAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimalUnlimited(SalesCrMemoLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesCrMemoLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:Item/cac:ClassifiedTaxCategory/cbc:ID'; Assert.AreEqual(SalesCrMemoLine."Tax Category", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cac:InvoicePeriod/cbc:StartDate'; @@ -2230,11 +2351,11 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:AllowanceChargeReason'; Assert.AreEqual('LineDiscount', GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:MultiplierFactorNumeric'; - Assert.AreEqual(ExportXRechnungDocument.FormatFiveDecimal(SalesCrMemoLine."Line Discount %"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFiveDecimal(SalesCrMemoLine."Line Discount %"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:Amount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesCrMemoLine."Line Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoLine."Line Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:BaseAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesCrMemoLine."Unit Price" * SalesCrMemoLine.Quantity), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoLine."Unit Price" * SalesCrMemoLine.Quantity), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyCrMemoWithInvDiscount(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -2246,11 +2367,11 @@ codeunit 13918 "XRechnung XML Document Tests" Path := DocumentTok + '/cbc:AllowanceChargeReason'; Assert.AreEqual('Document discount', GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:MultiplierFactorNumeric'; - Assert.AreEqual(ExportXRechnungDocument.FormatFiveDecimal(100 * SalesCrMemoHeader."Invoice Discount Amount" / (SalesCrMemoHeader."Invoice Discount Amount" + SalesCrMemoHeader.Amount)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFiveDecimal(100 * SalesCrMemoHeader."Invoice Discount Amount" / (SalesCrMemoHeader."Invoice Discount Amount" + SalesCrMemoHeader.Amount)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:Amount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesCrMemoHeader."Invoice Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoHeader."Invoice Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/cbc:BaseAmount'; - Assert.AreEqual(ExportXRechnungDocument.FormatDecimal(SalesCrMemoHeader."Invoice Discount Amount" + SalesCrMemoHeader.Amount), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoHeader."Invoice Discount Amount" + SalesCrMemoHeader.Amount), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyInvoicePDFEmbeddedToXML(var TempXMLBuffer: Record "XML Buffer" temporary) @@ -2497,6 +2618,21 @@ codeunit 13918 "XRechnung XML Document Tests" exit(Format(VarDate, 0, '--')); end; + local procedure FormatDecimal(VarDecimal: Decimal): Text[30]; + begin + exit(Format(Round(VarDecimal, 0.01), 0, 9)); + end; + + procedure FormatFourDecimal(VarDecimal: Decimal): Text[30]; + begin + exit(Format(Round(VarDecimal, 0.0001), 0, 9)); + end; + + procedure FormatFiveDecimal(VarDecimal: Decimal): Text[30]; + begin + exit(Format(Round(VarDecimal, 0.00001), 0, 9)); + end; + local procedure Initialize(); begin LibraryTestInitialize.OnTestInitialize(Codeunit::"XRechnung XML Document Tests"); @@ -2507,7 +2643,6 @@ codeunit 13918 "XRechnung XML Document Tests" CompanyInformation.Get(); CompanyInformation.IBAN := LibraryUtility.GenerateMOD97CompliantCode(); CompanyInformation."SWIFT Code" := LibraryUtility.GenerateGUID(); - CompanyInformation."E-Mail" := LibraryUtility.GenerateRandomEmail(); CompanyInformation.Modify(); GeneralLedgerSetup.Get(); EDocumentService.DeleteAll(); diff --git a/Apps/DE/EDocumentDE/test/src/ZUGFeRDXMLDocumentTests.Codeunit.al b/Apps/DE/EDocumentDE/test/src/ZUGFeRDXMLDocumentTests.Codeunit.al index ba351e8eed..c10315bae6 100644 --- a/Apps/DE/EDocumentDE/test/src/ZUGFeRDXMLDocumentTests.Codeunit.al +++ b/Apps/DE/EDocumentDE/test/src/ZUGFeRDXMLDocumentTests.Codeunit.al @@ -24,6 +24,7 @@ using Microsoft.Service.Document; using Microsoft.Service.History; using Microsoft.Service.Test; using System.IO; +using System.Reflection; using System.Utilities; codeunit 13922 "ZUGFeRD XML Document Tests" @@ -51,11 +52,28 @@ codeunit 13922 "ZUGFeRD XML Document Tests" LibraryEdocument: Codeunit "Library - E-Document"; Assert: Codeunit Assert; ZUGFeRDFormat: Codeunit "ZUGFeRD Format"; - ExportZUGFeRDDocument: Codeunit "Export ZUGFeRD Document"; IncorrectValueErr: Label 'Incorrect value for %1', Locked = true; IsInitialized: Boolean; #region SalesInvoice + [Test] + procedure CheckSalesInvoiceInZUGFeRDFormatVATRegNoNotMandatoryWithCustomerReference(); + var + SalesHeader: Record "Sales Header"; + begin + // [SCENARIO] When Buyer Reference is Customer Reference, VAT Registration No. is not required if customer has E-Invoice Routing No. + Initialize(); + + // [GIVEN] Buyer Reference is Customer Reference + SetEdocumentServiceBuyerReference("E-Document Buyer Reference"::"Customer Reference"); + + // [GIVEN] Sales Invoice for a customer with E-Invoice Routing No. but without VAT Registration No. + SalesHeader.Get("Sales Document Type"::Invoice, CreateSalesDocumentWithCustomerWithoutVATRegNo("Sales Document Type"::Invoice, Enum::"Sales Line Type"::Item)); + + // [WHEN/THEN] Check does not throw an error - VAT Registration No. is not required + CheckSalesHeader(SalesHeader); + end; + [Test] procedure ExportPostedSalesInvoiceInZUGFeRDFormatVerifyHeaderData(); var @@ -367,6 +385,7 @@ codeunit 13922 "ZUGFeRD XML Document Tests" procedure PrintPostedSalesInvoiceWithCustomReportLayout(); var SalesInvoiceHeader: Record "Sales Invoice Header"; + ExportZUGFeRDDocument: Codeunit "Export ZUGFeRD Document"; PDFDocument: Codeunit "PDF Document"; PDFTempBlob: Codeunit "Temp Blob"; TempBlob: Codeunit "Temp Blob"; @@ -1402,8 +1421,8 @@ codeunit 13922 "ZUGFeRD XML Document Tests" begin CreatePurchHeader(PurchaseHeader, DocumentType); LibraryPurchase.CreatePurchaseLine( - PurchaseLine, PurchaseHeader, PurchaseLine.Type::Item, LibraryInventory.CreateItemNo(), LibraryRandom.RandDecInRange(10, 20, 5)); - PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDec(50, 5)); + PurchaseLine, PurchaseHeader, PurchaseLine.Type::Item, LibraryInventory.CreateItemNo(), LibraryRandom.RandInt(10)); + PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDec(50, 2)); PurchaseLine.Modify(true); end; @@ -1474,6 +1493,11 @@ codeunit 13922 "ZUGFeRD XML Document Tests" end; local procedure CreateSalesHeader(var SalesHeader: Record "Sales Header"; DocumentType: Enum "Sales Document Type"); + begin + CreateSalesHeader(SalesHeader, DocumentType, CreateCustomer()); + end; + + local procedure CreateSalesHeader(var SalesHeader: Record "Sales Header"; DocumentType: Enum "Sales Document Type"; CustomerNo: Code[20]); var PostCode: Record "Post Code"; PaymentMethod: Record "Payment Method"; @@ -1482,7 +1506,7 @@ codeunit 13922 "ZUGFeRD XML Document Tests" LibraryERM.FindPostCode(PostCode); PaymentTermsCode := LibraryERM.FindPaymentTermsCode(); LibraryERM.FindPaymentMethod(PaymentMethod); - LibrarySales.CreateSalesHeader(SalesHeader, DocumentType, CreateCustomer()); + LibrarySales.CreateSalesHeader(SalesHeader, DocumentType, CustomerNo); SalesHeader.Validate("Sell-to Contact", SalesHeader."No."); SalesHeader.Validate("Bill-to Address", LibraryUtility.GenerateGUID()); SalesHeader.Validate("Bill-to City", PostCode.City); @@ -1534,12 +1558,12 @@ codeunit 13922 "ZUGFeRD XML Document Tests" UnitOfMeasure."International Standard Code" := LibraryUtility.GenerateGUID(); UnitOfMeasure.Modify(true); LibrarySales.CreateSalesLine( - SalesLine, SalesHeader, LineType, LibraryInventory.CreateItemNo(), LibraryRandom.RandDecInRange(10, 20, 5)); - SalesLine.Validate("Unit Price", LibraryRandom.RandDecInRange(100, 200, 5)); + SalesLine, SalesHeader, LineType, LibraryInventory.CreateItemNo(), LibraryRandom.RandDecInRange(10, 20, 2)); + SalesLine.Validate("Unit Price", LibraryRandom.RandDecInRange(100, 200, 2)); SalesLine.Validate("Unit of Measure", UnitOfMeasure.Code); SalesLine.Validate("Tax Category", LibraryRandom.RandText(2)); if LineDiscount then - SalesLine.Validate("Line Discount %", LibraryRandom.RandDecInRange(10, 20, 5)); + SalesLine.Validate("Line Discount %", LibraryRandom.RandDecInRange(10, 20, 2)); SalesLine.Modify(true); end; @@ -1650,6 +1674,19 @@ codeunit 13922 "ZUGFeRD XML Document Tests" ZUGFeRDFormat.Check(SourceDocumentHeader, EDocumentService, "E-Document Processing Phase"::Release); end; + local procedure CreateSalesDocumentWithCustomerWithoutVATRegNo(DocumentType: Enum "Sales Document Type"; LineType: Enum "Sales Line Type"): Code[20]; + var + Customer: Record Customer; + SalesHeader: Record "Sales Header"; + begin + Customer.Get(CreateCustomer()); + Customer."VAT Registration No." := ''; + Customer.Modify(true); + CreateSalesHeader(SalesHeader, DocumentType, Customer."No."); + CreateSalesLine(SalesHeader, LineType, false); + exit(SalesHeader."No."); + end; + local procedure ExportInvoice(SalesInvoiceHeader: Record "Sales Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary); var SalesInvoiceLine: Record "Sales Invoice Line"; @@ -1920,7 +1957,7 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path: Text; begin Path := DocumentTaxTotalTok + '/ram:CalculatedAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(GetTotalTaxAmount(SalesInvoiceHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(GetTotalTaxAmount(SalesInvoiceHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyTaxTotals(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -1929,7 +1966,7 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path: Text; begin Path := DocumentTaxTotalsTok + '/ram:CalculatedAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(GetTotalTaxAmount(SalesCrMemoHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(GetTotalTaxAmount(SalesCrMemoHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyTaxTotals(ServiceInvoiceHeader: Record "Service Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -1938,7 +1975,7 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path: Text; begin Path := ServiceDocumentTaxTotalTok + '/ram:CalculatedAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(GetTotalTaxAmount(ServiceInvoiceHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(GetTotalTaxAmount(ServiceInvoiceHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyTaxTotals(ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -1947,7 +1984,7 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path: Text; begin Path := ServiceDocumentTaxTotalsTok + '/ram:CalculatedAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(GetTotalTaxAmount(ServiceCrMemoHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(GetTotalTaxAmount(ServiceCrMemoHeader)), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyLegalMonetaryTotal(SalesInvoiceHeader: Record "Sales Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -1958,13 +1995,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" begin CalculateLineAmounts(SalesInvoiceHeader, LineAmounts); Path := DocumentLegalMonetaryTotalTok + '/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalTok + '/ram:TaxBasisTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalTok + '/ram:GrandTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalTok + '/ram:DuePayableAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyLegalMonetaryTotal(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -1975,13 +2012,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" begin CalculateLineAmounts(SalesCrMemoHeader, LineAmounts); Path := DocumentLegalMonetaryTotalsTok + '/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalsTok + '/ram:TaxBasisTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalsTok + '/ram:GrandTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentLegalMonetaryTotalsTok + '/ram:DuePayableAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(SalesCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyLegalMonetaryTotal(ServiceInvoiceHeader: Record "Service Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -1992,13 +2029,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" begin CalculateLineAmounts(ServiceInvoiceHeader, LineAmounts); Path := ServiceDocumentLegalMonetaryTotalTok + '/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalTok + '/ram:TaxBasisTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalTok + '/ram:GrandTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalTok + '/ram:DuePayableAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceInvoiceHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyLegalMonetaryTotal(ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -2009,13 +2046,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" begin CalculateLineAmounts(ServiceCrMemoHeader, LineAmounts); Path := ServiceDocumentLegalMonetaryTotalsTok + '/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalsTok + '/ram:TaxBasisTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName(Amount))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalsTok + '/ram:GrandTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := ServiceDocumentLegalMonetaryTotalsTok + '/ram:DuePayableAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(LineAmounts.Get(ServiceCrMemoHeader.FieldName("Amount Including VAT"))), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyInvoiceLine(SalesInvoiceHeader: Record "Sales Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -2037,13 +2074,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:AssociatedDocumentLineDocument/ram:LineID'; Assert.AreEqual(Format(SalesInvoiceLine."Line No."), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(SalesInvoiceLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesInvoiceLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(SalesInvoiceLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedTradeProduct/ram:Name'; Assert.AreEqual(SalesInvoiceLine."Description", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(SalesInvoiceLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesInvoiceLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode'; Assert.AreEqual(SalesInvoiceLine."Tax Category", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString'; @@ -2059,13 +2096,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:AssociatedDocumentLineDocument/ram:LineID'; Assert.AreEqual(Format(SalesInvoiceLine."Line No."), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(SalesInvoiceLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesInvoiceLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(SalesInvoiceLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedTradeProduct/ram:Name'; Assert.AreEqual(SalesInvoiceLine."Description", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(SalesInvoiceLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesInvoiceLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode'; Assert.AreEqual(SalesInvoiceLine."Tax Category", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString'; @@ -2085,7 +2122,7 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:Reason'; Assert.AreEqual('Line Discount', GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:ActualAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(SalesInvoiceLine."Line Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceLine."Line Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyInvoiceWithInvDiscount(SalesInvoiceHeader: Record "Sales Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -2097,7 +2134,7 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:Reason'; Assert.AreEqual('Document discount', GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:ActualAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(SalesInvoiceHeader."Invoice Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesInvoiceHeader."Invoice Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyCrMemoLine(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -2119,13 +2156,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:AssociatedDocumentLineDocument/ram:LineID'; Assert.AreEqual(Format(SalesCrMemoLine."Line No."), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(SalesCrMemoLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesCrMemoLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(SalesCrMemoLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedTradeProduct/ram:Name'; Assert.AreEqual(SalesCrMemoLine."Description", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(SalesCrMemoLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesCrMemoLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode'; Assert.AreEqual(SalesCrMemoLine."Tax Category", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString'; @@ -2141,13 +2178,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:AssociatedDocumentLineDocument/ram:LineID'; Assert.AreEqual(Format(SalesCrMemoLine."Line No."), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(SalesCrMemoLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesCrMemoLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(SalesCrMemoLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedTradeProduct/ram:Name'; Assert.AreEqual(SalesCrMemoLine."Description", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(SalesCrMemoLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(SalesCrMemoLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode'; Assert.AreEqual(SalesCrMemoLine."Tax Category", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString'; @@ -2167,7 +2204,7 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:Reason'; Assert.AreEqual('Line Discount', GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:ActualAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(SalesCrMemoLine."Line Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoLine."Line Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyCrMemoWithInvDiscount(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary); @@ -2179,7 +2216,7 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:Reason'; Assert.AreEqual('Document discount', GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:ActualAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(SalesCrMemoHeader."Invoice Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(SalesCrMemoHeader."Invoice Discount Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyServiceInvoiceLine(ServiceInvoiceHeader: Record "Service Invoice Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -2201,13 +2238,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:AssociatedDocumentLineDocument/ram:LineID'; Assert.AreEqual(Format(ServiceInvoiceLine."Line No."), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(ServiceInvoiceLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceInvoiceLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(ServiceInvoiceLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceInvoiceLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedTradeProduct/ram:Name'; Assert.AreEqual(ServiceInvoiceLine."Description", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(ServiceInvoiceLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceInvoiceLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifySecondServiceInvoiceLine(ServiceInvoiceLine: Record "Service Invoice Line"; var TempXMLBuffer: Record "XML Buffer" temporary; DocumentTok: Text) @@ -2217,13 +2254,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:AssociatedDocumentLineDocument/ram:LineID'; Assert.AreEqual(Format(ServiceInvoiceLine."Line No."), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(ServiceInvoiceLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceInvoiceLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(ServiceInvoiceLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceInvoiceLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedTradeProduct/ram:Name'; Assert.AreEqual(ServiceInvoiceLine."Description", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(ServiceInvoiceLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceInvoiceLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifyServiceCrMemoLine(ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var TempXMLBuffer: Record "XML Buffer" temporary) @@ -2245,13 +2282,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:AssociatedDocumentLineDocument/ram:LineID'; Assert.AreEqual(Format(ServiceCrMemoLine."Line No."), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(ServiceCrMemoLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceCrMemoLine."Quantity"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(ServiceCrMemoLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceCrMemoLine."Amount"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedTradeProduct/ram:Name'; Assert.AreEqual(ServiceCrMemoLine."Description", GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(ServiceCrMemoLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceCrMemoLine."Unit Price"), GetNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure VerifySecondServiceCrMemoLine(ServiceCrMemoLine: Record "Service Cr.Memo Line"; var TempXMLBuffer: Record "XML Buffer" temporary; DocumentTok: Text) @@ -2261,13 +2298,13 @@ codeunit 13922 "ZUGFeRD XML Document Tests" Path := DocumentTok + '/ram:AssociatedDocumentLineDocument/ram:LineID'; Assert.AreEqual(Format(ServiceCrMemoLine."Line No."), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(ServiceCrMemoLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceCrMemoLine."Quantity"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimal(ServiceCrMemoLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatDecimal(ServiceCrMemoLine."Amount"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedTradeProduct/ram:Name'; Assert.AreEqual(ServiceCrMemoLine."Description", GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); Path := DocumentTok + '/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount'; - Assert.AreEqual(ExportZUGFeRDDocument.FormatDecimalUnlimited(ServiceCrMemoLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); + Assert.AreEqual(FormatFourDecimal(ServiceCrMemoLine."Unit Price"), GetLastNodeByPathWithError(TempXMLBuffer, Path), StrSubstNo(IncorrectValueErr, Path)); end; local procedure GetCurrencyCode(CurrencyCode: Code[10]): Code[10]; @@ -2500,6 +2537,18 @@ codeunit 13922 "ZUGFeRD XML Document Tests" exit(Format(VarDate, 0, '')); end; + procedure FormatDecimal(VarDecimal: Decimal): Text + var + TypeHelper: Codeunit "Type Helper"; + begin + exit(Format(VarDecimal, 0, TypeHelper.GetXMLAmountFormatWithTwoDecimalPlaces())); + end; + + procedure FormatFourDecimal(VarDecimal: Decimal): Text + begin + exit(Format(VarDecimal, 0, '')) + end; + local procedure Initialize(); begin LibraryTestInitialize.OnTestInitialize(Codeunit::"ZUGFeRD XML Document Tests"); @@ -2508,10 +2557,6 @@ codeunit 13922 "ZUGFeRD XML Document Tests" LibraryTestInitialize.OnBeforeTestSuiteInitialize(Codeunit::"ZUGFeRD XML Document Tests"); IsInitialized := true; CompanyInformation.Get(); - CompanyInformation.IBAN := LibraryUtility.GenerateMOD97CompliantCode(); - CompanyInformation."SWIFT Code" := LibraryUtility.GenerateGUID(); - CompanyInformation."E-Mail" := LibraryUtility.GenerateRandomEmail(); - CompanyInformation.Modify(); GeneralLedgerSetup.Get(); EDocumentService.DeleteAll(); EDocumentService.Get(LibraryEdocument.CreateService("E-Document Format"::ZUGFeRD, "Service Integration"::"No Integration")); diff --git a/Apps/DE/Elster/app/app.json b/Apps/DE/Elster/app/app.json index d41514c637..7f7d51af03 100644 --- a/Apps/DE/Elster/app/app.json +++ b/Apps/DE/Elster/app/app.json @@ -18,7 +18,7 @@ "allowDownloadingSource": true, "includeSourceInSymbolFile": true }, - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "application": "29.0.0.0" } diff --git a/Apps/DE/Elster/test/app.json b/Apps/DE/Elster/test/app.json index d70a84bee6..f5a3a13ff9 100644 --- a/Apps/DE/Elster/test/app.json +++ b/Apps/DE/Elster/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/DE/HybridBCLast_DE/app/app.json b/Apps/DE/HybridBCLast_DE/app/app.json index 2270cfdf50..212bd72e84 100644 --- a/Apps/DE/HybridBCLast_DE/app/app.json +++ b/Apps/DE/HybridBCLast_DE/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/DE/IntrastatDE/app/app.json b/Apps/DE/IntrastatDE/app/app.json index 9aa70459f9..a359a07091 100644 --- a/Apps/DE/IntrastatDE/app/app.json +++ b/Apps/DE/IntrastatDE/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 11029, diff --git a/Apps/DK/C52012DataMigration/app/app.json b/Apps/DK/C52012DataMigration/app/app.json index 5de0130a0c..f781c18c64 100644 --- a/Apps/DK/C52012DataMigration/app/app.json +++ b/Apps/DK/C52012DataMigration/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/DK/C52012DataMigration/test/app.json b/Apps/DK/C52012DataMigration/test/app.json index 2374d4944a..7b0f952966 100644 --- a/Apps/DK/C52012DataMigration/test/app.json +++ b/Apps/DK/C52012DataMigration/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/app.json b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/app.json index e22cb9fd45..1b3c280481 100644 --- a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/app.json +++ b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/DK/DKCore/app/app.json b/Apps/DK/DKCore/app/app.json index 87a14fddf8..89f4c50c46 100644 --- a/Apps/DK/DKCore/app/app.json +++ b/Apps/DK/DKCore/app/app.json @@ -13,7 +13,7 @@ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2208127", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/DK/DKCore/test/app.json b/Apps/DK/DKCore/test/app.json index a65c86df29..0b56b86aa4 100644 --- a/Apps/DK/DKCore/test/app.json +++ b/Apps/DK/DKCore/test/app.json @@ -43,7 +43,7 @@ "allowDownloadingSource": true, "includeSourceInSymbolFile": true }, - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "target": "OnPrem" } diff --git a/Apps/DK/EDocumentFormatOIOUBL/app/app.json b/Apps/DK/EDocumentFormatOIOUBL/app/app.json index cd72ee1c5d..501865edea 100644 --- a/Apps/DK/EDocumentFormatOIOUBL/app/app.json +++ b/Apps/DK/EDocumentFormatOIOUBL/app/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 13910, diff --git a/Apps/DK/EDocument_DK/demo data/app.json b/Apps/DK/EDocument_DK/demo data/app.json index defc9578c6..1481a394cc 100644 --- a/Apps/DK/EDocument_DK/demo data/app.json +++ b/Apps/DK/EDocument_DK/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/DK/ElectronicVATDeclarationDK/app/app.json b/Apps/DK/ElectronicVATDeclarationDK/app/app.json index 19e40be9d0..3aee0aaa11 100644 --- a/Apps/DK/ElectronicVATDeclarationDK/app/app.json +++ b/Apps/DK/ElectronicVATDeclarationDK/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/DK/ElectronicVATDeclarationDK/test/app.json b/Apps/DK/ElectronicVATDeclarationDK/test/app.json index 3fa4023211..4b5f1ec36b 100644 --- a/Apps/DK/ElectronicVATDeclarationDK/test/app.json +++ b/Apps/DK/ElectronicVATDeclarationDK/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/DK/EnforcedDigitalVouchersDK/app/app.json b/Apps/DK/EnforcedDigitalVouchersDK/app/app.json index 8df40aea36..972f42b695 100644 --- a/Apps/DK/EnforcedDigitalVouchersDK/app/app.json +++ b/Apps/DK/EnforcedDigitalVouchersDK/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/DK/EnforcedDigitalVouchersDK/test/app.json b/Apps/DK/EnforcedDigitalVouchersDK/test/app.json index 27f17a296d..ef1410b1dc 100644 --- a/Apps/DK/EnforcedDigitalVouchersDK/test/app.json +++ b/Apps/DK/EnforcedDigitalVouchersDK/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?LinkId=724011", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/DK/FIK/app/app.json b/Apps/DK/FIK/app/app.json index e4bf8ed572..898dafa5d1 100644 --- a/Apps/DK/FIK/app/app.json +++ b/Apps/DK/FIK/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/DK/FIK/test/app.json b/Apps/DK/FIK/test/app.json index c36117c80d..5b074361cc 100644 --- a/Apps/DK/FIK/test/app.json +++ b/Apps/DK/FIK/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/DK/ImportDKPayroll/app/app.json b/Apps/DK/ImportDKPayroll/app/app.json index 489253691e..db2df6e7b3 100644 --- a/Apps/DK/ImportDKPayroll/app/app.json +++ b/Apps/DK/ImportDKPayroll/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/DK/ImportDKPayroll/test/app.json b/Apps/DK/ImportDKPayroll/test/app.json index ffb6744a89..33e46929af 100644 --- a/Apps/DK/ImportDKPayroll/test/app.json +++ b/Apps/DK/ImportDKPayroll/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/DK/NemhandelNotification/app/app.json b/Apps/DK/NemhandelNotification/app/app.json index c26c567432..428e949ddc 100644 --- a/Apps/DK/NemhandelNotification/app/app.json +++ b/Apps/DK/NemhandelNotification/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/DK/NemhandelNotification/test/app.json b/Apps/DK/NemhandelNotification/test/app.json index ba265b0a17..c3d293425e 100644 --- a/Apps/DK/NemhandelNotification/test/app.json +++ b/Apps/DK/NemhandelNotification/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/DK/OIOUBL/app/app.json b/Apps/DK/OIOUBL/app/app.json index 863c1cc021..14a84f7058 100644 --- a/Apps/DK/OIOUBL/app/app.json +++ b/Apps/DK/OIOUBL/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/DK/OIOUBL/test/app.json b/Apps/DK/OIOUBL/test/app.json index 0dd8d04eeb..c3f55fa344 100644 --- a/Apps/DK/OIOUBL/test/app.json +++ b/Apps/DK/OIOUBL/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/DK/SAFTModificationDK/app/app.json b/Apps/DK/SAFTModificationDK/app/app.json index 319b71f69d..e2f98265d3 100644 --- a/Apps/DK/SAFTModificationDK/app/app.json +++ b/Apps/DK/SAFTModificationDK/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/DK/SAFTModificationDK/test/app.json b/Apps/DK/SAFTModificationDK/test/app.json index c76c577637..f240d14bce 100644 --- a/Apps/DK/SAFTModificationDK/test/app.json +++ b/Apps/DK/SAFTModificationDK/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/DK/VATReportsDK/app/app.json b/Apps/DK/VATReportsDK/app/app.json index b7145933ba..3caa0f57aa 100644 --- a/Apps/DK/VATReportsDK/app/app.json +++ b/Apps/DK/VATReportsDK/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/DK/VATReportsDK/test/app.json b/Apps/DK/VATReportsDK/test/app.json index 4738d525b0..99ab06a735 100644 --- a/Apps/DK/VATReportsDK/test/app.json +++ b/Apps/DK/VATReportsDK/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/app.json b/Apps/ES/ContosoCoffeeDemoDatasetES/app/app.json index fd602e5eef..e99b662303 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/app.json +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/ES/EDocumentES/demo data/app.json b/Apps/ES/EDocumentES/demo data/app.json index 9e43c06cfc..5002bbf742 100644 --- a/Apps/ES/EDocumentES/demo data/app.json +++ b/Apps/ES/EDocumentES/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10886, diff --git a/Apps/ES/EDocumentFormats/DocumentRegistration/app/app.json b/Apps/ES/EDocumentFormats/DocumentRegistration/app/app.json index 607c849310..4bcff80ec3 100644 --- a/Apps/ES/EDocumentFormats/DocumentRegistration/app/app.json +++ b/Apps/ES/EDocumentFormats/DocumentRegistration/app/app.json @@ -30,7 +30,7 @@ "TranslationFile" ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10771, diff --git a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/Verifactu.Codeunit.al b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/Verifactu.Codeunit.al index cbe32adb3f..4b979d1a94 100644 --- a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/Verifactu.Codeunit.al +++ b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/Verifactu.Codeunit.al @@ -5,6 +5,8 @@ namespace Microsoft.EServices.EDocument.Verifactu; using Microsoft.eServices.EDocument; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; using System.Utilities; codeunit 10776 "Verifactu" implements "E-Document" @@ -21,6 +23,23 @@ codeunit 10776 "Verifactu" implements "E-Document" procedure Check(var SourceDocumentHeader: RecordRef; EDocumentService: Record "E-Document Service"; EDocumentProcessingPhase: Enum "E-Document Processing Phase") begin + CheckCompanyInformation(); + end; + + procedure CheckCompanyInformation() + var + CompanyInformation: Record "Company Information"; + PostCode: Record "Post Code"; + PostCodeNotFoundErr: Label 'The Post Code %1 for City %2 from Company Information was not found.', Comment = '%1 = Post Code, %2 = City'; + TimeZoneMissingErr: Label 'The Time Zone is not specified for Post Code %1. Set up the Time Zone on the Post Codes page.', Comment = '%1 = Post Code'; + begin + CompanyInformation.Get(); + CompanyInformation.TestField("Post Code"); + CompanyInformation.TestField(City); + if not PostCode.Get(CompanyInformation."Post Code", CompanyInformation.City) then + Error(PostCodeNotFoundErr, CompanyInformation."Post Code", CompanyInformation.City); + if PostCode."Time Zone" = '' then + Error(TimeZoneMissingErr, PostCode.Code); end; procedure Create(EDocumentService: Record "E-Document Service"; var EDocument: Record "E-Document"; var SourceDocumentHeader: RecordRef; var SourceDocumentLines: RecordRef; var TempBlob: Codeunit "Temp Blob") diff --git a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al index 939c993f24..e7734d96c6 100644 --- a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al +++ b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al @@ -33,11 +33,13 @@ table 10777 "Verifactu Setup" SIISetup: Record "SII Setup"; CustomerConsentMgt: Codeunit "Customer Consent Mgt."; ConfirmMgt: Codeunit "Confirm Management"; + Verifactu: Codeunit Verifactu; VerifactuSetupConsentProvidedLbl: Label 'Verifactu Setup - consent provided by UserSecurityId %1.', Locked = true; begin if Enabled and ("Certificate Code" = '') then Error(CannotEnableWithoutCertificateErr); if Enabled then begin + Verifactu.CheckCompanyInformation(); if SIISetup.IsEnabled() then if ConfirmMgt.GetResponseOrDefault(DisableSIIQst, false) then begin SIISetup.Enabled := false; diff --git a/Apps/ES/EDocumentFormats/DocumentRegistration/test/app.json b/Apps/ES/EDocumentFormats/DocumentRegistration/test/app.json index 7e9524da59..f865c0d159 100644 --- a/Apps/ES/EDocumentFormats/DocumentRegistration/test/app.json +++ b/Apps/ES/EDocumentFormats/DocumentRegistration/test/app.json @@ -53,7 +53,7 @@ "TranslationFile" ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148003, diff --git a/Apps/ES/EDocumentFormats/DocumentRegistration/test/src/TestVerifactuSetup.Codeunit.al b/Apps/ES/EDocumentFormats/DocumentRegistration/test/src/TestVerifactuSetup.Codeunit.al index 5687af7156..ae4564bae0 100644 --- a/Apps/ES/EDocumentFormats/DocumentRegistration/test/src/TestVerifactuSetup.Codeunit.al +++ b/Apps/ES/EDocumentFormats/DocumentRegistration/test/src/TestVerifactuSetup.Codeunit.al @@ -6,6 +6,8 @@ namespace Microsoft.EServices.EDocument.Verifactu.Test; using Microsoft.EServices.EDocument; using Microsoft.EServices.EDocument.Verifactu; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; using System.Privacy; using System.Security.Encryption; @@ -16,6 +18,7 @@ codeunit 148003 "Test Verifactu Setup" var Assert: Codeunit Assert; + LibraryRandom: Codeunit "Library - Random"; IsInitialized: Boolean; DisableSIIQst: Label 'SII setup will be disabled. Do you want to proceed?'; DisableVerifactuQst: Label 'Verifactu setup will be disabled. Do you want to proceed?'; @@ -49,6 +52,9 @@ codeunit 148003 "Test Verifactu Setup" // [SCENARIO] User enables Verifactu Setup when valid certificate is configured Initialize(); + // [GIVEN] Company Information has valid Post Code with Time Zone + SetupCompanyInfoWithPostCode('Romance Standard Time'); + // [GIVEN] Verifactu Setup record exists CreateVerifactuSetup(VerifactuSetup); @@ -103,6 +109,9 @@ codeunit 148003 "Test Verifactu Setup" // [SCENARIO] IsEnabled procedure returns true when setup is enabled Initialize(); + // [GIVEN] Company Information has valid Post Code with Time Zone + SetupCompanyInfoWithPostCode('Romance Standard Time'); + // [GIVEN] Verifactu Setup record exists CreateVerifactuSetup(VerifactuSetup); @@ -155,6 +164,9 @@ codeunit 148003 "Test Verifactu Setup" // [SCENARIO] User can lookup and select certificate using drilldown Initialize(); + // [GIVEN] Company Information has valid Post Code with Time Zone + SetupCompanyInfoWithPostCode('Romance Standard Time'); + // [GIVEN] Verifactu Setup record exists CreateVerifactuSetup(VerifactuSetup); @@ -182,6 +194,9 @@ codeunit 148003 "Test Verifactu Setup" // [SCENARIO] Setup remains disabled when user declines consent Initialize(); + // [GIVEN] Company Information has valid Post Code with Time Zone + SetupCompanyInfoWithPostCode('Romance Standard Time'); + // [GIVEN] Verifactu Setup record exists CreateVerifactuSetup(VerifactuSetup); @@ -213,6 +228,9 @@ codeunit 148003 "Test Verifactu Setup" IsInitialized := false; Initialize(); + // [GIVEN] Company Information has valid Post Code with Time Zone + SetupCompanyInfoWithPostCode('Romance Standard Time'); + // [GIVEN] SII Setup exists and is enabled CreateSIISetup(SIISetup, true); @@ -247,6 +265,9 @@ codeunit 148003 "Test Verifactu Setup" IsInitialized := false; Initialize(); + // [GIVEN] Company Information has valid Post Code with Time Zone + SetupCompanyInfoWithPostCode('Romance Standard Time'); + // [GIVEN] SII Setup exists and is enabled CreateSIISetup(SIISetup, true); @@ -281,6 +302,9 @@ codeunit 148003 "Test Verifactu Setup" IsInitialized := false; Initialize(); + // [GIVEN] Company Information has valid Post Code with Time Zone + SetupCompanyInfoWithPostCode('Romance Standard Time'); + // [GIVEN] Verifactu Setup exists and is enabled CreateVerifactuSetup(VerifactuSetup); CertCode := CreateCertificate(IsolatedCertificate); @@ -316,6 +340,9 @@ codeunit 148003 "Test Verifactu Setup" IsInitialized := false; Initialize(); + // [GIVEN] Company Information has valid Post Code with Time Zone + SetupCompanyInfoWithPostCode('Romance Standard Time'); + // [GIVEN] Verifactu Setup exists and is enabled CreateVerifactuSetup(VerifactuSetup); CertCode := CreateCertificate(IsolatedCertificate); @@ -337,6 +364,83 @@ codeunit 148003 "Test Verifactu Setup" Assert.IsTrue(VerifactuSetup.Enabled, 'Verifactu Setup should remain enabled'); end; + [Test] + procedure EnableSetupFailsWhenPostCodeTimeZoneIsBlank() + var + VerifactuSetup: Record "Verifactu Setup"; + IsolatedCertificate: Record "Isolated Certificate"; + CertCode: Code[20]; + begin + // [FEATURE] [AI test 0.3] + // [SCENARIO 622986] Verifactu Setup cannot be enabled when Post Code Time Zone is blank + Initialize(); + + // [GIVEN] Company Information has Post Code "PC" and City set with blank Time Zone + SetupCompanyInfoWithPostCode(''); + + // [GIVEN] Verifactu Setup record exists with valid certificate "C" + CreateVerifactuSetup(VerifactuSetup); + CertCode := CreateCertificate(IsolatedCertificate); + VerifactuSetup."Certificate Code" := CertCode; + VerifactuSetup.Modify(true); + + // [WHEN] User attempts to enable Verifactu Setup + asserterror VerifactuSetup.Validate(Enabled, true); + + // [THEN] Error is raised about missing Time Zone + Assert.ExpectedError('Time Zone'); + Assert.ExpectedErrorCode('Dialog'); + end; + + [Test] + [HandlerFunctions('CustomerConsentConfirmationPageChooseYesModalPageHandler')] + procedure EnableSetupSucceedsWithValidCompanyInfo() + var + VerifactuSetup: Record "Verifactu Setup"; + IsolatedCertificate: Record "Isolated Certificate"; + CertCode: Code[20]; + begin + // [FEATURE] [AI test 0.3] + // [SCENARIO 622986] Verifactu Setup enables successfully with valid Company Information + Initialize(); + + // [GIVEN] Company Information has Post Code "PC" with Time Zone set + SetupCompanyInfoWithPostCode('Romance Standard Time'); + + // [GIVEN] Verifactu Setup record exists with valid certificate "C" + CreateVerifactuSetup(VerifactuSetup); + CertCode := CreateCertificate(IsolatedCertificate); + VerifactuSetup.Validate("Certificate Code", CertCode); + VerifactuSetup.Modify(true); + + // [WHEN] User enables Verifactu Setup + VerifactuSetup.Validate(Enabled, true); + VerifactuSetup.Modify(true); + + // [THEN] Enabled field is set to true + Assert.IsTrue(VerifactuSetup.Enabled, 'Setup should be enabled with valid Company Information'); + end; + + [Test] + procedure CheckCompanyInfoFailsWhenTimeZoneClearedAfterEnable() + var + Verifactu: Codeunit Verifactu; + begin + // [FEATURE] [AI test 0.3] + // [SCENARIO 622986] CheckCompanyInformation fails when Post Code Time Zone is cleared after Verifactu was enabled + Initialize(); + + // [GIVEN] Company Information has Post Code "PC" with blank Time Zone + SetupCompanyInfoWithPostCode(''); + + // [WHEN] CheckCompanyInformation is called + asserterror Verifactu.CheckCompanyInformation(); + + // [THEN] Error is raised about missing Time Zone + Assert.ExpectedError('Time Zone'); + Assert.ExpectedErrorCode('Dialog'); + end; + local procedure Initialize() var VerifactuSetup: Record "Verifactu Setup"; @@ -392,6 +496,30 @@ codeunit 148003 "Test Verifactu Setup" Assert.IsTrue(VerifactuSetup.Get(), 'Verifactu Setup record should exist'); end; + local procedure SetupCompanyInfoWithPostCode(TimeZone: Text[180]) + var + CompanyInformation: Record "Company Information"; + PostCode: Record "Post Code"; + PostCodeValue: Code[20]; + CityValue: Text[30]; + begin + PostCodeValue := CopyStr(LibraryRandom.RandText(20), 1, MaxStrLen(PostCodeValue)); + CityValue := CopyStr(LibraryRandom.RandText(30), 1, MaxStrLen(CityValue)); + + CompanyInformation.Get(); + CompanyInformation."Post Code" := PostCodeValue; + CompanyInformation.City := CityValue; + CompanyInformation.Modify(); + + if PostCode.Get(PostCodeValue, CityValue) then + PostCode.Delete(); + PostCode.Init(); + PostCode.Code := PostCodeValue; + PostCode.City := CityValue; + PostCode."Time Zone" := TimeZone; + PostCode.Insert(); + end; + [ModalPageHandler] [Scope('OnPrem')] procedure CustomerConsentConfirmationPageChooseNoModalPageHandler(var CustConsentConfPage: TestPage "Cust. Consent Confirmation") diff --git a/Apps/ES/EDocumentFormats/FacturaE/app/app.json b/Apps/ES/EDocumentFormats/FacturaE/app/app.json index 742b966853..b2ed2be10f 100644 --- a/Apps/ES/EDocumentFormats/FacturaE/app/app.json +++ b/Apps/ES/EDocumentFormats/FacturaE/app/app.json @@ -23,7 +23,7 @@ "TranslationFile" ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10772, diff --git a/Apps/ES/EDocumentFormats/FacturaE/test/app.json b/Apps/ES/EDocumentFormats/FacturaE/test/app.json index f738137385..1f21cc5b53 100644 --- a/Apps/ES/EDocumentFormats/FacturaE/test/app.json +++ b/Apps/ES/EDocumentFormats/FacturaE/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/ES/EDocument_ES/demo data/app.json b/Apps/ES/EDocument_ES/demo data/app.json index 6d41a6244a..d919b46d28 100644 --- a/Apps/ES/EDocument_ES/demo data/app.json +++ b/Apps/ES/EDocument_ES/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10886, diff --git a/Apps/ES/HybridBCLast_ES/app/app.json b/Apps/ES/HybridBCLast_ES/app/app.json index 21fb6da0af..03652ed47c 100644 --- a/Apps/ES/HybridBCLast_ES/app/app.json +++ b/Apps/ES/HybridBCLast_ES/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/ES/IntrastatES/app/app.json b/Apps/ES/IntrastatES/app/app.json index 179c20fd9a..c6f8daa64c 100644 --- a/Apps/ES/IntrastatES/app/app.json +++ b/Apps/ES/IntrastatES/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10790, diff --git a/Apps/ES/Onprem Permissions ES/app/app.json b/Apps/ES/Onprem Permissions ES/app/app.json index 893eae6862..7c7705e335 100644 --- a/Apps/ES/Onprem Permissions ES/app/app.json +++ b/Apps/ES/Onprem Permissions ES/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/FI/ContosoCoffeeDemoDatasetFI/app/app.json b/Apps/FI/ContosoCoffeeDemoDatasetFI/app/app.json index 2ae6281431..d591d3d010 100644 --- a/Apps/FI/ContosoCoffeeDemoDatasetFI/app/app.json +++ b/Apps/FI/ContosoCoffeeDemoDatasetFI/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/FI/EDocument_FI/demo data/app.json b/Apps/FI/EDocument_FI/demo data/app.json index 61ce229453..148c465cf0 100644 --- a/Apps/FI/EDocument_FI/demo data/app.json +++ b/Apps/FI/EDocument_FI/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/FI/FICore/app/app.json b/Apps/FI/FICore/app/app.json index 3884f4dd76..38ef1b56e0 100644 --- a/Apps/FI/FICore/app/app.json +++ b/Apps/FI/FICore/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/FI/FICore/test/app.json b/Apps/FI/FICore/test/app.json index 103688591e..a05f71f5a5 100644 --- a/Apps/FI/FICore/test/app.json +++ b/Apps/FI/FICore/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/FI/IntrastatFI/app/app.json b/Apps/FI/IntrastatFI/app/app.json index c4e69f532f..5e58b58d8a 100644 --- a/Apps/FI/IntrastatFI/app/app.json +++ b/Apps/FI/IntrastatFI/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 13406, diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/app.json b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/app.json index e61c380e13..afcd890e91 100644 --- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/app.json +++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/FR/EDocument_FR/demo data/app.json b/Apps/FR/EDocument_FR/demo data/app.json index c32d467353..ab858dbe22 100644 --- a/Apps/FR/EDocument_FR/demo data/app.json +++ b/Apps/FR/EDocument_FR/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10910, diff --git a/Apps/FR/FAReportsFR/app/app.json b/Apps/FR/FAReportsFR/app/app.json index d9009bc335..bc99343aad 100644 --- a/Apps/FR/FAReportsFR/app/app.json +++ b/Apps/FR/FAReportsFR/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/FR/FAReportsFR/test/app.json b/Apps/FR/FAReportsFR/test/app.json index 70f4557699..963b41cc3c 100644 --- a/Apps/FR/FAReportsFR/test/app.json +++ b/Apps/FR/FAReportsFR/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/FR/FECAuditFile/app/app.json b/Apps/FR/FECAuditFile/app/app.json index d3617c8118..6192768123 100644 --- a/Apps/FR/FECAuditFile/app/app.json +++ b/Apps/FR/FECAuditFile/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/FR/FECAuditFile/test/app.json b/Apps/FR/FECAuditFile/test/app.json index faaab52789..5ffdd3aa73 100644 --- a/Apps/FR/FECAuditFile/test/app.json +++ b/Apps/FR/FECAuditFile/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/FR/HybridBCLast_FR/app/app.json b/Apps/FR/HybridBCLast_FR/app/app.json index 13ff86a64a..ed6c556383 100644 --- a/Apps/FR/HybridBCLast_FR/app/app.json +++ b/Apps/FR/HybridBCLast_FR/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/FR/IntrastatFR/app/app.json b/Apps/FR/IntrastatFR/app/app.json index 5243a784e2..87ff64e174 100644 --- a/Apps/FR/IntrastatFR/app/app.json +++ b/Apps/FR/IntrastatFR/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10851, diff --git a/Apps/FR/IntrastatFR/test/app.json b/Apps/FR/IntrastatFR/test/app.json index 0e30ab0804..354221bbf7 100644 --- a/Apps/FR/IntrastatFR/test/app.json +++ b/Apps/FR/IntrastatFR/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2179727", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/FR/Onprem Permissions FR/app/app.json b/Apps/FR/Onprem Permissions FR/app/app.json index 628239253f..d3d8b80b09 100644 --- a/Apps/FR/Onprem Permissions FR/app/app.json +++ b/Apps/FR/Onprem Permissions FR/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/FR/PaymentManagementFR/app/app.json b/Apps/FR/PaymentManagementFR/app/app.json index 527906af7e..2ac31cf8b9 100644 --- a/Apps/FR/PaymentManagementFR/app/app.json +++ b/Apps/FR/PaymentManagementFR/app/app.json @@ -21,7 +21,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "idRanges": [ { diff --git a/Apps/FR/PaymentManagementFR/test/app.json b/Apps/FR/PaymentManagementFR/test/app.json index 5a3499bbbe..88a66f2af5 100644 --- a/Apps/FR/PaymentManagementFR/test/app.json +++ b/Apps/FR/PaymentManagementFR/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/FR/ServiceDeclarationFR/app/app.json b/Apps/FR/ServiceDeclarationFR/app/app.json index 566900e4a1..6a4c8e2dbd 100644 --- a/Apps/FR/ServiceDeclarationFR/app/app.json +++ b/Apps/FR/ServiceDeclarationFR/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10890, diff --git a/Apps/FR/ServiceDeclarationFR/test/app.json b/Apps/FR/ServiceDeclarationFR/test/app.json index f68b368b4b..d09d562d27 100644 --- a/Apps/FR/ServiceDeclarationFR/test/app.json +++ b/Apps/FR/ServiceDeclarationFR/test/app.json @@ -10,7 +10,7 @@ "help": "https://learn.microsoft.com/en-us/dynamics365/business-central/finance-how-setup-use-service-declaration", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/GB/ContosoCoffeeDemoDatasetGB/app/app.json b/Apps/GB/ContosoCoffeeDemoDatasetGB/app/app.json index 3145e4c738..06242115b9 100644 --- a/Apps/GB/ContosoCoffeeDemoDatasetGB/app/app.json +++ b/Apps/GB/ContosoCoffeeDemoDatasetGB/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/GB/EDocument_GB/demo data/app.json b/Apps/GB/EDocument_GB/demo data/app.json index 261b578314..d4415c5003 100644 --- a/Apps/GB/EDocument_GB/demo data/app.json +++ b/Apps/GB/EDocument_GB/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/GB/GovTalk/app/app.json b/Apps/GB/GovTalk/app/app.json index b1c1585254..7b4dbaacbe 100644 --- a/Apps/GB/GovTalk/app/app.json +++ b/Apps/GB/GovTalk/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10503, diff --git a/Apps/GB/GovTalk/demo data/app.json b/Apps/GB/GovTalk/demo data/app.json index bf6ee974ce..4e021b3e9f 100644 --- a/Apps/GB/GovTalk/demo data/app.json +++ b/Apps/GB/GovTalk/demo data/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10550, diff --git a/Apps/GB/GovTalk/test/app.json b/Apps/GB/GovTalk/test/app.json index fb0fd577ef..791f301694 100644 --- a/Apps/GB/GovTalk/test/app.json +++ b/Apps/GB/GovTalk/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/GB/IdealPostcodes/app/app.json b/Apps/GB/IdealPostcodes/app/app.json index b288527be7..a939b55d3f 100644 --- a/Apps/GB/IdealPostcodes/app/app.json +++ b/Apps/GB/IdealPostcodes/app/app.json @@ -34,7 +34,7 @@ "TranslationFile" ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "application": "29.0.0.0" } diff --git a/Apps/GB/IdealPostcodes/test/app.json b/Apps/GB/IdealPostcodes/test/app.json index 4da9f27801..1cfeb04692 100644 --- a/Apps/GB/IdealPostcodes/test/app.json +++ b/Apps/GB/IdealPostcodes/test/app.json @@ -35,7 +35,7 @@ "TranslationFile" ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/GB/IntrastatGB/app/app.json b/Apps/GB/IntrastatGB/app/app.json index 74f93caad0..bc9eb451be 100644 --- a/Apps/GB/IntrastatGB/app/app.json +++ b/Apps/GB/IntrastatGB/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10500, diff --git a/Apps/GB/IntrastatGB/test/app.json b/Apps/GB/IntrastatGB/test/app.json index 5b55ca2ae7..378e5090a7 100644 --- a/Apps/GB/IntrastatGB/test/app.json +++ b/Apps/GB/IntrastatGB/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2212316", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/GB/PostingDateCheckOnPosting/app/app.json b/Apps/GB/PostingDateCheckOnPosting/app/app.json index 8322d06a55..732d3cf756 100644 --- a/Apps/GB/PostingDateCheckOnPosting/app/app.json +++ b/Apps/GB/PostingDateCheckOnPosting/app/app.json @@ -14,7 +14,7 @@ "application": "29.0.0.0", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10503, diff --git a/Apps/GB/PostingDateCheckOnPosting/test/app.json b/Apps/GB/PostingDateCheckOnPosting/test/app.json index c77b0b57fd..775ead3de7 100644 --- a/Apps/GB/PostingDateCheckOnPosting/test/app.json +++ b/Apps/GB/PostingDateCheckOnPosting/test/app.json @@ -39,7 +39,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 144000, diff --git a/Apps/GB/ReportsGB/app/app.json b/Apps/GB/ReportsGB/app/app.json index ca146c5d83..4fc1da69ea 100644 --- a/Apps/GB/ReportsGB/app/app.json +++ b/Apps/GB/ReportsGB/app/app.json @@ -21,7 +21,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10580, diff --git a/Apps/GB/ReportsGB/test/app.json b/Apps/GB/ReportsGB/test/app.json index 014b3afc99..4de1554b5b 100644 --- a/Apps/GB/ReportsGB/test/app.json +++ b/Apps/GB/ReportsGB/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/GB/ReverseChargeVAT/app/app.json b/Apps/GB/ReverseChargeVAT/app/app.json index 6f2d1a6fbf..63ccc3bba6 100644 --- a/Apps/GB/ReverseChargeVAT/app/app.json +++ b/Apps/GB/ReverseChargeVAT/app/app.json @@ -14,7 +14,7 @@ "application": "29.0.0.0", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10549, diff --git a/Apps/GB/ReverseChargeVAT/test/app.json b/Apps/GB/ReverseChargeVAT/test/app.json index d884497592..90530ae7b0 100644 --- a/Apps/GB/ReverseChargeVAT/test/app.json +++ b/Apps/GB/ReverseChargeVAT/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/GB/UKMakingTaxDigital/app/app.json b/Apps/GB/UKMakingTaxDigital/app/app.json index 1c5d1712a1..b79351d20e 100644 --- a/Apps/GB/UKMakingTaxDigital/app/app.json +++ b/Apps/GB/UKMakingTaxDigital/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/GB/UKMakingTaxDigital/test/app.json b/Apps/GB/UKMakingTaxDigital/test/app.json index 6b452119f5..aead25f55c 100644 --- a/Apps/GB/UKMakingTaxDigital/test/app.json +++ b/Apps/GB/UKMakingTaxDigital/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/GB/UKPostcodeGetAddressIO/app/app.json b/Apps/GB/UKPostcodeGetAddressIO/app/app.json index e782841357..9d409fb00a 100644 --- a/Apps/GB/UKPostcodeGetAddressIO/app/app.json +++ b/Apps/GB/UKPostcodeGetAddressIO/app/app.json @@ -18,7 +18,7 @@ }, "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "application": "29.0.0.0" } diff --git a/Apps/GB/UKPostcodeGetAddressIO/test/app.json b/Apps/GB/UKPostcodeGetAddressIO/test/app.json index c9a7143bf2..9e5e9a01fb 100644 --- a/Apps/GB/UKPostcodeGetAddressIO/test/app.json +++ b/Apps/GB/UKPostcodeGetAddressIO/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/GB/VATReporting/app/app.json b/Apps/GB/VATReporting/app/app.json index 60dcc269ef..041dcc81de 100644 --- a/Apps/GB/VATReporting/app/app.json +++ b/Apps/GB/VATReporting/app/app.json @@ -14,7 +14,7 @@ "application": "29.0.0.0", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10544, diff --git a/Apps/GB/VATReporting/test/app.json b/Apps/GB/VATReporting/test/app.json index 1d2d4bae5c..099656a0f1 100644 --- a/Apps/GB/VATReporting/test/app.json +++ b/Apps/GB/VATReporting/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/ContosoCoffeeDemoDatasetIN/app/app.json b/Apps/IN/ContosoCoffeeDemoDatasetIN/app/app.json index 96cc9cc518..a8428286c3 100644 --- a/Apps/IN/ContosoCoffeeDemoDatasetIN/app/app.json +++ b/Apps/IN/ContosoCoffeeDemoDatasetIN/app/app.json @@ -68,7 +68,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INChargeGroup/app/ChargeGroupBase/app.json b/Apps/IN/INChargeGroup/app/ChargeGroupBase/app.json index 437f6697ed..3a53ee0679 100644 --- a/Apps/IN/INChargeGroup/app/ChargeGroupBase/app.json +++ b/Apps/IN/INChargeGroup/app/ChargeGroupBase/app.json @@ -26,7 +26,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18501, diff --git a/Apps/IN/INChargeGroup/app/ChargeOnPurchase/app.json b/Apps/IN/INChargeGroup/app/ChargeOnPurchase/app.json index 9110298ed7..df2f8f6d22 100644 --- a/Apps/IN/INChargeGroup/app/ChargeOnPurchase/app.json +++ b/Apps/IN/INChargeGroup/app/ChargeOnPurchase/app.json @@ -31,7 +31,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INChargeGroup/app/ChargeOnSales/app.json b/Apps/IN/INChargeGroup/app/ChargeOnSales/app.json index 526f20f0b4..df871e538f 100644 --- a/Apps/IN/INChargeGroup/app/ChargeOnSales/app.json +++ b/Apps/IN/INChargeGroup/app/ChargeOnSales/app.json @@ -31,7 +31,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INChargeGroup/app/app.json b/Apps/IN/INChargeGroup/app/app.json index 557e961971..c41640830d 100644 --- a/Apps/IN/INChargeGroup/app/app.json +++ b/Apps/IN/INChargeGroup/app/app.json @@ -25,7 +25,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INChargeGroup/test/app.json b/Apps/IN/INChargeGroup/test/app.json index 83a9677d43..a68d012eea 100644 --- a/Apps/IN/INChargeGroup/test/app.json +++ b/Apps/IN/INChargeGroup/test/app.json @@ -61,7 +61,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INDataMigration/app.json b/Apps/IN/INDataMigration/app.json index fd5e1a33c9..d2d6a5ad79 100644 --- a/Apps/IN/INDataMigration/app.json +++ b/Apps/IN/INDataMigration/app.json @@ -43,7 +43,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INFADepreciation/app/app.json b/Apps/IN/INFADepreciation/app/app.json index 3aa29fef56..2a697ad4ad 100644 --- a/Apps/IN/INFADepreciation/app/app.json +++ b/Apps/IN/INFADepreciation/app/app.json @@ -16,7 +16,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INFADepreciation/test/app.json b/Apps/IN/INFADepreciation/test/app.json index 04b55838ac..b333a54318 100644 --- a/Apps/IN/INFADepreciation/test/app.json +++ b/Apps/IN/INFADepreciation/test/app.json @@ -31,7 +31,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INGST/app/GSTApplication/app.json b/Apps/IN/INGST/app/GSTApplication/app.json index 8b9d884cb0..e934ea8cb1 100644 --- a/Apps/IN/INGST/app/GSTApplication/app.json +++ b/Apps/IN/INGST/app/GSTApplication/app.json @@ -49,7 +49,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INGST/app/GSTBase/app.json b/Apps/IN/INGST/app/GSTBase/app.json index a15fabdc97..b0fe6325c3 100644 --- a/Apps/IN/INGST/app/GSTBase/app.json +++ b/Apps/IN/INGST/app/GSTBase/app.json @@ -26,7 +26,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18000, diff --git a/Apps/IN/INGST/app/GSTDistribution/app.json b/Apps/IN/INGST/app/GSTDistribution/app.json index 4d3df8f543..dfbbfbb776 100644 --- a/Apps/IN/INGST/app/GSTDistribution/app.json +++ b/Apps/IN/INGST/app/GSTDistribution/app.json @@ -35,7 +35,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18200, diff --git a/Apps/IN/INGST/app/GSTPayments/app.json b/Apps/IN/INGST/app/GSTPayments/app.json index f0fa262e5c..52cc27180f 100644 --- a/Apps/IN/INGST/app/GSTPayments/app.json +++ b/Apps/IN/INGST/app/GSTPayments/app.json @@ -48,7 +48,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18243, diff --git a/Apps/IN/INGST/app/GSTPurchase/app.json b/Apps/IN/INGST/app/GSTPurchase/app.json index a523894650..367d41a79f 100644 --- a/Apps/IN/INGST/app/GSTPurchase/app.json +++ b/Apps/IN/INGST/app/GSTPurchase/app.json @@ -36,7 +36,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18080, diff --git a/Apps/IN/INGST/app/GSTReconcilation/app.json b/Apps/IN/INGST/app/GSTReconcilation/app.json index ceb76408b6..973f9f2cc2 100644 --- a/Apps/IN/INGST/app/GSTReconcilation/app.json +++ b/Apps/IN/INGST/app/GSTReconcilation/app.json @@ -35,7 +35,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18280, diff --git a/Apps/IN/INGST/app/GSTReturnSettlement/app.json b/Apps/IN/INGST/app/GSTReturnSettlement/app.json index beb16dca48..b4bb610b19 100644 --- a/Apps/IN/INGST/app/GSTReturnSettlement/app.json +++ b/Apps/IN/INGST/app/GSTReturnSettlement/app.json @@ -53,7 +53,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18317, diff --git a/Apps/IN/INGST/app/GSTReturnSettlement/src/page/GSTJournalBatches.Page.al b/Apps/IN/INGST/app/GSTReturnSettlement/src/page/GSTJournalBatches.Page.al index 56ba4c4b05..7b1438ff54 100644 --- a/Apps/IN/INGST/app/GSTReturnSettlement/src/page/GSTJournalBatches.Page.al +++ b/Apps/IN/INGST/app/GSTReturnSettlement/src/page/GSTJournalBatches.Page.al @@ -69,8 +69,8 @@ page 18327 "GST Journal Batches" } field("No. of Lines"; Rec."No. of Lines") { - Visible = false; ApplicationArea = Basic, Suite; + Visible = false; trigger OnDrillDown() begin GSTJnlManagement.TemplateSelectionFromGSTBatch(Rec) diff --git a/Apps/IN/INGST/app/GSTSales/app.json b/Apps/IN/INGST/app/GSTSales/app.json index 3e15dd497e..68361c657e 100644 --- a/Apps/IN/INGST/app/GSTSales/app.json +++ b/Apps/IN/INGST/app/GSTSales/app.json @@ -36,7 +36,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18141, diff --git a/Apps/IN/INGST/app/GSTService/app.json b/Apps/IN/INGST/app/GSTService/app.json index 95e26656c4..386615ef7c 100644 --- a/Apps/IN/INGST/app/GSTService/app.json +++ b/Apps/IN/INGST/app/GSTService/app.json @@ -35,7 +35,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18440, diff --git a/Apps/IN/INGST/app/GSTServiceTransfer/app.json b/Apps/IN/INGST/app/GSTServiceTransfer/app.json index d0998df894..695355960f 100644 --- a/Apps/IN/INGST/app/GSTServiceTransfer/app.json +++ b/Apps/IN/INGST/app/GSTServiceTransfer/app.json @@ -36,7 +36,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18350, diff --git a/Apps/IN/INGST/app/GSTStockTransfer/app.json b/Apps/IN/INGST/app/GSTStockTransfer/app.json index 3ab29f8a04..92de9fd172 100644 --- a/Apps/IN/INGST/app/GSTStockTransfer/app.json +++ b/Apps/IN/INGST/app/GSTStockTransfer/app.json @@ -36,7 +36,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18390, diff --git a/Apps/IN/INGST/app/GSTSubcontracting/app.json b/Apps/IN/INGST/app/GSTSubcontracting/app.json index ba5219e1ec..c640a0b9cb 100644 --- a/Apps/IN/INGST/app/GSTSubcontracting/app.json +++ b/Apps/IN/INGST/app/GSTSubcontracting/app.json @@ -30,7 +30,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18466, diff --git a/Apps/IN/INGST/app/app.json b/Apps/IN/INGST/app/app.json index 945bcad298..a7844552d7 100644 --- a/Apps/IN/INGST/app/app.json +++ b/Apps/IN/INGST/app/app.json @@ -35,7 +35,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INGST/test/GSTBase/app.json b/Apps/IN/INGST/test/GSTBase/app.json index 4c4194f616..ec6c28b80a 100644 --- a/Apps/IN/INGST/test/GSTBase/app.json +++ b/Apps/IN/INGST/test/GSTBase/app.json @@ -43,7 +43,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INGST/test/GSTPayments/app.json b/Apps/IN/INGST/test/GSTPayments/app.json index 1a01d1487a..00460bbeff 100644 --- a/Apps/IN/INGST/test/GSTPayments/app.json +++ b/Apps/IN/INGST/test/GSTPayments/app.json @@ -55,7 +55,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INGST/test/GSTPurchase/app.json b/Apps/IN/INGST/test/GSTPurchase/app.json index e772a9fb18..d6533e155d 100644 --- a/Apps/IN/INGST/test/GSTPurchase/app.json +++ b/Apps/IN/INGST/test/GSTPurchase/app.json @@ -53,7 +53,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18125, diff --git a/Apps/IN/INGST/test/GSTSales/app.json b/Apps/IN/INGST/test/GSTSales/app.json index 4cb00b0605..e8a908ed55 100644 --- a/Apps/IN/INGST/test/GSTSales/app.json +++ b/Apps/IN/INGST/test/GSTSales/app.json @@ -64,7 +64,7 @@ } ], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18191, diff --git a/Apps/IN/INGST/test/GSTSubcontracting/app.json b/Apps/IN/INGST/test/GSTSubcontracting/app.json index 997f9de11f..b4bb1ad48d 100644 --- a/Apps/IN/INGST/test/GSTSubcontracting/app.json +++ b/Apps/IN/INGST/test/GSTSubcontracting/app.json @@ -49,7 +49,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INGST/test/app.json b/Apps/IN/INGST/test/app.json index 5371f74c22..b38c41ab36 100644 --- a/Apps/IN/INGST/test/app.json +++ b/Apps/IN/INGST/test/app.json @@ -49,7 +49,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INGateEntry/app/app.json b/Apps/IN/INGateEntry/app/app.json index 58380a7ef9..af0b213d94 100644 --- a/Apps/IN/INGateEntry/app/app.json +++ b/Apps/IN/INGateEntry/app/app.json @@ -25,7 +25,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INGateEntry/test/app.json b/Apps/IN/INGateEntry/test/app.json index 12c4a1f799..102de32360 100644 --- a/Apps/IN/INGateEntry/test/app.json +++ b/Apps/IN/INGateEntry/test/app.json @@ -37,7 +37,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INReports/app/app.json b/Apps/IN/INReports/app/app.json index d1ca3a5a74..0a73c09fa8 100644 --- a/Apps/IN/INReports/app/app.json +++ b/Apps/IN/INReports/app/app.json @@ -52,7 +52,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INReports/test/app.json b/Apps/IN/INReports/test/app.json index bb3a8f473e..8c958f6cc6 100644 --- a/Apps/IN/INReports/test/app.json +++ b/Apps/IN/INReports/test/app.json @@ -70,7 +70,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INTCS/app/TCSBase/app.json b/Apps/IN/INTCS/app/TCSBase/app.json index ec963c137f..7dbed18045 100644 --- a/Apps/IN/INTCS/app/TCSBase/app.json +++ b/Apps/IN/INTCS/app/TCSBase/app.json @@ -30,7 +30,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18807, diff --git a/Apps/IN/INTCS/app/TCSOnReceipt/app.json b/Apps/IN/INTCS/app/TCSOnReceipt/app.json index 0b7ec16bb7..bccf0c3c04 100644 --- a/Apps/IN/INTCS/app/TCSOnReceipt/app.json +++ b/Apps/IN/INTCS/app/TCSOnReceipt/app.json @@ -36,7 +36,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18900, diff --git a/Apps/IN/INTCS/app/TCSOnSales/app.json b/Apps/IN/INTCS/app/TCSOnSales/app.json index a3c4a75cca..b440503a9b 100644 --- a/Apps/IN/INTCS/app/TCSOnSales/app.json +++ b/Apps/IN/INTCS/app/TCSOnSales/app.json @@ -36,7 +36,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18838, diff --git a/Apps/IN/INTCS/app/TCSReturnAndSettlement/app.json b/Apps/IN/INTCS/app/TCSReturnAndSettlement/app.json index 90ce77cf4e..79964b0e70 100644 --- a/Apps/IN/INTCS/app/TCSReturnAndSettlement/app.json +++ b/Apps/IN/INTCS/app/TCSReturnAndSettlement/app.json @@ -32,7 +32,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18869, diff --git a/Apps/IN/INTCS/app/TCSReturnAndSettlement/src/TCS-Journal/page/TCSJournalBatches.page.al b/Apps/IN/INTCS/app/TCSReturnAndSettlement/src/TCS-Journal/page/TCSJournalBatches.page.al index 09fda5abb6..c78dce2f87 100644 --- a/Apps/IN/INTCS/app/TCSReturnAndSettlement/src/TCS-Journal/page/TCSJournalBatches.page.al +++ b/Apps/IN/INTCS/app/TCSReturnAndSettlement/src/TCS-Journal/page/TCSJournalBatches.page.al @@ -54,8 +54,8 @@ page 18871 "TCS Journal Batches" } field("No. of Lines"; Rec."No. of Lines") { - Visible = false; ApplicationArea = Basic, Suite; + Visible = false; trigger OnDrillDown() begin TCSAdjustment.TemplateSelectionFromTCSBatch(Rec); diff --git a/Apps/IN/INTCS/app/app.json b/Apps/IN/INTCS/app/app.json index 788a2090fe..0f28539e0c 100644 --- a/Apps/IN/INTCS/app/app.json +++ b/Apps/IN/INTCS/app/app.json @@ -30,7 +30,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18807, diff --git a/Apps/IN/INTCS/test/TCSBase/app.json b/Apps/IN/INTCS/test/TCSBase/app.json index 98c26702f1..5ca6e8984f 100644 --- a/Apps/IN/INTCS/test/TCSBase/app.json +++ b/Apps/IN/INTCS/test/TCSBase/app.json @@ -47,7 +47,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18911, diff --git a/Apps/IN/INTCS/test/TCSOnReceipt/app.json b/Apps/IN/INTCS/test/TCSOnReceipt/app.json index bb1ecafc25..0ce6f05c85 100644 --- a/Apps/IN/INTCS/test/TCSOnReceipt/app.json +++ b/Apps/IN/INTCS/test/TCSOnReceipt/app.json @@ -14,7 +14,7 @@ ], "logo": "ExtensionLogo.png", "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/IN/INTCS/test/TCSOnSales/app.json b/Apps/IN/INTCS/test/TCSOnSales/app.json index aecede3e8d..83da909a23 100644 --- a/Apps/IN/INTCS/test/TCSOnSales/app.json +++ b/Apps/IN/INTCS/test/TCSOnSales/app.json @@ -59,7 +59,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18914, diff --git a/Apps/IN/INTCS/test/TCSReturnAndSettlement/app.json b/Apps/IN/INTCS/test/TCSReturnAndSettlement/app.json index 0b1d0e349b..cf78d52344 100644 --- a/Apps/IN/INTCS/test/TCSReturnAndSettlement/app.json +++ b/Apps/IN/INTCS/test/TCSReturnAndSettlement/app.json @@ -52,7 +52,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INTCS/test/app.json b/Apps/IN/INTCS/test/app.json index d4e9504ece..3a12f434b3 100644 --- a/Apps/IN/INTCS/test/app.json +++ b/Apps/IN/INTCS/test/app.json @@ -59,7 +59,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18911, diff --git a/Apps/IN/INTDS/app/TDSBase/app.json b/Apps/IN/INTDS/app/TDSBase/app.json index e929a7a558..7842f52447 100644 --- a/Apps/IN/INTDS/app/TDSBase/app.json +++ b/Apps/IN/INTDS/app/TDSBase/app.json @@ -30,7 +30,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18685, diff --git a/Apps/IN/INTDS/app/TDSForCustomer/app.json b/Apps/IN/INTDS/app/TDSForCustomer/app.json index 0bfb0a9839..1ad06493fc 100644 --- a/Apps/IN/INTDS/app/TDSForCustomer/app.json +++ b/Apps/IN/INTDS/app/TDSForCustomer/app.json @@ -36,7 +36,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18661, diff --git a/Apps/IN/INTDS/app/TDSOnPayments/app.json b/Apps/IN/INTDS/app/TDSOnPayments/app.json index 8956bbefa9..13dab2bed0 100644 --- a/Apps/IN/INTDS/app/TDSOnPayments/app.json +++ b/Apps/IN/INTDS/app/TDSOnPayments/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile", "GenerateCaptions" diff --git a/Apps/IN/INTDS/app/TDSOnPurchase/app.json b/Apps/IN/INTDS/app/TDSOnPurchase/app.json index db0a712403..9dc35246eb 100644 --- a/Apps/IN/INTDS/app/TDSOnPurchase/app.json +++ b/Apps/IN/INTDS/app/TDSOnPurchase/app.json @@ -15,7 +15,7 @@ "GenerateCaptions" ], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "dependencies": [ { "id": "c1eafb3f-e397-468e-bdb4-ecc5c317ca00", diff --git a/Apps/IN/INTDS/app/TDSReturnAndSettlement/app.json b/Apps/IN/INTDS/app/TDSReturnAndSettlement/app.json index f1f5a063a1..d1460548d3 100644 --- a/Apps/IN/INTDS/app/TDSReturnAndSettlement/app.json +++ b/Apps/IN/INTDS/app/TDSReturnAndSettlement/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "dependencies": [ { "id": "c1eafb3f-e397-468e-bdb4-ecc5c317ca00", diff --git a/Apps/IN/INTDS/app/TDSReturnAndSettlement/src/TDS-Journal/TDSJournalBatches.page.al b/Apps/IN/INTDS/app/TDSReturnAndSettlement/src/TDS-Journal/TDSJournalBatches.page.al index 31bdf13faf..bfe7d306a8 100644 --- a/Apps/IN/INTDS/app/TDSReturnAndSettlement/src/TDS-Journal/TDSJournalBatches.page.al +++ b/Apps/IN/INTDS/app/TDSReturnAndSettlement/src/TDS-Journal/TDSJournalBatches.page.al @@ -60,8 +60,8 @@ page 18748 "TDS Journal Batches" } field("No. of Lines"; Rec."No. of Lines") { - Visible = false; ApplicationArea = Basic, Suite; + Visible = false; trigger OnDrillDown() begin TDSJnlManagement.TemplateSelectionFromTaxBatch(Rec); diff --git a/Apps/IN/INTDS/app/app.json b/Apps/IN/INTDS/app/app.json index cddf0122c6..c07feddbe8 100644 --- a/Apps/IN/INTDS/app/app.json +++ b/Apps/IN/INTDS/app/app.json @@ -30,7 +30,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18661, diff --git a/Apps/IN/INTDS/test/TDSBase/app.json b/Apps/IN/INTDS/test/TDSBase/app.json index 45e0b10d07..289953e37d 100644 --- a/Apps/IN/INTDS/test/TDSBase/app.json +++ b/Apps/IN/INTDS/test/TDSBase/app.json @@ -47,7 +47,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18786, diff --git a/Apps/IN/INTDS/test/TDSOnCustomer/app.json b/Apps/IN/INTDS/test/TDSOnCustomer/app.json index 52f8dc4289..4fd5b7248c 100644 --- a/Apps/IN/INTDS/test/TDSOnCustomer/app.json +++ b/Apps/IN/INTDS/test/TDSOnCustomer/app.json @@ -70,7 +70,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INTDS/test/TDSOnPayments/app.json b/Apps/IN/INTDS/test/TDSOnPayments/app.json index 16f5d12575..a44de2276b 100644 --- a/Apps/IN/INTDS/test/TDSOnPayments/app.json +++ b/Apps/IN/INTDS/test/TDSOnPayments/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "dependencies": [ { "id": "d3c551dd-5903-4194-b153-04ced9d29a2c", diff --git a/Apps/IN/INTDS/test/TDSOnPurchase/app.json b/Apps/IN/INTDS/test/TDSOnPurchase/app.json index 91665b1728..115ef4b8ea 100644 --- a/Apps/IN/INTDS/test/TDSOnPurchase/app.json +++ b/Apps/IN/INTDS/test/TDSOnPurchase/app.json @@ -46,7 +46,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18791, diff --git a/Apps/IN/INTDS/test/TDSReturnAndSettlement/app.json b/Apps/IN/INTDS/test/TDSReturnAndSettlement/app.json index 8104288aec..a4539fc3bb 100644 --- a/Apps/IN/INTDS/test/TDSReturnAndSettlement/app.json +++ b/Apps/IN/INTDS/test/TDSReturnAndSettlement/app.json @@ -13,7 +13,7 @@ "TranslationFile" ], "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/IN/INTDS/test/app.json b/Apps/IN/INTDS/test/app.json index 17844ebaf1..75a6d1238c 100644 --- a/Apps/IN/INTDS/test/app.json +++ b/Apps/IN/INTDS/test/app.json @@ -59,7 +59,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18681, diff --git a/Apps/IN/INTaxBase/app/app.json b/Apps/IN/INTaxBase/app/app.json index 8854559aa1..26f1b9bf46 100644 --- a/Apps/IN/INTaxBase/app/app.json +++ b/Apps/IN/INTaxBase/app/app.json @@ -24,7 +24,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18543, diff --git a/Apps/IN/INTaxBase/test/app.json b/Apps/IN/INTaxBase/test/app.json index f858ca7cb1..9851bd19a2 100644 --- a/Apps/IN/INTaxBase/test/app.json +++ b/Apps/IN/INTaxBase/test/app.json @@ -28,7 +28,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/INVoucherInterface/app/app.json b/Apps/IN/INVoucherInterface/app/app.json index 1c4f8b0769..a680f47b50 100644 --- a/Apps/IN/INVoucherInterface/app/app.json +++ b/Apps/IN/INVoucherInterface/app/app.json @@ -29,7 +29,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 18929, diff --git a/Apps/IN/INVoucherInterface/test/app.json b/Apps/IN/INVoucherInterface/test/app.json index 917b59c266..68fdf048e3 100644 --- a/Apps/IN/INVoucherInterface/test/app.json +++ b/Apps/IN/INVoucherInterface/test/app.json @@ -55,7 +55,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IN/QRGeneration/app/app.json b/Apps/IN/QRGeneration/app/app.json index 902bafaa3d..3d40b2ddb7 100644 --- a/Apps/IN/QRGeneration/app/app.json +++ b/Apps/IN/QRGeneration/app/app.json @@ -16,7 +16,7 @@ ], "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IS/ContosoCoffeeDemoDatasetIS/app/app.json b/Apps/IS/ContosoCoffeeDemoDatasetIS/app/app.json index 01b7ecf8bd..a10c59425a 100644 --- a/Apps/IS/ContosoCoffeeDemoDatasetIS/app/app.json +++ b/Apps/IS/ContosoCoffeeDemoDatasetIS/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IS/ISCore/app/app.json b/Apps/IS/ISCore/app/app.json index 16870502e9..0785c4a3e7 100644 --- a/Apps/IS/ISCore/app/app.json +++ b/Apps/IS/ISCore/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IS/ISCore/test/app.json b/Apps/IS/ISCore/test/app.json index 3a0b2e9103..e72e69123c 100644 --- a/Apps/IS/ISCore/test/app.json +++ b/Apps/IS/ISCore/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IT/ContosoCoffeeDemoDatasetIT/app/app.json b/Apps/IT/ContosoCoffeeDemoDatasetIT/app/app.json index f818a69f8a..8c46f6d5dd 100644 --- a/Apps/IT/ContosoCoffeeDemoDatasetIT/app/app.json +++ b/Apps/IT/ContosoCoffeeDemoDatasetIT/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/IT/EDocumentIT/demo data/app.json b/Apps/IT/EDocumentIT/demo data/app.json index 3368f0dcdd..acc0ca7746 100644 --- a/Apps/IT/EDocumentIT/demo data/app.json +++ b/Apps/IT/EDocumentIT/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/IT/HybridBCLast_IT/app/app.json b/Apps/IT/HybridBCLast_IT/app/app.json index bf3026f06b..398cb2d306 100644 --- a/Apps/IT/HybridBCLast_IT/app/app.json +++ b/Apps/IT/HybridBCLast_IT/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/IT/IntrastatIT/app/app.json b/Apps/IT/IntrastatIT/app/app.json index 845e7f3fd8..ced21e2f6e 100644 --- a/Apps/IT/IntrastatIT/app/app.json +++ b/Apps/IT/IntrastatIT/app/app.json @@ -27,7 +27,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148121, diff --git a/Apps/IT/IntrastatIT/test/app.json b/Apps/IT/IntrastatIT/test/app.json index 817f3dded9..64d63e9850 100644 --- a/Apps/IT/IntrastatIT/test/app.json +++ b/Apps/IT/IntrastatIT/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2179727", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/IT/ServiceDeclarationIT/app/app.json b/Apps/IT/ServiceDeclarationIT/app/app.json index 1bfbc9ed90..963bd36947 100644 --- a/Apps/IT/ServiceDeclarationIT/app/app.json +++ b/Apps/IT/ServiceDeclarationIT/app/app.json @@ -27,7 +27,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 12214, diff --git a/Apps/IT/ServiceDeclarationIT/test/app.json b/Apps/IT/ServiceDeclarationIT/test/app.json index e81f40c3d0..fead595323 100644 --- a/Apps/IT/ServiceDeclarationIT/test/app.json +++ b/Apps/IT/ServiceDeclarationIT/test/app.json @@ -10,7 +10,7 @@ "help": "https://learn.microsoft.com/en-us/dynamics365/business-central/finance-how-setup-use-service-declaration", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/MX/ContosoCoffeeDemoDatasetMX/app/app.json b/Apps/MX/ContosoCoffeeDemoDatasetMX/app/app.json index 9a07de9059..25fa023ed3 100644 --- a/Apps/MX/ContosoCoffeeDemoDatasetMX/app/app.json +++ b/Apps/MX/ContosoCoffeeDemoDatasetMX/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/MX/HybridBCLast_MX/app/app.json b/Apps/MX/HybridBCLast_MX/app/app.json index 5cdc310a65..c91ac50e16 100644 --- a/Apps/MX/HybridBCLast_MX/app/app.json +++ b/Apps/MX/HybridBCLast_MX/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/NA/Ceridian/app/app.json b/Apps/NA/Ceridian/app/app.json index 4d1942c21d..45fd984d97 100644 --- a/Apps/NA/Ceridian/app/app.json +++ b/Apps/NA/Ceridian/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/app/app.json b/Apps/NA/EnvestnetYodleeBankFeeds/app/app.json index b4c733330c..829dcd8bf4 100644 --- a/Apps/NA/EnvestnetYodleeBankFeeds/app/app.json +++ b/Apps/NA/EnvestnetYodleeBankFeeds/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/app.json b/Apps/NA/EnvestnetYodleeBankFeeds/test/app.json index 2f00c3a4e1..1668383dba 100644 --- a/Apps/NA/EnvestnetYodleeBankFeeds/test/app.json +++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/NA/ExtendedBankDepositNA/app/app.json b/Apps/NA/ExtendedBankDepositNA/app/app.json index e2d3f0a1d4..e615c6b62c 100644 --- a/Apps/NA/ExtendedBankDepositNA/app/app.json +++ b/Apps/NA/ExtendedBankDepositNA/app/app.json @@ -19,7 +19,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10154, diff --git a/Apps/NA/MX_DIOT/app/app.json b/Apps/NA/MX_DIOT/app/app.json index 8e889002e6..ff1cfe34d2 100644 --- a/Apps/NA/MX_DIOT/app/app.json +++ b/Apps/NA/MX_DIOT/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 27020, diff --git a/Apps/NA/MX_DIOT/test/app.json b/Apps/NA/MX_DIOT/test/app.json index a08b14ef49..d1560ce020 100644 --- a/Apps/NA/MX_DIOT/test/app.json +++ b/Apps/NA/MX_DIOT/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, "allowDownloadingSource": true, diff --git a/Apps/NA/Onprem Permissions NA/app/app.json b/Apps/NA/Onprem Permissions NA/app/app.json index 657a01856e..dfcf81d5b8 100644 --- a/Apps/NA/Onprem Permissions NA/app/app.json +++ b/Apps/NA/Onprem Permissions NA/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/NA/PEPPOLNA/app/app.json b/Apps/NA/PEPPOLNA/app/app.json index 635eb059ac..22cc62602f 100644 --- a/Apps/NA/PEPPOLNA/app/app.json +++ b/Apps/NA/PEPPOLNA/app/app.json @@ -6,7 +6,7 @@ "brief": "PEPPOL BIS 3.0 NA localization.", "version": "29.0.0.0", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009", "EULA": "https://go.microsoft.com/fwlink/?linkid=2009120", diff --git a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/app.json b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/app.json index 6d2566c3ce..2887046227 100644 --- a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/app.json +++ b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/NL/EDocument_NL/demo data/app.json b/Apps/NL/EDocument_NL/demo data/app.json index fb65eb6728..e30ec7b586 100644 --- a/Apps/NL/EDocument_NL/demo data/app.json +++ b/Apps/NL/EDocument_NL/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 11551, diff --git a/Apps/NL/IntrastatNL/app/app.json b/Apps/NL/IntrastatNL/app/app.json index a2e44e1133..da333405b4 100644 --- a/Apps/NL/IntrastatNL/app/app.json +++ b/Apps/NL/IntrastatNL/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 11426, diff --git a/Apps/NL/NLDigitalTaxDeclaration/app/app.json b/Apps/NL/NLDigitalTaxDeclaration/app/app.json index 82af41280f..182b0d0afd 100644 --- a/Apps/NL/NLDigitalTaxDeclaration/app/app.json +++ b/Apps/NL/NLDigitalTaxDeclaration/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/NL/NLDigitalTaxDeclaration/test/app.json b/Apps/NL/NLDigitalTaxDeclaration/test/app.json index bf65111c14..0841d4147d 100644 --- a/Apps/NL/NLDigitalTaxDeclaration/test/app.json +++ b/Apps/NL/NLDigitalTaxDeclaration/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/NO/ContosoCoffeeDemoDatasetNO/app/app.json b/Apps/NO/ContosoCoffeeDemoDatasetNO/app/app.json index deea63c866..db0bcfb1ed 100644 --- a/Apps/NO/ContosoCoffeeDemoDatasetNO/app/app.json +++ b/Apps/NO/ContosoCoffeeDemoDatasetNO/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/NO/EDocument_NO/demo data/app.json b/Apps/NO/EDocument_NO/demo data/app.json index 7a6e6e2c4c..cff9486c5a 100644 --- a/Apps/NO/EDocument_NO/demo data/app.json +++ b/Apps/NO/EDocument_NO/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10731, diff --git a/Apps/NO/ElectronicVATSubmission/app/app.json b/Apps/NO/ElectronicVATSubmission/app/app.json index b1fba13531..d3131b69b9 100644 --- a/Apps/NO/ElectronicVATSubmission/app/app.json +++ b/Apps/NO/ElectronicVATSubmission/app/app.json @@ -25,7 +25,7 @@ "to": 10699 } ], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/NO/ElectronicVATSubmission/test/app.json b/Apps/NO/ElectronicVATSubmission/test/app.json index 8d75844d52..9cc52939c2 100644 --- a/Apps/NO/ElectronicVATSubmission/test/app.json +++ b/Apps/NO/ElectronicVATSubmission/test/app.json @@ -41,7 +41,7 @@ "to": 148135 } ], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/NO/ImportNOPayroll/app/app.json b/Apps/NO/ImportNOPayroll/app/app.json index 2c1192fec8..56751fed75 100644 --- a/Apps/NO/ImportNOPayroll/app/app.json +++ b/Apps/NO/ImportNOPayroll/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/NO/ImportNOPayroll/test/app.json b/Apps/NO/ImportNOPayroll/test/app.json index 252c56b3e3..03f061ffd0 100644 --- a/Apps/NO/ImportNOPayroll/test/app.json +++ b/Apps/NO/ImportNOPayroll/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/NO/NorwegianSAFT/app/app.json b/Apps/NO/NorwegianSAFT/app/app.json index db953952eb..1526022159 100644 --- a/Apps/NO/NorwegianSAFT/app/app.json +++ b/Apps/NO/NorwegianSAFT/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/NO/NorwegianSAFT/test/app.json b/Apps/NO/NorwegianSAFT/test/app.json index da12d73f7a..a944722a58 100644 --- a/Apps/NO/NorwegianSAFT/test/app.json +++ b/Apps/NO/NorwegianSAFT/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/NO/PEPPOLNO/app/ExtensionLogo.png b/Apps/NO/PEPPOLNO/app/ExtensionLogo.png new file mode 100644 index 0000000000..689824d333 Binary files /dev/null and b/Apps/NO/PEPPOLNO/app/ExtensionLogo.png differ diff --git a/Apps/NO/PEPPOLNO/app/app.json b/Apps/NO/PEPPOLNO/app/app.json new file mode 100644 index 0000000000..dbec011eee --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/app.json @@ -0,0 +1,42 @@ +{ + "id": "f3a8b1c2-d4e5-4a89-9abc-def123456799", + "name": "PEPPOL NO", + "publisher": "Microsoft", + "description": "Norway-specific PEPPOL BIS 3.0 customizations for electronic invoicing, including reminder and finance charge export, Norwegian tax scheme, and KID-based payment IDs.", + "brief": "PEPPOL BIS 3.0 NO localization.", + "version": "29.0.0.0", + "logo": "ExtensionLogo.png", + "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://go.microsoft.com/fwlink/?linkid=2206603", + "propagateDependencies": true, + "dependencies": [ + { + "id": "e1966889-b5fb-4fda-a84c-ea71b590e1a9", + "name": "PEPPOL", + "publisher": "Microsoft", + "version": "29.0.0.0" + } + ], + "internalsVisibleTo": [], + "platform": "29.0.0.0", + "idRanges": [ + { + "from": 37350, + "to": 37399 + } + ], + "application": "29.0.0.0", + "features": [ + "NoImplicitWith", + "TranslationFile" + ], + "resourceExposurePolicy": { + "allowDebugging": true, + "allowDownloadingSource": true, + "includeSourceInSymbolFile": true + }, + "target": "Cloud" +} diff --git a/Apps/NO/PEPPOLNO/app/src/ExpSalesCrMPEPPOL30NO.Codeunit.al b/Apps/NO/PEPPOLNO/app/src/ExpSalesCrMPEPPOL30NO.Codeunit.al new file mode 100644 index 0000000000..1dd7450b32 --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/ExpSalesCrMPEPPOL30NO.Codeunit.al @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +using Microsoft.Sales.History; +using System.IO; + +codeunit 37358 "Exp. Sales CrM. PEPPOL30 NO" +{ + TableNo = "Record Export Buffer"; + InherentEntitlements = X; + InherentPermissions = X; + Access = Internal; + + trigger OnRun() + var + SalesCrMemoHeader: Record "Sales Cr.Memo Header"; + PeppolSetup: Record "PEPPOL 3.0 Setup"; + RecordRef: RecordRef; + PEPPOL30Validation: Interface "PEPPOL30 Validation"; + OutStr: OutStream; + begin + RecordRef.Get(Rec.RecordID); + RecordRef.SetTable(SalesCrMemoHeader); + + PeppolSetup.GetSetup(); + PEPPOL30Validation := PeppolSetup."PEPPOL 3.0 Sales Format"; + PEPPOL30Validation.ValidatePostedDocument(SalesCrMemoHeader); + + Rec."File Content".CreateOutStream(OutStr); + GenerateXMLFile(SalesCrMemoHeader, OutStr, PeppolSetup."PEPPOL 3.0 Sales Format"); + + Rec.Modify(false); + end; + + procedure GenerateXMLFile(VariantRec: Variant; var OutStr: OutStream; Format: Enum "PEPPOL 3.0 Format") + var + SalesCrMemoPEPPOLBIS30NO: XMLport "Sales Cr.Memo - PEPPOL30 NO"; + begin + SalesCrMemoPEPPOLBIS30NO.Initialize(VariantRec, Format); + SalesCrMemoPEPPOLBIS30NO.SetDestination(OutStr); + SalesCrMemoPEPPOLBIS30NO.Export(); + end; +} diff --git a/Apps/NO/PEPPOLNO/app/src/ExpSalesInvPEPPOL30NO.Codeunit.al b/Apps/NO/PEPPOLNO/app/src/ExpSalesInvPEPPOL30NO.Codeunit.al new file mode 100644 index 0000000000..4b7fef9755 --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/ExpSalesInvPEPPOL30NO.Codeunit.al @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +using Microsoft.Sales.History; +using System.IO; + +codeunit 37357 "Exp. Sales Inv. PEPPOL30 NO" +{ + TableNo = "Record Export Buffer"; + InherentEntitlements = X; + InherentPermissions = X; + Access = Internal; + + trigger OnRun() + var + SalesInvoiceHeader: Record "Sales Invoice Header"; + PeppolSetup: Record "PEPPOL 3.0 Setup"; + RecordRef: RecordRef; + PEPPOL30Validation: Interface "PEPPOL30 Validation"; + OutStr: OutStream; + begin + RecordRef.Get(Rec.RecordID); + RecordRef.SetTable(SalesInvoiceHeader); + + PeppolSetup.GetSetup(); + PEPPOL30Validation := PeppolSetup."PEPPOL 3.0 Sales Format"; + PEPPOL30Validation.ValidatePostedDocument(SalesInvoiceHeader); + + Rec."File Content".CreateOutStream(OutStr); + GenerateXMLFile(SalesInvoiceHeader, OutStr, PeppolSetup."PEPPOL 3.0 Sales Format"); + Rec.Modify(false); + end; + + procedure GenerateXMLFile(VariantRec: Variant; var OutStr: OutStream; Format: Enum "PEPPOL 3.0 Format") + var + SalesInvoicePEPPOLBIS30NO: XMLport "Sales Invoice - PEPPOL30 NO"; + begin + SalesInvoicePEPPOLBIS30NO.Initialize(VariantRec, Format); + SalesInvoicePEPPOLBIS30NO.SetDestination(OutStr); + SalesInvoicePEPPOLBIS30NO.Export(); + end; +} diff --git a/Apps/NO/PEPPOLNO/app/src/ExpServCrMPEPPOL30NO.Codeunit.al b/Apps/NO/PEPPOLNO/app/src/ExpServCrMPEPPOL30NO.Codeunit.al new file mode 100644 index 0000000000..c067c4dc65 --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/ExpServCrMPEPPOL30NO.Codeunit.al @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +using Microsoft.Service.History; +using System.IO; + +codeunit 37360 "Exp. Serv.CrM. PEPPOL30 NO" +{ + TableNo = "Record Export Buffer"; + InherentEntitlements = X; + InherentPermissions = X; + Access = Internal; + + trigger OnRun() + var + ServiceCrMemoHeader: Record "Service Cr.Memo Header"; + PeppolSetup: Record "PEPPOL 3.0 Setup"; + RecordRef: RecordRef; + PEPPOL30Validation: Interface "PEPPOL30 Validation"; + OutStr: OutStream; + begin + RecordRef.Get(Rec.RecordID); + RecordRef.SetTable(ServiceCrMemoHeader); + + PeppolSetup.GetSetup(); + PEPPOL30Validation := PeppolSetup."PEPPOL 3.0 Service Format"; + PEPPOL30Validation.ValidatePostedDocument(ServiceCrMemoHeader); + + Rec."File Content".CreateOutStream(OutStr); + GenerateXMLFile(ServiceCrMemoHeader, OutStr, PeppolSetup."PEPPOL 3.0 Service Format"); + + Rec.Modify(false); + end; + + procedure GenerateXMLFile(VariantRec: Variant; var OutStr: OutStream; PEPPOL30Format: Enum "PEPPOL 3.0 Format") + var + SalesCrMemoPEPPOLBIS30NO: XMLport "Sales Cr.Memo - PEPPOL30 NO"; + begin + SalesCrMemoPEPPOLBIS30NO.Initialize(VariantRec, PEPPOL30Format); + SalesCrMemoPEPPOLBIS30NO.SetDestination(OutStr); + SalesCrMemoPEPPOLBIS30NO.Export(); + end; +} diff --git a/Apps/NO/PEPPOLNO/app/src/ExpServInvPEPPOL30NO.Codeunit.al b/Apps/NO/PEPPOLNO/app/src/ExpServInvPEPPOL30NO.Codeunit.al new file mode 100644 index 0000000000..e8106147d6 --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/ExpServInvPEPPOL30NO.Codeunit.al @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +using Microsoft.Service.History; +using System.IO; + +codeunit 37359 "Exp. Serv.Inv. PEPPOL30 NO" +{ + TableNo = "Record Export Buffer"; + InherentEntitlements = X; + InherentPermissions = X; + Access = Internal; + + trigger OnRun() + var + ServiceInvoiceHeader: Record "Service Invoice Header"; + PeppolSetup: Record "PEPPOL 3.0 Setup"; + RecordRef: RecordRef; + PEPPOL30Validation: Interface "PEPPOL30 Validation"; + OutStr: OutStream; + begin + RecordRef.Get(Rec.RecordID); + RecordRef.SetTable(ServiceInvoiceHeader); + + PeppolSetup.GetSetup(); + PEPPOL30Validation := PeppolSetup."PEPPOL 3.0 Service Format"; + PEPPOL30Validation.ValidatePostedDocument(ServiceInvoiceHeader); + + Rec."File Content".CreateOutStream(OutStr); + GenerateXMLFile(ServiceInvoiceHeader, OutStr, PeppolSetup."PEPPOL 3.0 Service Format"); + Rec.Modify(false); + end; + + procedure GenerateXMLFile(VariantRec: Variant; var OutStr: OutStream; PEPPOL30Format: Enum "PEPPOL 3.0 Format") + var + SalesInvoicePEPPOLBIS30NO: XMLport "Sales Invoice - PEPPOL30 NO"; + begin + SalesInvoicePEPPOLBIS30NO.Initialize(VariantRec, PEPPOL30Format); + SalesInvoicePEPPOLBIS30NO.SetDestination(OutStr); + SalesInvoicePEPPOLBIS30NO.Export(); + end; +} diff --git a/Apps/NO/PEPPOLNO/app/src/PEPPOL30FormatNO.EnumExt.al b/Apps/NO/PEPPOLNO/app/src/PEPPOL30FormatNO.EnumExt.al new file mode 100644 index 0000000000..7c87e36acc --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/PEPPOL30FormatNO.EnumExt.al @@ -0,0 +1,23 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +enumextension 37350 "PEPPOL 3.0 Format NO" extends "PEPPOL 3.0 Format" +{ + value(37350; "PEPPOL 3.0 - Sales NO") + { + Caption = 'PEPPOL 3.0 - Norway Sales Format'; + Implementation = "PEPPOL30 Validation" = "PEPPOL30 Sales Validation", + "PEPPOL Payment Info Provider" = "PEPPOL30 NO Payment", + "PEPPOL Posted Document Iterator" = "PEPPOL30 Sales Iterator"; + } + value(37351; "PEPPOL 3.0 - Service NO") + { + Caption = 'PEPPOL 3.0 - Norway Service Format'; + Implementation = "PEPPOL30 Validation" = "PEPPOL30 Service Validation", + "PEPPOL Payment Info Provider" = "PEPPOL30 NO Payment", + "PEPPOL Posted Document Iterator" = "PEPPOL30 Services Iterator"; + } +} diff --git a/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOInstall.Codeunit.al b/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOInstall.Codeunit.al new file mode 100644 index 0000000000..1aa004d032 --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOInstall.Codeunit.al @@ -0,0 +1,51 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +using Microsoft.Foundation.Reporting; + +codeunit 37352 "PEPPOL30 NO Install" +{ + Subtype = Install; + InherentEntitlements = X; + InherentPermissions = X; + Access = Internal; + + trigger OnInstallAppPerCompany() + begin + CreateElectronicDocumentFormats(); + end; + + internal procedure CreateElectronicDocumentFormats() + var + ElectronicDocumentFormat: Record "Electronic Document Format"; + PEPPOLBIS3NO_ElectronicFormatDescriptionTxt: Label 'PEPPOL BIS3 Format Norway (Norwegian localization)'; + PEPPOLBIS3NO_ElectronicFormatTxt: Label 'PEPPOL30NO', Locked = true; + begin + ElectronicDocumentFormat.InsertElectronicFormat( + PEPPOLBIS3NO_ElectronicFormatTxt, PEPPOLBIS3NO_ElectronicFormatDescriptionTxt, + Codeunit::"Exp. Sales Inv. PEPPOL30 NO", 0, ElectronicDocumentFormat.Usage::"Sales Invoice".AsInteger()); + + ElectronicDocumentFormat.InsertElectronicFormat( + PEPPOLBIS3NO_ElectronicFormatTxt, PEPPOLBIS3NO_ElectronicFormatDescriptionTxt, + Codeunit::"Exp. Sales CrM. PEPPOL30 NO", 0, ElectronicDocumentFormat.Usage::"Sales Credit Memo".AsInteger()); + + ElectronicDocumentFormat.InsertElectronicFormat( + PEPPOLBIS3NO_ElectronicFormatTxt, PEPPOLBIS3NO_ElectronicFormatDescriptionTxt, + Codeunit::"PEPPOL30 Sales Validation", 0, ElectronicDocumentFormat.Usage::"Sales Validation".AsInteger()); + + ElectronicDocumentFormat.InsertElectronicFormat( + PEPPOLBIS3NO_ElectronicFormatTxt, PEPPOLBIS3NO_ElectronicFormatDescriptionTxt, + Codeunit::"Exp. Serv.Inv. PEPPOL30 NO", 0, ElectronicDocumentFormat.Usage::"Service Invoice".AsInteger()); + + ElectronicDocumentFormat.InsertElectronicFormat( + PEPPOLBIS3NO_ElectronicFormatTxt, PEPPOLBIS3NO_ElectronicFormatDescriptionTxt, + Codeunit::"Exp. Serv.CrM. PEPPOL30 NO", 0, ElectronicDocumentFormat.Usage::"Service Credit Memo".AsInteger()); + + ElectronicDocumentFormat.InsertElectronicFormat( + PEPPOLBIS3NO_ElectronicFormatTxt, PEPPOLBIS3NO_ElectronicFormatDescriptionTxt, + Codeunit::"PEPPOL30 Service Validation", 0, ElectronicDocumentFormat.Usage::"Service Validation".AsInteger()); + end; +} diff --git a/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOManagement.Codeunit.al b/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOManagement.Codeunit.al new file mode 100644 index 0000000000..a4667aa72f --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOManagement.Codeunit.al @@ -0,0 +1,228 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.VAT.Calculation; +using Microsoft.Sales.Document; +using Microsoft.Sales.FinanceCharge; +using Microsoft.Sales.Reminder; +using Microsoft.Utilities; + +codeunit 37350 "PEPPOL30 NO Management" +{ + Access = Public; + InherentEntitlements = X; + InherentPermissions = X; + + var + TAXTxt: Label 'TAX', Locked = true; + BusinessEnterprisesTxt: Label 'Foretaksregisteret', Locked = true; + AllowanceChargeReasonReminderTxt: Label 'REM', Locked = true; + PaymentMeansFundsTransferCodeTxt: Label '31', Locked = true; + ReminderLineTxt: Label 'Invoice %1 amount %2', Comment = '%1 - invoice no., %2 - amount.'; + VATTxt: Label 'VAT', Locked = true; + + procedure GetAccountingSupplierPartyTaxSchemeNO(var CompanyID: Text; var CompanyIDSchemeID: Text; var TaxSchemeID: Text) + begin + CompanyID := BusinessEnterprisesTxt; + CompanyIDSchemeID := ''; + TaxSchemeID := TAXTxt; + end; + + procedure GetPaymentMeansInfoReminder(SalesHeader: Record "Sales Header"; var PaymentMeansCode: Text; var PaymentChannelCode: Text; var PaymentID: Text; var PrimaryAccountNumberID: Text; var NetworkID: Text) + var + DocumentTools: Codeunit DocumentTools; + begin + PaymentMeansCode := PaymentMeansFundsTransferCodeTxt; + PaymentChannelCode := ''; + PaymentID := DocumentTools.GetEHFDocumentPaymentID(SalesHeader, SalesHeader."Doc. No. Occurrence"); + PrimaryAccountNumberID := ''; + NetworkID := ''; + end; + + procedure GetAllowanceChargeInfoReminder(VATAmtLine: Record "VAT Amount Line"; SalesHeader: Record "Sales Header"; var ChargeIndicator: Text; var AllowanceChargeReasonCode: Text; var AllowanceChargeReason: Text; var Amount: Text; var AllowanceChargeCurrencyID: Text; var TaxCategoryID: Text; var TaxCategorySchemeID: Text; var Percent: Text; var AllowanceChargeTaxSchemeID: Text) + begin + ChargeIndicator := 'true'; + AllowanceChargeReasonCode := ''; + AllowanceChargeReason := AllowanceChargeReasonReminderTxt; + Amount := Format(VATAmtLine."Amount Including VAT" - VATAmtLine."VAT Amount", 0, 9); + AllowanceChargeCurrencyID := GetSalesDocCurrencyCode(SalesHeader); + TaxCategoryID := VATAmtLine."Tax Category"; + TaxCategorySchemeID := ''; + Percent := Format(VATAmtLine."VAT %", 0, 9); + AllowanceChargeTaxSchemeID := VATTxt; + end; + + procedure CopyIssuedFinCharge(var TempSalesHeader: Record "Sales Header" temporary; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineInvRounding: Record "Sales Line" temporary; FinChargeNo: Code[20]) + var + IssuedFinChargeMemoHeader: Record "Issued Fin. Charge Memo Header"; + IssuedFinChargeMemoLine: Record "Issued Fin. Charge Memo Line"; + IssuedReminderHeader: Record "Issued Reminder Header"; + IssuedReminderLine: Record "Issued Reminder Line"; + begin + IssuedFinChargeMemoHeader.Get(FinChargeNo); + IssuedReminderHeader.TransferFields(IssuedFinChargeMemoHeader); + ReminderHeaderToSalesHeader(TempSalesHeader, IssuedReminderHeader, 2); + IssuedFinChargeMemoLine.SetRange("Finance Charge Memo No.", FinChargeNo); + if IssuedFinChargeMemoLine.FindSet() then + repeat + IssuedReminderLine.TransferFields(IssuedFinChargeMemoLine); + ReminderLineToSalesLine(TempSalesLine, TempSalesLineInvRounding, IssuedReminderHeader, IssuedReminderLine); + until IssuedFinChargeMemoLine.Next() = 0; + end; + + procedure CopyIssuedReminder(var TempSalesHeader: Record "Sales Header" temporary; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineInvRounding: Record "Sales Line" temporary; ReminderNo: Code[20]) + var + IssuedReminderHeader: Record "Issued Reminder Header"; + IssuedReminderLine: Record "Issued Reminder Line"; + begin + IssuedReminderHeader.Get(ReminderNo); + ReminderHeaderToSalesHeader(TempSalesHeader, IssuedReminderHeader, 3); + + IssuedReminderLine.SetRange("Reminder No.", ReminderNo); + if IssuedReminderLine.FindSet() then + repeat + ReminderLineToSalesLine(TempSalesLine, TempSalesLineInvRounding, IssuedReminderHeader, IssuedReminderLine); + until IssuedReminderLine.Next() = 0; + end; + + procedure CopyFinCharge(var TempSalesHeader: Record "Sales Header" temporary; var TempSalesLine: Record "Sales Line" temporary; FinChargeNo: Code[20]) + var + FinanceChargeMemoHeader: Record "Finance Charge Memo Header"; + FinanceChargeMemoLine: Record "Finance Charge Memo Line"; + IssuedReminderHeader: Record "Issued Reminder Header"; + IssuedReminderLine: Record "Issued Reminder Line"; + TempSalesLineInvRounding: Record "Sales Line" temporary; + begin + FinanceChargeMemoHeader.Get(FinChargeNo); + IssuedReminderHeader.TransferFields(FinanceChargeMemoHeader); + ReminderHeaderToSalesHeader(TempSalesHeader, IssuedReminderHeader, 2); + FinanceChargeMemoLine.SetRange("Finance Charge Memo No.", FinChargeNo); + if FinanceChargeMemoLine.FindSet() then + repeat + IssuedReminderLine.TransferFields(FinanceChargeMemoLine); + ReminderLineToSalesLine(TempSalesLine, TempSalesLineInvRounding, IssuedReminderHeader, IssuedReminderLine); + until FinanceChargeMemoLine.Next() = 0; + end; + + procedure CopyReminder(var TempSalesHeader: Record "Sales Header" temporary; var TempSalesLine: Record "Sales Line" temporary; ReminderNo: Code[20]) + var + ReminderHeader: Record "Reminder Header"; + ReminderLine: Record "Reminder Line"; + IssuedReminderHeader: Record "Issued Reminder Header"; + IssuedReminderLine: Record "Issued Reminder Line"; + TempSalesLineInvRounding: Record "Sales Line" temporary; + begin + ReminderHeader.Get(ReminderNo); + IssuedReminderHeader.TransferFields(ReminderHeader); + ReminderHeaderToSalesHeader(TempSalesHeader, IssuedReminderHeader, 3); + ReminderLine.SetRange("Reminder No.", ReminderNo); + if ReminderLine.FindSet() then + repeat + IssuedReminderLine.TransferFields(ReminderLine); + ReminderLineToSalesLine(TempSalesLine, TempSalesLineInvRounding, IssuedReminderHeader, IssuedReminderLine); + until ReminderLine.Next() = 0; + end; + + procedure GetBillingReferenceInfo(var TempSalesLine: Record "Sales Line" temporary; var InvoiceDocRefID: Text) + begin + TempSalesLine.SetFilter("Document No.", '<>%1', ''); + TempSalesLine.FindFirst(); + InvoiceDocRefID := TempSalesLine."Document No."; + end; + + procedure GetReminderLineNote(SalesLine: Record "Sales Line"): Text + begin + if SalesLine.Type = SalesLine.Type::"G/L Account" then + exit(Format(SalesLine.Type)); + + exit( + StrSubstNo(ReminderLineTxt, SalesLine."Description 2", SalesLine."Outstanding Amount")) + end; + + local procedure ReminderHeaderToSalesHeader(var TempSalesHeader: Record "Sales Header" temporary; IssuedReminderHeader: Record "Issued Reminder Header"; GiroKIDDocType: Integer) + begin + TempSalesHeader.Init(); + TempSalesHeader."No." := IssuedReminderHeader."No."; + TempSalesHeader."Document Date" := IssuedReminderHeader."Document Date"; + TempSalesHeader."Posting Date" := IssuedReminderHeader."Posting Date"; + TempSalesHeader."Due Date" := IssuedReminderHeader."Due Date"; + TempSalesHeader."Currency Code" := IssuedReminderHeader."Currency Code"; + TempSalesHeader."Bill-to Customer No." := IssuedReminderHeader."Customer No."; + TempSalesHeader."Bill-to Country/Region Code" := IssuedReminderHeader."Country/Region Code"; + TempSalesHeader."Bill-to Name" := IssuedReminderHeader.Name; + TempSalesHeader."Bill-to Address" := IssuedReminderHeader.Address; + TempSalesHeader."Bill-to Address 2" := IssuedReminderHeader."Address 2"; + TempSalesHeader."Bill-to City" := IssuedReminderHeader.City; + TempSalesHeader."Bill-to Post Code" := IssuedReminderHeader."Post Code"; + TempSalesHeader."Bill-to County" := IssuedReminderHeader.County; + if IssuedReminderHeader."Your Reference" = '' then + TempSalesHeader."Your Reference" := IssuedReminderHeader."No." + else + TempSalesHeader."Your Reference" := IssuedReminderHeader."Your Reference"; + TempSalesHeader."Language Code" := IssuedReminderHeader."Language Code"; + TempSalesHeader."VAT Registration No." := IssuedReminderHeader."VAT Registration No."; + TempSalesHeader.GLN := IssuedReminderHeader.GLN; + TempSalesHeader."Doc. No. Occurrence" := GiroKIDDocType; + TempSalesHeader."Shipment Date" := TempSalesHeader."Document Date"; + TempSalesHeader."Ship-to Address" := TempSalesHeader."Bill-to Address"; + TempSalesHeader."Ship-to City" := TempSalesHeader."Bill-to City"; + TempSalesHeader."Ship-to Post Code" := TempSalesHeader."Bill-to Post Code"; + TempSalesHeader."Ship-to Country/Region Code" := TempSalesHeader."Bill-to Country/Region Code"; + TempSalesHeader.Insert(); + end; + + local procedure ReminderLineToSalesLine(var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineInvRounding: Record "Sales Line" temporary; IssuedReminderHeader: Record "Issued Reminder Header"; IssuedReminderLine: Record "Issued Reminder Line") + var + PEPPOL30: Codeunit "PEPPOL30"; + begin + if (IssuedReminderLine.Type = IssuedReminderLine.Type::" ") and (IssuedReminderLine."No." = '') and + (IssuedReminderLine.Description = '') + then + exit; + + TempSalesLine.Init(); + TempSalesLine."Document No." := IssuedReminderLine."Reminder No."; + TempSalesLine."Bill-to Customer No." := IssuedReminderHeader."Customer No."; + TempSalesLine."Line No." := IssuedReminderLine."Line No."; + + if IssuedReminderLine.Amount <> 0 then begin + TempSalesLine.Type := TempSalesLine.Type::"G/L Account"; + TempSalesLine.Quantity := 0; + end else begin + TempSalesLine.Type := TempSalesLine.Type::" "; + TempSalesLine.Quantity := 0; + end; + TempSalesLine."No." := IssuedReminderLine."No."; + TempSalesLine.Description := IssuedReminderLine.Description; + TempSalesLine."Description 2" := IssuedReminderLine."Document No."; + TempSalesLine."Unit Price" := IssuedReminderLine.Amount; + TempSalesLine.Amount := IssuedReminderLine.Amount; + TempSalesLine."Amount Including VAT" := IssuedReminderLine.Amount + IssuedReminderLine."VAT Amount"; + TempSalesLine."VAT Bus. Posting Group" := IssuedReminderHeader."VAT Bus. Posting Group"; + TempSalesLine."VAT Prod. Posting Group" := IssuedReminderLine."VAT Prod. Posting Group"; + TempSalesLine."VAT %" := IssuedReminderLine."VAT %"; + TempSalesLine."VAT Calculation Type" := IssuedReminderLine."VAT Calculation Type"; + TempSalesLine."Tax Group Code" := IssuedReminderLine."Tax Group Code"; + TempSalesLine."Outstanding Amount" := IssuedReminderLine."Remaining Amount"; + if PEPPOL30.IsRoundingLine(TempSalesLine, IssuedReminderHeader."Customer No.") then + PEPPOL30.GetInvoiceRoundingLine(TempSalesLineInvRounding, TempSalesLine) + else + TempSalesLine.Insert(); + end; + + local procedure GetSalesDocCurrencyCode(SalesHeader: Record "Sales Header"): Code[10] + var + GLSetup: Record "General Ledger Setup"; + begin + if SalesHeader."Currency Code" = '' then begin + GLSetup.Get(); + GLSetup.TestField("LCY Code"); + exit(GLSetup."LCY Code"); + end; + exit(SalesHeader."Currency Code"); + end; +} diff --git a/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOPayment.Codeunit.al b/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOPayment.Codeunit.al new file mode 100644 index 0000000000..89b43983b9 --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOPayment.Codeunit.al @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +using Microsoft.Finance.VAT.Calculation; +using Microsoft.Sales.Document; +using Microsoft.Utilities; + +codeunit 37354 "PEPPOL30 NO Payment" implements "PEPPOL Payment Info Provider" +{ + Access = Internal; + InherentEntitlements = X; + InherentPermissions = X; + + var + PEPPOL30: Codeunit "PEPPOL30"; + + procedure GetPaymentMeansInfo(SalesHeader: Record "Sales Header"; var PaymentMeansCode: Text; var PaymentMeansListID: Text; var PaymentDueDate: Text; var PaymentChannelCode: Text; var PaymentID: Text; var PrimaryAccountNumberID: Text; var NetworkID: Text) + var + DocumentTools: Codeunit DocumentTools; + begin + PEPPOL30.GetPaymentMeansInfo(SalesHeader, PaymentMeansCode, PaymentMeansListID, PaymentDueDate, PaymentChannelCode, PaymentID, PrimaryAccountNumberID, NetworkID); + PaymentID := DocumentTools.GetEInvoicePEPPOLPaymentID(SalesHeader); + end; + + procedure GetPaymentMeansPayeeFinancialAcc(var PayeeFinancialAccountID: Text; var PaymentMeansSchemeID: Text; var FinancialInstitutionBranchID: Text; var FinancialInstitutionID: Text; var FinancialInstitutionSchemeID: Text; var FinancialInstitutionName: Text) + begin + PEPPOL30.GetPaymentMeansPayeeFinancialAcc(PayeeFinancialAccountID, PaymentMeansSchemeID, FinancialInstitutionBranchID, FinancialInstitutionID, FinancialInstitutionSchemeID, FinancialInstitutionName); + end; + + procedure GetPaymentMeansPayeeFinancialAccBIS(SalesHeader: Record "Sales Header"; var PayeeFinancialAccountID: Text; var FinancialInstitutionBranchID: Text) + begin + PEPPOL30.GetPaymentMeansPayeeFinancialAccBIS(SalesHeader, PayeeFinancialAccountID, FinancialInstitutionBranchID); + end; + + procedure GetPaymentMeansFinancialInstitutionAddr(var FinancialInstitutionStreetName: Text; var AdditionalStreetName: Text; var FinancialInstitutionCityName: Text; var FinancialInstitutionPostalZone: Text; var FinancialInstCountrySubentity: Text; var FinancialInstCountryIdCode: Text; var FinancialInstCountryListID: Text) + begin + PEPPOL30.GetPaymentMeansFinancialInstitutionAddr(FinancialInstitutionStreetName, AdditionalStreetName, FinancialInstitutionCityName, FinancialInstitutionPostalZone, FinancialInstCountrySubentity, FinancialInstCountryIdCode, FinancialInstCountryListID); + end; + + procedure GetPaymentTermsInfo(SalesHeader: Record "Sales Header"; var PaymentTermsNote: Text) + begin + PEPPOL30.GetPaymentTermsInfo(SalesHeader, PaymentTermsNote); + end; + + procedure GetAllowanceChargeInfoPaymentDiscount(VATAmtLine: Record "VAT Amount Line"; SalesHeader: Record "Sales Header"; var ChargeIndicator: Text; var AllowanceChargeReasonCode: Text; var AllowanceChargeListID: Text; var AllowanceChargeReason: Text; var Amount: Text; var AllowanceChargeCurrencyID: Text; var TaxCategoryID: Text; var TaxCategorySchemeID: Text; var Percent: Text; var AllowanceChargeTaxSchemeID: Text) + begin + PEPPOL30.GetAllowanceChargeInfoPaymentDiscount(VATAmtLine, SalesHeader, ChargeIndicator, AllowanceChargeReasonCode, AllowanceChargeListID, AllowanceChargeReason, Amount, AllowanceChargeCurrencyID, TaxCategoryID, TaxCategorySchemeID, Percent, AllowanceChargeTaxSchemeID); + end; +} diff --git a/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOSubscribers.Codeunit.al b/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOSubscribers.Codeunit.al new file mode 100644 index 0000000000..8b3f22dab5 --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOSubscribers.Codeunit.al @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +using Microsoft.Foundation.Company; + +codeunit 37351 "PEPPOL30 NO Subscribers" +{ + InherentEntitlements = X; + InherentPermissions = X; + Access = Internal; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Company-Initialize", OnAfterInitElectronicFormats, '', false, false)] + local procedure CompanyInitialize_OnAfterInitElectronicFormats() + var + PEPPOL30NOInstall: Codeunit "PEPPOL30 NO Install"; + begin + PEPPOL30NOInstall.CreateElectronicDocumentFormats(); + end; + + [EventSubscriber(ObjectType::Table, Database::"PEPPOL 3.0 Setup", OnAfterInsertEvent, '', false, false)] + local procedure OnAfterInsertPEPPOL30Setup(var Rec: Record "PEPPOL 3.0 Setup"; RunTrigger: Boolean) + begin + if Rec.IsTemporary() then + exit; + + Rec."PEPPOL 3.0 Sales Format" := Rec."PEPPOL 3.0 Sales Format"::"PEPPOL 3.0 - Sales NO"; + Rec."PEPPOL 3.0 Service Format" := Rec."PEPPOL 3.0 Service Format"::"PEPPOL 3.0 - Service NO"; + Rec.Modify(); + end; +} diff --git a/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOUpgrade.Codeunit.al b/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOUpgrade.Codeunit.al new file mode 100644 index 0000000000..6ff5bde3dd --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/PEPPOL30NOUpgrade.Codeunit.al @@ -0,0 +1,38 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +using System.Upgrade; + +codeunit 37353 "PEPPOL30 NO Upgrade" +{ + Subtype = Upgrade; + InherentEntitlements = X; + InherentPermissions = X; + Access = Internal; + + trigger OnUpgradePerCompany() + var + UpgradeTag: Codeunit "Upgrade Tag"; + PEPPOL30NOInstall: Codeunit "PEPPOL30 NO Install"; + begin + if not UpgradeTag.HasUpgradeTag(InitialUpgradeTag()) then begin + PEPPOL30NOInstall.CreateElectronicDocumentFormats(); + UpgradeTag.SetUpgradeTag(InitialUpgradeTag()); + end; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Upgrade Tag", OnGetPerCompanyUpgradeTags, '', false, false)] + local procedure OnGetPerCompanyUpgradeTags(var PerCompanyUpgradeTags: List of [Code[250]]) + begin + PerCompanyUpgradeTags.Add(InitialUpgradeTag()); + end; + + local procedure InitialUpgradeTag(): Text[250] + begin + exit('MS-260217-PEPPOLNO-APP-INSTALL'); + end; + +} diff --git a/Apps/NO/PEPPOLNO/app/src/SalesCrMemoPEPPOL30NO.XmlPort.al b/Apps/NO/PEPPOLNO/app/src/SalesCrMemoPEPPOL30NO.XmlPort.al new file mode 100644 index 0000000000..55e20f8cd6 --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/SalesCrMemoPEPPOL30NO.XmlPort.al @@ -0,0 +1,2452 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ + +namespace Microsoft.Peppol; + +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.VAT.Calculation; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.Attachment; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Document; +using Microsoft.Sales.History; +using System.Utilities; + +xmlport 37356 "Sales Cr.Memo - PEPPOL30 NO" +{ + Caption = 'Sales Cr.Memo - PEPPOL BIS 3.0'; + Direction = Export; + Encoding = UTF8; + Namespaces = "" = 'urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2', cac = 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2', cbc = 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2', ccts = 'urn:un:unece:uncefact:documentation:2', qdt = 'urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2', udt = 'urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2'; + InherentEntitlements = X; + InherentPermissions = X; + + schema + { + tableelement(crmemoheaderloop; Integer) + { + MaxOccurs = Once; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'CreditNote'; + textelement(CustomizationID) + { + NamespacePrefix = 'cbc'; + } + textelement(ProfileID) + { + NamespacePrefix = 'cbc'; + } + textelement(ID) + { + NamespacePrefix = 'cbc'; + } + textelement(IssueDate) + { + NamespacePrefix = 'cbc'; + } + textelement(CreditNoteTypeCode) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + CreditNoteTypeCode := '381'; + end; + } + textelement(Note) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if Note = '' then + currXMLport.Skip(); + end; + } + textelement(TaxPointDate) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if TaxPointDate = '' then + currXMLport.Skip(); + end; + } + textelement(DocumentCurrencyCode) + { + NamespacePrefix = 'cbc'; + } + textelement(taxcurrencycodelcy) + { + NamespacePrefix = 'cbc'; + XmlName = 'TaxCurrencyCode'; + + trigger OnBeforePassVariable() + var + PEPPOLTaxInfoProvider: Interface "PEPPOL Tax Info Provider"; + begin + PEPPOLTaxInfoProvider := GetFormat(); + PEPPOLTaxInfoProvider.GetTaxTotalInfoLCY(SalesHeader, TaxAmountLCY, TaxCurrencyCodeLCY, TaxTotalCurrencyIDLCY); + if TaxCurrencyCodeLCY = '' then + currXMLport.Skip(); + end; + } + textelement(AccountingCost) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if AccountingCost = '' then + currXMLport.Skip(); + end; + } + textelement(BuyerReference) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + var + PEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + begin + PEPPOLDocumentInfoProvider := GetFormat(); + BuyerReference := PEPPOLDocumentInfoProvider.GetBuyerReference(SalesHeader); + if BuyerReference = '' then + currXMLport.Skip(); + end; + } + textelement(InvoicePeriod) + { + NamespacePrefix = 'cac'; + textelement(StartDate) + { + NamespacePrefix = 'cbc'; + } + textelement(EndDate) + { + NamespacePrefix = 'cbc'; + } + + trigger OnBeforePassVariable() + var + PEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + begin + PEPPOLDocumentInfoProvider := GetFormat(); + PEPPOLDocumentInfoProvider.GetInvoicePeriodInfo( + StartDate, + EndDate); + + if (StartDate = '') and (EndDate = '') then + currXMLport.Skip(); + end; + } + textelement(OrderReference) + { + NamespacePrefix = 'cac'; + textelement(orderreferenceid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + + trigger OnBeforePassVariable() + var + PEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + begin + PEPPOLDocumentInfoProvider := GetFormat(); + PEPPOLDocumentInfoProvider.GetOrderReferenceInfo( + SalesHeader, + OrderReferenceID); + + if OrderReferenceID = '' then + currXMLport.Skip(); + end; + } + textelement(BillingReference) + { + MinOccurs = Zero; + NamespacePrefix = 'cac'; + textelement(InvoiceDocumentReference) + { + MaxOccurs = Once; + MinOccurs = Zero; + NamespacePrefix = 'cac'; + textelement(invoicedocrefid) + { + MaxOccurs = Once; + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(invoicedocrefissuedate) + { + MaxOccurs = Once; + MinOccurs = Zero; + NamespacePrefix = 'cbc'; + XmlName = 'IssueDate'; + } + + trigger OnBeforePassVariable() + begin + if InvoiceDocRefID = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + begin + PEPPOLDocumentInfoProvider := GetFormat(); + PEPPOLDocumentInfoProvider.GetCrMemoBillingReferenceInfo( + SalesCrMemoHeader, + InvoiceDocRefID, + InvoiceDocRefIssueDate); + + if InvoiceDocRefID = '' then + currXMLport.Skip(); + end; + } + textelement(ContractDocumentReference) + { + NamespacePrefix = 'cac'; + textelement(contractdocumentreferenceid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(DocumentType) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if DocumentType = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + ContractRefDocTypeCodeListID: Text; + DocumentTypeCode: Text; + begin + PEPPOLDocumentInfoProvider := GetFormat(); + PEPPOLDocumentInfoProvider.GetContractDocRefInfo( + SalesHeader, + ContractDocumentReferenceID, + DocumentTypeCode, + ContractRefDocTypeCodeListID, + DocumentType); + + if ContractDocumentReferenceID = '' then + currXMLport.Skip(); + end; + } + tableelement(additionaldocrefloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'AdditionalDocumentReference'; + textelement(additionaldocumentreferenceid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(additionaldocrefdocumenttype) + { + NamespacePrefix = 'cbc'; + XmlName = 'DocumentType'; + + trigger OnBeforePassVariable() + begin + if additionaldocrefdocumenttype = '' then + currXMLport.Skip(); + end; + } + textelement(Attachment) + { + NamespacePrefix = 'cac'; + textelement(EmbeddedDocumentBinaryObject) + { + NamespacePrefix = 'cbc'; + textattribute(mimeCode) + { + + trigger OnBeforePassVariable() + begin + if mimeCode = '' then + currXMLport.Skip(); + end; + } + textattribute(filename) + { + trigger OnBeforePassVariable() + begin + if filename = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if EmbeddedDocumentBinaryObject = '' then + currXMLport.Skip(); + end; + } + textelement(ExternalReference) + { + NamespacePrefix = 'cac'; + textelement(URI) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if URI = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if URI = '' then + currXMLport.Skip(); + end; + } + } + + trigger OnAfterGetRecord() + var + PEPPOLAttachmentHandler: Interface "PEPPOL Attachment Provider"; + NewProcessedDocType: Option Sales,Service; + begin + PEPPOLAttachmentHandler := GetFormat(); + if (AdditionalDocRefLoop.Number <= DocumentAttachments.Count()) then + PEPPOLAttachmentHandler.GetAdditionalDocRefInfo( + additionaldocrefloop.Number, + DocumentAttachments, + SalesHeader, + AdditionalDocumentReferenceID, + AdditionalDocRefDocumentType, + URI, + filename, + mimeCode, + EmbeddedDocumentBinaryObject, + NewProcessedDocType::Sales) + else + if GeneratePDF then + PEPPOLAttachmentHandler.GeneratePDFAttachmentAsAdditionalDocRef( + SalesHeader, + AdditionalDocumentReferenceID, + AdditionalDocRefDocumentType, + URI, + filename, + mimeCode, + EmbeddedDocumentBinaryObject); + + if AdditionalDocumentReferenceID = '' then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + var + NumberRangeEnd: Integer; + begin + NumberRangeEnd := DocumentAttachments.Count(); + + if GeneratePDF then + NumberRangeEnd += 1; + + // Make sure range end is never 0 + if NumberRangeEnd = 0 then + NumberRangeEnd := 1; + AdditionalDocRefLoop.SetRange(Number, 1, NumberRangeEnd); + end; + } + textelement(AccountingSupplierParty) + { + NamespacePrefix = 'cac'; + textelement(supplierparty) + { + NamespacePrefix = 'cac'; + XmlName = 'Party'; + textelement(supplierendpointid) + { + NamespacePrefix = 'cbc'; + XmlName = 'EndpointID'; + textattribute(supplierschemeid) + { + XmlName = 'schemeID'; + } + + trigger OnBeforePassVariable() + begin + if SupplierEndpointID = '' then + currXMLport.Skip(); + end; + } + textelement(PartyIdentification) + { + NamespacePrefix = 'cac'; + textelement(partyidentificationid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + textattribute(supplierpartyidschemeid) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if SupplierPartyIDSchemeID = '' then + currXMLport.Skip(); + end; + } + } + + trigger OnBeforePassVariable() + var + PEPPOLPartyInfoProvider: Interface "PEPPOL Party Info Provider"; + begin + PEPPOLPartyInfoProvider := GetFormat(); + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyIdentificationID(SalesHeader, PartyIdentificationID); + if PartyIdentificationID = '' then + currXMLport.Skip(); + end; + } + textelement(supplierpartyname) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyName'; + textelement(suppliername) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + } + textelement(supplierpostaladdress) + { + NamespacePrefix = 'cac'; + XmlName = 'PostalAddress'; + textelement(StreetName) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if StreetName = '' then + currXMLport.Skip(); + end; + } + textelement(supplieradditionalstreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'AdditionalStreetName'; + + trigger OnBeforePassVariable() + begin + if SupplierAdditionalStreetName = '' then + currXMLport.Skip(); + end; + } + textelement(CityName) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if CityName = '' then + currXMLport.Skip(); + end; + } + textelement(PostalZone) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if PostalZone = '' then + currXMLport.Skip(); + end; + } + textelement(CountrySubentity) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if CountrySubentity = '' then + currXMLport.Skip(); + end; + } + textelement(Country) + { + NamespacePrefix = 'cac'; + textelement(IdentificationCode) + { + NamespacePrefix = 'cbc'; + } + } + } + textelement(PartyTaxScheme) + { + NamespacePrefix = 'cac'; + textelement(CompanyID) + { + NamespacePrefix = 'cbc'; + textattribute(companyidschemeid) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if CompanyIDSchemeID = '' then + currXMLport.Skip(); + end; + } + } + textelement(ExemptionReason) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if ExemptionReason = '' then + currXMLport.Skip(); + end; + } + textelement(suppliertaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(taxschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + begin + if CompanyID = '' then + currXMLport.Skip(); + end; + } + textelement(partytaxschemeno) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyTaxScheme'; + textelement(companyidno) + { + NamespacePrefix = 'cbc'; + XmlName = 'CompanyID'; + textattribute(companyidschemeidno) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if CompanyIDSchemeIDNO = '' then + currXMLport.Skip(); + end; + } + } + textelement(suppliertaxschemeno) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(taxschemeidno) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + begin + if CompanyIDNO = '' then + currXMLport.Skip(); + end; + } + textelement(PartyLegalEntity) + { + NamespacePrefix = 'cac'; + textelement(partylegalentityregname) + { + NamespacePrefix = 'cbc'; + XmlName = 'RegistrationName'; + + trigger OnBeforePassVariable() + begin + if PartyLegalEntityRegName = '' then + currXMLport.Skip(); + end; + } + textelement(partylegalentitycompanyid) + { + NamespacePrefix = 'cbc'; + XmlName = 'CompanyID'; + textattribute(partylegalentityschemeid) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if PartyLegalEntitySchemeID = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if PartyLegalEntityCompanyID = '' then + currXMLport.Skip(); + end; + } + } + textelement(Contact) + { + NamespacePrefix = 'cac'; + textelement(contactname) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + + trigger OnBeforePassVariable() + begin + if ContactName = '' then + currXMLport.Skip(); + end; + } + textelement(Telephone) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if Telephone = '' then + currXMLport.Skip(); + end; + } + textelement(Telefax) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if Telefax = '' then + currXMLport.Skip(); + end; + } + textelement(ElectronicMail) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if ElectronicMail = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if (ContactName = '') and (Telephone = '') and (Telefax = '') and (ElectronicMail = '') then + currXMLport.Skip(); + end; + } + } + + trigger OnBeforePassVariable() + var + PEPPOLPartyInfoProvider: Interface "PEPPOL Party Info Provider"; + SupplierRegAddrCityName: Text; + SupplierRegAddrCountryIdCode: Text; + SupplRegAddrCountryIdListId: Text; + begin + PEPPOLPartyInfoProvider := GetFormat(); + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyInfoBIS( + SupplierEndpointID, + SupplierSchemeID, + SupplierName); + + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyPostalAddr( + SalesHeader, + StreetName, + SupplierAdditionalStreetName, + CityName, + PostalZone, + CountrySubentity, + IdentificationCode, + DummyVar); + + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyTaxSchemeBIS( + TempVATAmtLine, + CompanyID, + CompanyIDSchemeID, + TaxSchemeID); + + PEPPOL30NOManagement.GetAccountingSupplierPartyTaxSchemeNO( + CompanyIDNO, CompanyIDSchemeIDNO, TaxSchemeIDNO); + + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyLegalEntityBIS( + PartyLegalEntityRegName, + PartyLegalEntityCompanyID, + PartyLegalEntitySchemeID, + SupplierRegAddrCityName, + SupplierRegAddrCountryIdCode, + SupplRegAddrCountryIdListId); + + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyContact( + SalesHeader, + DummyVar, + ContactName, + Telephone, + Telefax, + ElectronicMail); + end; + } + textelement(AccountingCustomerParty) + { + NamespacePrefix = 'cac'; + textelement(customerparty) + { + NamespacePrefix = 'cac'; + XmlName = 'Party'; + textelement(customerendpointid) + { + NamespacePrefix = 'cbc'; + XmlName = 'EndpointID'; + textattribute(customerschemeid) + { + XmlName = 'schemeID'; + } + + trigger OnBeforePassVariable() + begin + if CustomerEndpointID = '' then + currXMLport.Skip(); + end; + } + textelement(customerpartyidentification) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyIdentification'; + textelement(customerpartyidentificationid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + textattribute(customerpartyidschemeid) + { + XmlName = 'schemeID'; + } + } + + trigger OnBeforePassVariable() + begin + if CustomerPartyIdentificationID = '' then + currXMLport.Skip(); + end; + } + textelement(custoemerpartyname) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyName'; + textelement(customername) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + } + textelement(customerpostaladdress) + { + NamespacePrefix = 'cac'; + XmlName = 'PostalAddress'; + textelement(customerstreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'StreetName'; + } + textelement(customeradditionalstreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'AdditionalStreetName'; + + trigger OnBeforePassVariable() + begin + if CustomerAdditionalStreetName = '' then + currXMLport.Skip(); + end; + } + textelement(customercityname) + { + NamespacePrefix = 'cbc'; + XmlName = 'CityName'; + } + textelement(customerpostalzone) + { + NamespacePrefix = 'cbc'; + XmlName = 'PostalZone'; + } + textelement(customercountrysubentity) + { + NamespacePrefix = 'cbc'; + XmlName = 'CountrySubentity'; + + trigger OnBeforePassVariable() + begin + if CustomerCountrySubentity = '' then + currXMLport.Skip(); + end; + } + textelement(customercountry) + { + NamespacePrefix = 'cac'; + XmlName = 'Country'; + textelement(customeridentificationcode) + { + NamespacePrefix = 'cbc'; + XmlName = 'IdentificationCode'; + } + } + } + textelement(customerpartytaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyTaxScheme'; + textelement(custpartytaxschemecompanyid) + { + NamespacePrefix = 'cbc'; + XmlName = 'CompanyID'; + textattribute(custpartytaxschemecompidschid) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if CustPartyTaxSchemeCompIDSchID = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if CustPartyTaxSchemeCompanyID = '' then + currXMLport.Skip(); + end; + } + textelement(custtaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(custtaxschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + begin + if CustTaxSchemeID = '' then + currXMLport.Skip(); + end; + } + textelement(custpartylegalentity) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyLegalEntity'; + textelement(custpartylegalentityregname) + { + NamespacePrefix = 'cbc'; + XmlName = 'RegistrationName'; + + trigger OnBeforePassVariable() + begin + if CustPartyLegalEntityRegName = '' then + currXMLport.Skip(); + end; + } + textelement(custpartylegalentitycompanyid) + { + NamespacePrefix = 'cbc'; + XmlName = 'CompanyID'; + textattribute(custpartylegalentityidschemeid) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if CustPartyLegalEntityIDSchemeID = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if CustPartyLegalEntityCompanyID = '' then + currXMLport.Skip(); + end; + } + } + textelement(custcontact) + { + NamespacePrefix = 'cac'; + XmlName = 'Contact'; + textelement(custcontactname) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + + trigger OnBeforePassVariable() + begin + if CustContactName = '' then + currXMLport.Skip(); + end; + } + textelement(custcontacttelephone) + { + NamespacePrefix = 'cbc'; + XmlName = 'Telephone'; + + trigger OnBeforePassVariable() + begin + if CustContactTelephone = '' then + currXMLport.Skip(); + end; + } + textelement(custcontacttelefax) + { + NamespacePrefix = 'cbc'; + XmlName = 'Telefax'; + + trigger OnBeforePassVariable() + begin + if CustContactTelefax = '' then + currXMLport.Skip(); + end; + } + textelement(custcontactelectronicmail) + { + NamespacePrefix = 'cbc'; + XmlName = 'ElectronicMail'; + + trigger OnBeforePassVariable() + begin + if CustContactElectronicMail = '' then + currXMLport.Skip(); + end; + } + } + } + + trigger OnBeforePassVariable() + var + PEPPOLPartyInfoProvider: Interface "PEPPOL Party Info Provider"; + begin + PEPPOLPartyInfoProvider := GetFormat(); + PEPPOLPartyInfoProvider.GetAccountingCustomerPartyInfoBIS( + SalesHeader, + CustomerEndpointID, + CustomerSchemeID, + CustomerPartyIdentificationID, + CustomerPartyIDSchemeID, + CustomerName); + + PEPPOLPartyInfoProvider.GetAccountingCustomerPartyPostalAddr( + SalesHeader, + CustomerStreetName, + CustomerAdditionalStreetName, + CustomerCityName, + CustomerPostalZone, + CustomerCountrySubentity, + CustomerIdentificationCode, + DummyVar); + + PEPPOLPartyInfoProvider.GetAccountingCustomerPartyTaxSchemeBIS( + SalesHeader, + CustPartyTaxSchemeCompanyID, + CustPartyTaxSchemeCompIDSchID, + CustTaxSchemeID); + + PEPPOLPartyInfoProvider.GetAccountingCustomerPartyLegalEntityBIS( + SalesHeader, + CustPartyLegalEntityRegName, + CustPartyLegalEntityCompanyID, + CustPartyLegalEntityIDSchemeID); + + PEPPOLPartyInfoProvider.GetAccountingCustomerPartyContact( + SalesHeader, + DummyVar, + CustContactName, + CustContactTelephone, + CustContactTelefax, + CustContactElectronicMail); + end; + } + textelement(TaxRepresentativeParty) + { + NamespacePrefix = 'cac'; + textelement(taxreppartypartyname) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyName'; + textelement(taxreppartynamename) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + } + textelement(payeepartytaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyTaxScheme'; + textelement(payeepartytaxschemecompanyid) + { + NamespacePrefix = 'cbc'; + XmlName = 'CompanyID'; + textattribute(payeepartytaxschcompidschemeid) + { + XmlName = 'schemeID'; + } + } + textelement(payeepartytaxschemetaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(payeepartytaxschemetaxschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + begin + if PayeePartyTaxScheme = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLPartyInfoProvider: Interface "PEPPOL Party Info Provider"; + begin + PEPPOLPartyInfoProvider := GetFormat(); + PEPPOLPartyInfoProvider.GetTaxRepresentativePartyInfo( + TaxRepPartyNameName, + PayeePartyTaxSchemeCompanyID, + PayeePartyTaxSchCompIDSchemeID, + PayeePartyTaxSchemeTaxSchemeID); + + if TaxRepPartyPartyName = '' then + currXMLport.Skip(); + end; + } + textelement(Delivery) + { + NamespacePrefix = 'cac'; + textelement(ActualDeliveryDate) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if ActualDeliveryDate = '' then + currXMLport.Skip(); + end; + } + textelement(DeliveryLocation) + { + NamespacePrefix = 'cac'; + textelement(deliveryid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + textattribute(deliveryidschemeid) + { + XmlName = 'schemeID'; + } + + trigger OnBeforePassVariable() + begin + if DeliveryID = '' then + currXMLport.Skip(); + end; + } + textelement(deliveryaddress) + { + NamespacePrefix = 'cac'; + XmlName = 'Address'; + textelement(deliverystreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'StreetName'; + } + textelement(deliveryadditionalstreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'AdditionalStreetName'; + + trigger OnBeforePassVariable() + begin + if DeliveryAdditionalStreetName = '' then + currXMLport.Skip(); + end; + } + textelement(deliverycityname) + { + NamespacePrefix = 'cbc'; + XmlName = 'CityName'; + + trigger OnBeforePassVariable() + begin + if DeliveryCityName = '' then + currXMLport.Skip(); + end; + } + textelement(deliverypostalzone) + { + NamespacePrefix = 'cbc'; + XmlName = 'PostalZone'; + + trigger OnBeforePassVariable() + begin + if DeliveryPostalZone = '' then + currXMLport.Skip(); + end; + } + textelement(deliverycountrysubentity) + { + NamespacePrefix = 'cbc'; + XmlName = 'CountrySubentity'; + + trigger OnBeforePassVariable() + begin + if DeliveryCountrySubentity = '' then + currXMLport.Skip(); + end; + } + textelement(deliverycountry) + { + NamespacePrefix = 'cac'; + XmlName = 'Country'; + textelement(deliverycountryidcode) + { + NamespacePrefix = 'cbc'; + XmlName = 'IdentificationCode'; + } + } + } + } + textelement(DeliveryParty) + { + NamespacePrefix = 'cac'; + XMLName = 'DeliveryParty'; + textelement(DeliveryPartyName) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyName'; + textelement(DeliveryPartyNameValue) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + } + trigger OnBeforePassVariable() + begin + if DeliveryPartyNameValue = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLDeliveryInfoProvider: Interface "PEPPOL Delivery Info Provider"; + begin + PEPPOLDeliveryInfoProvider := GetFormat(); + PEPPOLDeliveryInfoProvider.GetGLNDeliveryInfo( + SalesHeader, + ActualDeliveryDate, + DeliveryID, + DeliveryIDSchemeID); + + PEPPOLDeliveryInfoProvider.GetDeliveryAddress( + SalesHeader, + DeliveryStreetName, + DeliveryAdditionalStreetName, + DeliveryCityName, + DeliveryPostalZone, + DeliveryCountrySubentity, + DeliveryCountryIdCode, + DummyVar); + + PEPPOLDeliveryInfoProvider.GetDeliveryPartyName(SalesHeader, DeliveryPartyNameValue); + end; + } + textelement(PaymentMeans) + { + NamespacePrefix = 'cac'; + textelement(PaymentMeansCode) + { + NamespacePrefix = 'cbc'; + } + textelement(PaymentChannelCode) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if PaymentChannelCode = '' then + currXMLport.Skip(); + end; + } + textelement(PaymentID) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if PaymentID = '' then + currXMLport.Skip(); + end; + } + textelement(CardAccount) + { + NamespacePrefix = 'cac'; + textelement(PrimaryAccountNumberID) + { + NamespacePrefix = 'cbc'; + } + textelement(NetworkID) + { + NamespacePrefix = 'cbc'; + } + + trigger OnBeforePassVariable() + begin + if PrimaryAccountNumberID = '' then + currXMLport.Skip(); + end; + } + textelement(PayeeFinancialAccount) + { + NamespacePrefix = 'cac'; + textelement(payeefinancialaccountid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(FinancialInstitutionBranch) + { + NamespacePrefix = 'cac'; + textelement(financialinstitutionbranchid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + } + + trigger OnBeforePassVariable() + var + PEPPOLPaymentInfoProvider: Interface "PEPPOL Payment Info Provider"; + begin + PEPPOLPaymentInfoProvider := GetFormat(); + PEPPOLPaymentInfoProvider.GetPaymentMeansInfo( + SalesHeader, + PaymentMeansCode, + DummyVar, + DummyVar, + PaymentChannelCode, + PaymentID, + PrimaryAccountNumberID, + NetworkID); + + PEPPOLPaymentInfoProvider.GetPaymentMeansPayeeFinancialAccBIS( + SalesHeader, + PayeeFinancialAccountID, + FinancialInstitutionBranchID); + end; + } + tableelement(pmttermsloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'PaymentTerms'; + textelement(paymenttermsnote) + { + NamespacePrefix = 'cbc'; + XmlName = 'Note'; + } + + trigger OnAfterGetRecord() + var + PEPPOLPaymentInfoProvider: Interface "PEPPOL Payment Info Provider"; + begin + PEPPOLPaymentInfoProvider := GetFormat(); + PEPPOLPaymentInfoProvider.GetPaymentTermsInfo( + SalesHeader, + PaymentTermsNote); + + if PaymentTermsNote = '' then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + begin + PmtTermsLoop.SetRange(Number, 1, 1); + end; + } + tableelement(allowancechargeloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'AllowanceCharge'; + textelement(ChargeIndicator) + { + NamespacePrefix = 'cbc'; + } + textelement(AllowanceChargeReasonCode) + { + NamespacePrefix = 'cbc'; + } + textelement(AllowanceChargeReason) + { + NamespacePrefix = 'cbc'; + } + textelement(Amount) + { + NamespacePrefix = 'cbc'; + textattribute(allowancechargecurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(TaxCategory) + { + NamespacePrefix = 'cac'; + textelement(taxcategoryid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(Percent) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if Percent = '' then + currXMLport.Skip(); + end; + } + textelement(TaxScheme) + { + NamespacePrefix = 'cac'; + textelement(allowancechargetaxschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + } + + trigger OnAfterGetRecord() + var + PEPPOLTaxInfoProvider: Interface "PEPPOL Tax Info Provider"; + begin + if not FindNextVATAmtRec(TempVATAmtLine, AllowanceChargeLoop.Number) then + currXMLport.Break(); + + PEPPOLTaxInfoProvider := GetFormat(); + PEPPOLTaxInfoProvider.GetAllowanceChargeInfo( + TempVATAmtLine, + SalesHeader, + ChargeIndicator, + AllowanceChargeReasonCode, + DummyVar, + AllowanceChargeReason, + Amount, + AllowanceChargeCurrencyID, + TaxCategoryID, + DummyVar, + Percent, + AllowanceChargeTaxSchemeID); + + if ChargeIndicator = '' then + currXMLport.Skip(); + end; + } + tableelement(allowancechargepaymentdiscountloop; Integer) + { + NamespacePrefix = 'cac'; + XmlName = 'AllowanceCharge'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + textelement(ChargeIndicatorPaymentDiscount) + { + XmlName = 'ChargeIndicator'; + NamespacePrefix = 'cbc'; + } + textelement(AllowanceChargeReasonCodePaymentDiscount) + { + XmlName = 'AllowanceChargeReasonCode'; + NamespacePrefix = 'cbc'; + } + textelement(AllowanceChargeReasonPaymentDiscount) + { + XmlName = 'AllowanceChargeReason'; + NamespacePrefix = 'cbc'; + } + textelement(AmountPaymentDiscount) + { + XmlName = 'Amount'; + NamespacePrefix = 'cbc'; + textattribute(allowancechargecurrencyidPaymentDiscount) + { + XmlName = 'currencyID'; + } + } + textelement(TaxCategoryPaymentDiscount) + { + XmlName = 'TaxCategory'; + NamespacePrefix = 'cac'; + textelement(taxcategoryidPaymentDiscount) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(PercentPaymentDiscount) + { + XmlName = 'Percent'; + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if PercentPaymentDiscount = '' then + currXMLport.Skip(); + end; + } + textelement(TaxSchemePaymentDiscount) + { + XmlName = 'TaxScheme'; + NamespacePrefix = 'cac'; + textelement(allowancechargetaxschemeidPaymentDiscount) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + } + + trigger OnAfterGetRecord() + var + PEPPOLPaymentInfoProvider: Interface "PEPPOL Payment Info Provider"; + begin + if not FindNextVATAmtRec(TempVATAmtLine, AllowanceChargePaymentDiscountLoop.Number) then + currXMLport.Break(); + + PEPPOLPaymentInfoProvider := GetFormat(); + PEPPOLPaymentInfoProvider.GetAllowanceChargeInfoPaymentDiscount( + TempVATAmtLine, + SalesHeader, + ChargeIndicatorPaymentDiscount, + AllowanceChargeReasonCodePaymentDiscount, + DummyVar, + AllowanceChargeReasonPaymentDiscount, + AmountPaymentDiscount, + AllowanceChargeCurrencyIDPaymentDiscount, + TaxCategoryIDPaymentDiscount, + DummyVar, + PercentPaymentDiscount, + AllowanceChargeTaxSchemeIDPaymentDiscount); + + if ChargeIndicatorPaymentDiscount = '' then + currXMLport.Skip(); + end; + } + textelement(TaxTotal) + { + NamespacePrefix = 'cac'; + textelement(TaxAmount) + { + NamespacePrefix = 'cbc'; + textattribute(taxtotalcurrencyid) + { + XmlName = 'currencyID'; + } + } + tableelement(taxsubtotalloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'TaxSubtotal'; + textelement(TaxableAmount) + { + NamespacePrefix = 'cbc'; + textattribute(taxsubtotalcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(subtotaltaxamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'TaxAmount'; + textattribute(taxamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(subtotaltaxcategory) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxCategory'; + textelement(taxtotaltaxcategoryid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(taxcategorypercent) + { + NamespacePrefix = 'cbc'; + XmlName = 'Percent'; + } + textelement(TaxExemptionReason) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if TaxExemptionReason = '' then + currXMLport.Skip(); + end; + } + textelement(taxsubtotaltaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(taxtotaltaxschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + } + + trigger OnAfterGetRecord() + var + PEPPOLTaxInfoProvider: Interface "PEPPOL Tax Info Provider"; + TransactionCurrencyTaxAmount: Text; + TransCurrTaxAmtCurrencyID: Text; + begin + if not FindNextVATAmtRec(TempVATAmtLine, TaxSubtotalLoop.Number) then + currXMLport.Break(); + + PEPPOLTaxInfoProvider := GetFormat(); + PEPPOLTaxInfoProvider.GetTaxSubtotalInfo( + TempVATAmtLine, + SalesHeader, + TaxableAmount, + TaxAmountCurrencyID, + SubtotalTaxAmount, + TaxSubtotalCurrencyID, + TransactionCurrencyTaxAmount, + TransCurrTaxAmtCurrencyID, + TaxTotalTaxCategoryID, + DummyVar, + TaxCategoryPercent, + TaxTotalTaxSchemeID); + + PEPPOLTaxInfoProvider.GetTaxExemptionReason(TempVATProductPostingGroup, TaxExemptionReason, TaxTotalTaxCategoryID); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLTaxInfoProvider: Interface "PEPPOL Tax Info Provider"; + begin + PEPPOLTaxInfoProvider := GetFormat(); + PEPPOLTaxInfoProvider.GetTaxTotalInfo( + SalesHeader, + TempVATAmtLine, + TaxAmount, + TaxTotalCurrencyID); + end; + } + textelement(taxtotallcy) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxTotal'; + textelement(taxamountlcy) + { + NamespacePrefix = 'cbc'; + XmlName = 'TaxAmount'; + textattribute(taxtotalcurrencyidlcy) + { + XmlName = 'currencyID'; + } + } + + trigger OnBeforePassVariable() + begin + if TaxTotalCurrencyIDLCY = '' then + currXMLport.Skip(); + end; + } + textelement(LegalMonetaryTotal) + { + NamespacePrefix = 'cac'; + textelement(LineExtensionAmount) + { + NamespacePrefix = 'cbc'; + textattribute(legalmonetarytotalcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(TaxExclusiveAmount) + { + NamespacePrefix = 'cbc'; + textattribute(taxexclusiveamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(TaxInclusiveAmount) + { + NamespacePrefix = 'cbc'; + textattribute(taxinclusiveamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(AllowanceTotalAmount) + { + NamespacePrefix = 'cbc'; + textattribute(allowancetotalamountcurrencyid) + { + XmlName = 'currencyID'; + } + + trigger OnBeforePassVariable() + begin + if AllowanceTotalAmount = '' then + currXMLport.Skip(); + end; + } + textelement(ChargeTotalAmount) + { + NamespacePrefix = 'cbc'; + textattribute(chargetotalamountcurrencyid) + { + XmlName = 'currencyID'; + } + + trigger OnBeforePassVariable() + begin + if ChargeTotalAmount = '' then + currXMLport.Skip(); + end; + } + textelement(PrepaidAmount) + { + NamespacePrefix = 'cbc'; + textattribute(prepaidcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(PayableRoundingAmount) + { + NamespacePrefix = 'cbc'; + textattribute(payablerndingamountcurrencyid) + { + XmlName = 'currencyID'; + } + + trigger OnBeforePassVariable() + begin + if PayableRoundingAmount = '' then + currXMLport.Skip(); + end; + } + textelement(PayableAmount) + { + NamespacePrefix = 'cbc'; + textattribute(payableamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + + trigger OnBeforePassVariable() + var + PEPPOLMonetaryInfoProvider: Interface "PEPPOL Monetary Info Provider"; + begin + PEPPOLMonetaryInfoProvider := GetFormat(); + PEPPOLMonetaryInfoProvider.GetLegalMonetaryInfo( + SalesHeader, + TempSalesLineRounding, + TempVATAmtLine, + LineExtensionAmount, + LegalMonetaryTotalCurrencyID, + TaxExclusiveAmount, + TaxExclusiveAmountCurrencyID, + TaxInclusiveAmount, + TaxInclusiveAmountCurrencyID, + AllowanceTotalAmount, + AllowanceTotalAmountCurrencyID, + ChargeTotalAmount, + ChargeTotalAmountCurrencyID, + PrepaidAmount, + PrepaidCurrencyID, + PayableRoundingAmount, + PayableRndingAmountCurrencyID, + PayableAmount, + PayableAmountCurrencyID); + end; + } + tableelement(creditmemolineloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'CreditNoteLine'; + textelement(salescrmemolineid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(salescrmemolinenote) + { + NamespacePrefix = 'cbc'; + XmlName = 'Note'; + + trigger OnBeforePassVariable() + begin + if SalesCrMemoLineNote = '' then + currXMLport.Skip(); + end; + } + textelement(CreditedQuantity) + { + NamespacePrefix = 'cbc'; + textattribute(unitCode) + { + } + } + textelement(salescrmemolineextensionamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'LineExtensionAmount'; + textattribute(lineextensionamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(salescrmemolineaccountingcost) + { + NamespacePrefix = 'cbc'; + XmlName = 'AccountingCost'; + + trigger OnBeforePassVariable() + begin + if SalesCrMemoLineAccountingCost = '' then + currXMLport.Skip(); + end; + } + textelement(salescrmemolineinvoiceperiod) + { + NamespacePrefix = 'cac'; + XmlName = 'InvoicePeriod'; + textelement(invlineinvoiceperiodstartdate) + { + NamespacePrefix = 'cbc'; + XmlName = 'StartDate'; + } + textelement(invlineinvoiceperiodenddate) + { + NamespacePrefix = 'cbc'; + XmlName = 'EndDate'; + } + + trigger OnBeforePassVariable() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineInvoicePeriodInfo( + InvLineInvoicePeriodStartDate, + InvLineInvoicePeriodEndDate); + + if (InvLineInvoicePeriodStartDate = '') and (InvLineInvoicePeriodEndDate = '') then + currXMLport.Skip(); + end; + } + textelement(OrderLineReference) + { + NamespacePrefix = 'cac'; + textelement(orderlinereferencelineid) + { + NamespacePrefix = 'cbc'; + XmlName = 'LineID'; + } + + trigger OnBeforePassVariable() + begin + if OrderLineReferenceLineID = '' then + currXMLport.Skip(); + end; + } + textelement(salescrmemolnbillingreference) + { + NamespacePrefix = 'cac'; + XmlName = 'BillingReference'; + textelement(crmelninvoicedocumentreference) + { + NamespacePrefix = 'cac'; + XmlName = 'InvoiceDocumentReference'; + textelement(crmemolninvdocrefid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + textelement(crcreditnotedocumentreference) + { + NamespacePrefix = 'cac'; + XmlName = 'CreditNoteDocumentReference'; + textelement(crmemolncreditnotedocrefid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + textelement("crmemolnbillingreferenceline>") + { + NamespacePrefix = 'cac'; + XmlName = 'BillingReferenceLine'; + textelement(salescrmemolnbillingreflineid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + begin + if SalesCrMemoLnBillingRefLineID = '' then + currXMLport.Skip(); + end; + } + textelement(salescrmemolinedelivery) + { + NamespacePrefix = 'cac'; + XmlName = 'Delivery'; + textelement(crmemolineactualdeliverydate) + { + NamespacePrefix = 'cbc'; + XmlName = 'ActualDeliveryDate'; + } + textelement(crmemolinedeliverylocation) + { + NamespacePrefix = 'cac'; + XmlName = 'DeliveryLocation'; + textelement(salescrmemolinedeliveryid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + textattribute(crmemolinedeliveryidschemeid) + { + XmlName = 'schemeID'; + } + } + textelement(crmemolinedeliveryaddress) + { + NamespacePrefix = 'cac'; + XmlName = 'Address'; + textelement(crmemolinedeliverystreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'StreetName'; + } + textelement(crmemlinedeliveryaddstreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'AdditionalStreetName'; + } + textelement(crmemolinedeliverycityname) + { + NamespacePrefix = 'cbc'; + XmlName = 'CityName'; + } + textelement(crmemolinedeliverypostalzone) + { + NamespacePrefix = 'cbc'; + XmlName = 'PostalZone'; + } + textelement(crmelndeliverycountrysubentity) + { + NamespacePrefix = 'cbc'; + XmlName = 'CountrySubentity'; + } + textelement(creditmemolinedeliverycountry) + { + NamespacePrefix = 'cac'; + XmlName = 'Country'; + textelement(crmemlndeliverycountryidcode) + { + NamespacePrefix = 'cbc'; + XmlName = 'IdentificationCode'; + } + } + } + } + + trigger OnBeforePassVariable() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineDeliveryInfo( + CrMemoLineActualDeliveryDate, + SalesCrMemoLineDeliveryID, + CrMemoLineDeliveryIDSchemeID); + + PEPPOLLineInfoProvider.GetLineDeliveryPostalAddr( + CrMemoLineDeliveryStreetName, + CrMemLineDeliveryAddStreetName, + CrMemoLineDeliveryCityName, + CrMemoLineDeliveryPostalZone, + CrMeLnDeliveryCountrySubentity, + CreditMemoLineDeliveryCountry, + CrMemLnDeliveryCountryIdCode); + + if (SalesCrMemoLineDeliveryID = '') and + (CrMemoLineDeliveryStreetName = '') and + (CrMemoLineActualDeliveryDate = '') + then + currXMLport.Skip(); + end; + } + tableelement(crmemlnallowancechargeloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'AllowanceCharge'; + textelement(crmelnallowancechargeindicator) + { + NamespacePrefix = 'cbc'; + XmlName = 'ChargeIndicator'; + } + textelement(crmemlnallowancechargereason) + { + NamespacePrefix = 'cbc'; + XmlName = 'AllowanceChargeReason'; + } + textelement(crmemlnallowancechargeamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'Amount'; + textattribute(crmelnallowancechargeamtcurrid) + { + XmlName = 'currencyID'; + } + } + + trigger OnAfterGetRecord() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineAllowanceChargeInfo( + SalesLine, + SalesHeader, + CrMeLnAllowanceChargeIndicator, + CrMemLnAllowanceChargeReason, + CrMemLnAllowanceChargeAmount, + CrMeLnAllowanceChargeAmtCurrID); + + if CrMeLnAllowanceChargeIndicator = '' then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + begin + CrMemLnAllowanceChargeLoop.SetRange(Number, 1, 1); + end; + } + textelement(Item) + { + NamespacePrefix = 'cac'; + textelement(Description) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if Description = '' then + currXMLport.Skip(); + end; + } + textelement(Name) + { + NamespacePrefix = 'cbc'; + } + textelement(SellersItemIdentification) + { + NamespacePrefix = 'cac'; + textelement(sellersitemidentificationid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + + trigger OnBeforePassVariable() + begin + if SellersItemIdentificationID = '' then + currXMLport.Skip(); + end; + } + textelement(StandardItemIdentification) + { + NamespacePrefix = 'cac'; + textelement(standarditemidentificationid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + textattribute(stditemididschemeid) + { + XmlName = 'schemeID'; + } + } + + trigger OnBeforePassVariable() + begin + if StandardItemIdentificationID = '' then + currXMLport.Skip(); + end; + } + textelement(OriginCountry) + { + NamespacePrefix = 'cac'; + textelement(origincountryidcode) + { + NamespacePrefix = 'cbc'; + XmlName = 'IdentificationCode'; + textattribute(origincountryidcodelistid) + { + XmlName = 'listID'; + } + } + + trigger OnBeforePassVariable() + begin + if OriginCountryIdCode = '' then + currXMLport.Skip(); + end; + } + tableelement(commodityclassificationloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'CommodityClassification'; + textelement(CommodityCode) + { + NamespacePrefix = 'cbc'; + textattribute(commoditycodelistid) + { + XmlName = 'listID'; + } + + trigger OnBeforePassVariable() + begin + if CommodityCode = '' then + currXMLport.Skip(); + end; + } + textelement(ItemClassificationCode) + { + NamespacePrefix = 'cbc'; + textattribute(itemclassificationcodelistid) + { + XmlName = 'listID'; + } + + trigger OnBeforePassVariable() + begin + if ItemClassificationCode = '' then + currXMLport.Skip(); + end; + } + + trigger OnAfterGetRecord() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineItemCommodityClassificationInfo( + CommodityCode, + CommodityCodeListID, + ItemClassificationCode, + ItemClassificationCodeListID); + + if (CommodityCode = '') and (ItemClassificationCode = '') then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + begin + CommodityClassificationLoop.SetRange(Number, 1, 1); + end; + } + textelement(ClassifiedTaxCategory) + { + NamespacePrefix = 'cac'; + textelement(classifiedtaxcategoryid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(salescreditmemolinetaxpercent) + { + NamespacePrefix = 'cbc'; + XmlName = 'Percent'; + + trigger OnBeforePassVariable() + begin + if SalesCreditMemoLineTaxPercent = '' then + currXMLport.Skip(); + end; + } + textelement(classifiedtaxcategorytaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(classifiedtaxcategoryschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineItemClassifiedTaxCategoryBIS( + SalesLine, + ClassifiedTaxCategoryID, + DummyVar, + SalesCreditMemoLineTaxPercent, + ClassifiedTaxCategorySchemeID); + + if ClassifiedTaxCategoryID = '' then + currXMLport.Skip(); + end; + } + tableelement(additionalitempropertyloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'AdditionalItemProperty'; + textelement(additionalitempropertyname) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + textelement(additionalitempropertyvalue) + { + NamespacePrefix = 'cbc'; + XmlName = 'Value'; + } + + trigger OnAfterGetRecord() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineAdditionalItemPropertyInfo( + SalesLine, + AdditionalItemPropertyName, + AdditionalItemPropertyValue); + + if AdditionalItemPropertyName = '' then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + begin + AdditionalItemPropertyLoop.SetRange(Number, 1, 1); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineItemInfo( + SalesLine, + Description, + Name, + SellersItemIdentificationID, + StandardItemIdentificationID, + StdItemIdIDSchemeID, + OriginCountryIdCode, + OriginCountryIdCodeListID); + end; + } + textelement(salescreditmemolineprice) + { + NamespacePrefix = 'cac'; + XmlName = 'Price'; + textelement(salescreditmemolinepriceamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'PriceAmount'; + textattribute(crmemlinepriceamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(BaseQuantity) + { + NamespacePrefix = 'cbc'; + textattribute(unitcodebaseqty) + { + XmlName = 'unitCode'; + } + } + tableelement(priceallowancechargeloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'AllowanceCharge'; + textelement(pricechargeindicator) + { + NamespacePrefix = 'cbc'; + XmlName = 'ChargeIndicator'; + } + textelement(priceallowancechargeamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'Amount'; + textattribute(priceallowanceamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(priceallowancechargebaseamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'BaseAmount'; + textattribute(priceallowchargebaseamtcurrid) + { + XmlName = 'currencyID'; + } + } + + trigger OnAfterGetRecord() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLinePriceAllowanceChargeInfo( + PriceChargeIndicator, + PriceAllowanceChargeAmount, + PriceAllowanceAmountCurrencyID, + PriceAllowanceChargeBaseAmount, + PriceAllowChargeBaseAmtCurrID); + + if PriceChargeIndicator = '' then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + begin + PriceAllowanceChargeLoop.SetRange(Number, 1, 1); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLinePriceInfo( + SalesLine, + SalesHeader, + SalesCreditMemoLinePriceAmount, + CrMemLinePriceAmountCurrencyID, + BaseQuantity, + UnitCodeBaseQty); + end; + } + + trigger OnAfterGetRecord() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + if not PostedLineIterator.GetNextPostedLineAsSalesLine(PostedSourceLineRecRef, SalesLine) then + currXMLport.Break(); + + + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineGeneralInfo( + SalesLine, + SalesHeader, + SalesCrMemoLineID, + SalesCrMemoLineNote, + CreditedQuantity, + SalesCrMemoLineExtensionAmount, + LineExtensionAmountCurrencyID, + SalesCrMemoLineAccountingCost); + + PEPPOLLineInfoProvider.GetLineUnitCodeInfo(SalesLine, unitCode, DummyVar); + end; + } + + trigger OnAfterGetRecord() + var + PEPPOL30Common: Codeunit "PEPPOL30 Common"; + IPEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + begin + if not PostedHeaderIterator.GetNextPostedHeaderAsSalesHeader(PostedSourceRecRef, SalesHeader) then + currXMLport.Break(); + + PEPPOL30Common.GetTotals(PostedSourceRecRef, PostedSourceLineRecRef, TempVATAmtLine, TempVATProductPostingGroup, GetFormat()); + + IPEPPOLDocumentInfoProvider := GetFormat(); + IPEPPOLDocumentInfoProvider.GetGeneralInfoBIS( + SalesHeader, + ID, + IssueDate, + DummyVar, + Note, + TaxPointDate, + DocumentCurrencyCode, + AccountingCost); + + CustomizationID := GetCustomizationID(); + ProfileID := GetProfileID(); + end; + } + } + + requestpage + { + layout + { + area(content) + { + group(Control2) + { + ShowCaption = false; + field(SalesCreditMemoNumber; SalesCrMemoHeader."No.") + { + ApplicationArea = Basic, Suite; + Caption = 'Sales Credit Memo No.'; + TableRelation = "Sales Cr.Memo Header"; + ToolTip = 'Specifies the sales credit memo to be exported as a PEPPOL 3.0 document.'; + } + } + } + } + + actions + { + } + } + + trigger OnPreXmlPort() + begin + GLSetup.Get(); + GLSetup.TestField("LCY Code"); + CompanyInformation.Get(); + end; + + var + GLSetup: Record "General Ledger Setup"; + TempVATAmtLine: Record "VAT Amount Line" temporary; + SalesCrMemoHeader: Record "Sales Cr.Memo Header"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TempVATProductPostingGroup: Record "VAT Product Posting Group" temporary; + TempSalesLineRounding: Record "Sales Line" temporary; + DocumentAttachments: Record "Document Attachment"; + CompanyInformation: Record "Company Information"; + PEPPOL30NOManagement: Codeunit "PEPPOL30 NO Management"; + PostedSourceRecRef, PostedSourceLineRecRef : RecordRef; + PostedHeaderIterator, PostedLineIterator : Interface "PEPPOL Posted Document Iterator"; + DummyVar: Text; + IsFormatSet: Boolean; + GeneratePDF: Boolean; + PEPPOL30Format: Enum "PEPPOL 3.0 Format"; + + procedure SetFormat(Format: Enum "PEPPOL 3.0 Format") + begin + PEPPOL30Format := Format; + IsFormatSet := true; + end; + + local procedure GetFormat(): Enum "PEPPOL 3.0 Format" + var + PeppolSetup: Record "PEPPOL 3.0 Setup"; + begin + if not IsFormatSet then begin + PeppolSetup.GetSetup(); + PEPPOL30Format := PeppolSetup."PEPPOL 3.0 Sales Format"; + end; + exit(PEPPOL30Format); + end; + + local procedure FindNextVATAmtRec(var VATAmtLine: Record "VAT Amount Line"; Position: Integer): Boolean + begin + if Position = 1 then + exit(VATAmtLine.Find('-')); + exit(VATAmtLine.Next() <> 0); + end; + + procedure Initialize(DocVariant: Variant; Format: Enum "PEPPOL 3.0 Format") + var + PEPPOL30Common: Codeunit "PEPPOL30 Common"; + DocumentAttachmentMgt: Codeunit "Document Attachment Mgmt"; + begin + SetFormat(Format); + PostedSourceRecRef.GetTable(DocVariant); + if PostedSourceRecRef.Number <> 0 then begin + DocumentAttachmentMgt.SetDocumentAttachmentFiltersForRecRef(DocumentAttachments, PostedSourceRecRef); + PEPPOL30Common.GetInvoiceRoundingLine(PostedSourceRecRef, TempSalesLineRounding, GetFormat()); + PEPPOL30Common.SetFilters(PostedSourceRecRef, PostedSourceLineRecRef, TempSalesLineRounding); + + PostedHeaderIterator := GetFormat(); + PostedLineIterator := GetFormat(); + end; + end; + + /// + /// Controls whether a PDF document should be generated and included as an additional document reference. + /// + /// If true, generates a PDF based on Report Selection settings. + procedure SetGeneratePDF(GeneratePDFValue: Boolean) + begin + this.GeneratePDF := GeneratePDFValue; + end; + + local procedure GetCustomizationID(): Text + begin + exit('urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0'); + end; + + local procedure GetProfileID(): Text + begin + exit('urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'); + end; + +} diff --git a/Apps/NO/PEPPOLNO/app/src/SalesInvoicePEPPOL30NO.XmlPort.al b/Apps/NO/PEPPOLNO/app/src/SalesInvoicePEPPOL30NO.XmlPort.al new file mode 100644 index 0000000000..d12b1dadda --- /dev/null +++ b/Apps/NO/PEPPOLNO/app/src/SalesInvoicePEPPOL30NO.XmlPort.al @@ -0,0 +1,2350 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Peppol; + +using Microsoft.Finance.VAT.Calculation; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.Attachment; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Document; +using Microsoft.Sales.History; +using System.Utilities; + +xmlport 37355 "Sales Invoice - PEPPOL30 NO" +{ + Caption = 'Sales Invoice - PEPPOL BIS 3.0'; + Direction = Export; + Encoding = UTF8; + Namespaces = "" = 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2', cac = 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2', cbc = 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2', ccts = 'urn:un:unece:uncefact:documentation:2', qdt = 'urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2', udt = 'urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2'; + InherentEntitlements = X; + InherentPermissions = X; + + schema + { + tableelement(invoiceheaderloop; Integer) + { + MaxOccurs = Once; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'Invoice'; + textelement(CustomizationID) + { + NamespacePrefix = 'cbc'; + } + textelement(ProfileID) + { + NamespacePrefix = 'cbc'; + } + textelement(ID) + { + NamespacePrefix = 'cbc'; + } + textelement(IssueDate) + { + NamespacePrefix = 'cbc'; + } + textelement(DueDate) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + DueDate := Format(SalesHeader."Due Date", 0, 9); + if DueDate = '' then + currXMLport.Skip(); + end; + } + textelement(InvoiceTypeCode) + { + NamespacePrefix = 'cbc'; + } + textelement(Note) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if Note = '' then + currXMLport.Skip(); + end; + } + textelement(TaxPointDate) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if TaxPointDate = '' then + currXMLport.Skip(); + end; + } + textelement(DocumentCurrencyCode) + { + NamespacePrefix = 'cbc'; + } + textelement(taxcurrencycodelcy) + { + NamespacePrefix = 'cbc'; + XmlName = 'TaxCurrencyCode'; + + trigger OnBeforePassVariable() + var + PEPPOLTaxInfoProvider: Interface "PEPPOL Tax Info Provider"; + begin + PEPPOLTaxInfoProvider := GetFormat(); + PEPPOLTaxInfoProvider.GetTaxTotalInfoLCY(SalesHeader, TaxAmountLCY, TaxCurrencyCodeLCY, TaxTotalCurrencyIDLCY); + if TaxCurrencyCodeLCY = '' then + currXMLport.Skip(); + end; + } + textelement(AccountingCost) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if AccountingCost = '' then + currXMLport.Skip(); + end; + } + textelement(BuyerReference) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + var + PEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + begin + PEPPOLDocumentInfoProvider := GetFormat(); + BuyerReference := PEPPOLDocumentInfoProvider.GetBuyerReference(SalesHeader); + if BuyerReference = '' then + currXMLport.Skip(); + end; + } + textelement(InvoicePeriod) + { + NamespacePrefix = 'cac'; + textelement(StartDate) + { + NamespacePrefix = 'cbc'; + } + textelement(EndDate) + { + NamespacePrefix = 'cbc'; + } + + trigger OnBeforePassVariable() + var + PEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + begin + PEPPOLDocumentInfoProvider := GetFormat(); + PEPPOLDocumentInfoProvider.GetInvoicePeriodInfo( + StartDate, + EndDate); + + if (StartDate = '') and (EndDate = '') then + currXMLport.Skip(); + end; + } + textelement(OrderReference) + { + NamespacePrefix = 'cac'; + textelement(orderreferenceid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + + trigger OnBeforePassVariable() + var + PEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + begin + PEPPOLDocumentInfoProvider := GetFormat(); + PEPPOLDocumentInfoProvider.GetOrderReferenceInfo( + SalesHeader, + OrderReferenceID); + + if OrderReferenceID = '' then + currXMLport.Skip(); + end; + } + textelement(ContractDocumentReference) + { + NamespacePrefix = 'cac'; + textelement(contractdocumentreferenceid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + + trigger OnBeforePassVariable() + var + ContractRefDocTypeCodeListID: Text; + DocumentType: Text; + DocumentTypeCode: Text; + PEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + begin + PEPPOLDocumentInfoProvider := GetFormat(); + PEPPOLDocumentInfoProvider.GetContractDocRefInfo( + SalesHeader, + ContractDocumentReferenceID, + DocumentTypeCode, + ContractRefDocTypeCodeListID, + DocumentType); + + if ContractDocumentReferenceID = '' then + currXMLport.Skip(); + end; + } + tableelement(additionaldocrefloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'AdditionalDocumentReference'; + textelement(additionaldocumentreferenceid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(additionaldocrefdocumenttype) + { + NamespacePrefix = 'cbc'; + XmlName = 'DocumentType'; + + trigger OnBeforePassVariable() + begin + if additionaldocrefdocumenttype = '' then + currXMLport.Skip(); + end; + } + textelement(Attachment) + { + NamespacePrefix = 'cac'; + textelement(EmbeddedDocumentBinaryObject) + { + NamespacePrefix = 'cbc'; + textattribute(mimeCode) + { + trigger OnBeforePassVariable() + begin + if mimeCode = '' then + currXMLport.Skip(); + end; + } + textattribute(filename) + { + trigger OnBeforePassVariable() + begin + if filename = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if EmbeddedDocumentBinaryObject = '' then + currXMLport.Skip(); + end; + } + textelement(ExternalReference) + { + NamespacePrefix = 'cac'; + textelement(URI) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if URI = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if URI = '' then + currXMLport.Skip(); + end; + } + } + + trigger OnAfterGetRecord() + var + PEPPOLAttachmentHandler: Interface "PEPPOL Attachment Provider"; + NewProcessedDocType: Option Sales,Service; + begin + PEPPOLAttachmentHandler := GetFormat(); + if (AdditionalDocRefLoop.Number <= DocumentAttachments.Count()) then + PEPPOLAttachmentHandler.GetAdditionalDocRefInfo( + additionaldocrefloop.Number, + DocumentAttachments, + SalesHeader, + AdditionalDocumentReferenceID, + AdditionalDocRefDocumentType, + URI, + filename, + mimeCode, + EmbeddedDocumentBinaryObject, + NewProcessedDocType::Sales) + else + if GeneratePDF then + PEPPOLAttachmentHandler.GeneratePDFAttachmentAsAdditionalDocRef( + SalesHeader, + AdditionalDocumentReferenceID, + AdditionalDocRefDocumentType, + URI, + filename, + mimeCode, + EmbeddedDocumentBinaryObject); + + if AdditionalDocumentReferenceID = '' then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + var + NumberRangeEnd: Integer; + begin + NumberRangeEnd := DocumentAttachments.Count(); + + if GeneratePDF then + NumberRangeEnd += 1; + + // Make sure range end is never 0 + if NumberRangeEnd = 0 then + NumberRangeEnd := 1; + AdditionalDocRefLoop.SetRange(Number, 1, NumberRangeEnd); + end; + } + textelement(AccountingSupplierParty) + { + NamespacePrefix = 'cac'; + textelement(supplierparty) + { + NamespacePrefix = 'cac'; + XmlName = 'Party'; + textelement(supplierendpointid) + { + NamespacePrefix = 'cbc'; + XmlName = 'EndpointID'; + textattribute(supplierschemeid) + { + XmlName = 'schemeID'; + } + + trigger OnBeforePassVariable() + begin + if SupplierEndpointID = '' then + currXMLport.Skip(); + end; + } + textelement(PartyIdentification) + { + NamespacePrefix = 'cac'; + textelement(partyidentificationid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + textattribute(supplierpartyidschemeid) + { + XmlName = 'schemeID'; + } + } + + trigger OnBeforePassVariable() + var + PEPPOLPartyInfoProvider: Interface "PEPPOL Party Info Provider"; + begin + PEPPOLPartyInfoProvider := GetFormat(); + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyIdentificationID(SalesHeader, PartyIdentificationID); + if PartyIdentificationID = '' then + currXMLport.Skip(); + end; + } + textelement(supplierpartyname) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyName'; + textelement(suppliername) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + } + textelement(supplierpostaladdress) + { + NamespacePrefix = 'cac'; + XmlName = 'PostalAddress'; + textelement(StreetName) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if StreetName = '' then + currXMLport.Skip(); + end; + } + textelement(supplieradditionalstreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'AdditionalStreetName'; + + trigger OnBeforePassVariable() + begin + if SupplierAdditionalStreetName = '' then + currXMLport.Skip(); + end; + } + textelement(CityName) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if CityName = '' then + currXMLport.Skip(); + end; + } + textelement(PostalZone) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if PostalZone = '' then + currXMLport.Skip(); + end; + } + textelement(CountrySubentity) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if CountrySubentity = '' then + currXMLport.Skip(); + end; + } + textelement(Country) + { + NamespacePrefix = 'cac'; + textelement(IdentificationCode) + { + NamespacePrefix = 'cbc'; + } + } + } + textelement(PartyTaxScheme) + { + NamespacePrefix = 'cac'; + textelement(CompanyID) + { + NamespacePrefix = 'cbc'; + textattribute(companyidschemeid) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if CompanyIDSchemeID = '' then + currXMLport.Skip(); + end; + } + } + textelement(ExemptionReason) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if ExemptionReason = '' then + currXMLport.Skip(); + end; + } + textelement(suppliertaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(taxschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + begin + if CompanyID = '' then + currXMLport.Skip(); + end; + } + textelement(partytaxschemeno) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyTaxScheme'; + textelement(companyidno) + { + NamespacePrefix = 'cbc'; + XmlName = 'CompanyID'; + textattribute(companyidschemeidno) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if CompanyIDSchemeIDNO = '' then + currXMLport.Skip(); + end; + } + } + textelement(suppliertaxschemeno) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(taxschemeidno) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + begin + if CompanyIDNO = '' then + currXMLport.Skip(); + end; + } + textelement(PartyLegalEntity) + { + NamespacePrefix = 'cac'; + textelement(partylegalentityregname) + { + NamespacePrefix = 'cbc'; + XmlName = 'RegistrationName'; + + trigger OnBeforePassVariable() + begin + if PartyLegalEntityRegName = '' then + currXMLport.Skip(); + end; + } + textelement(partylegalentitycompanyid) + { + NamespacePrefix = 'cbc'; + XmlName = 'CompanyID'; + textattribute(partylegalentityschemeid) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if PartyLegalEntitySchemeID = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if PartyLegalEntityCompanyID = '' then + currXMLport.Skip(); + end; + } + } + textelement(Contact) + { + NamespacePrefix = 'cac'; + textelement(contactname) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + + trigger OnBeforePassVariable() + begin + if ContactName = '' then + currXMLport.Skip(); + end; + } + textelement(Telephone) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if Telephone = '' then + currXMLport.Skip(); + end; + } + textelement(Telefax) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if Telefax = '' then + currXMLport.Skip(); + end; + } + textelement(ElectronicMail) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if ElectronicMail = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if (ContactName = '') and (Telephone = '') and (Telefax = '') and (ElectronicMail = '') then + currXMLport.Skip(); + end; + } + } + + trigger OnBeforePassVariable() + var + SupplierRegAddrCityName: Text; + SupplierRegAddrCountryIdCode: Text; + SupplRegAddrCountryIdListId: Text; + PEPPOLPartyInfoProvider: Interface "PEPPOL Party Info Provider"; + begin + PEPPOLPartyInfoProvider := GetFormat(); + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyInfoBIS( + SupplierEndpointID, + SupplierSchemeID, + SupplierName); + + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyPostalAddr( + SalesHeader, + StreetName, + SupplierAdditionalStreetName, + CityName, + PostalZone, + CountrySubentity, + IdentificationCode, + DummyVar); + + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyTaxSchemeBIS( + TempVATAmtLine, + CompanyID, + CompanyIDSchemeID, + TaxSchemeID); + + PEPPOL30NOManagement.GetAccountingSupplierPartyTaxSchemeNO( + CompanyIDNO, CompanyIDSchemeIDNO, TaxSchemeIDNO); + + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyLegalEntityBIS( + PartyLegalEntityRegName, + PartyLegalEntityCompanyID, + PartyLegalEntitySchemeID, + SupplierRegAddrCityName, + SupplierRegAddrCountryIdCode, + SupplRegAddrCountryIdListId); + + PEPPOLPartyInfoProvider.GetAccountingSupplierPartyContact( + SalesHeader, + DummyVar, + ContactName, + Telephone, + Telefax, + ElectronicMail); + end; + } + textelement(AccountingCustomerParty) + { + NamespacePrefix = 'cac'; + textelement(customerparty) + { + NamespacePrefix = 'cac'; + XmlName = 'Party'; + textelement(customerendpointid) + { + NamespacePrefix = 'cbc'; + XmlName = 'EndpointID'; + textattribute(customerschemeid) + { + XmlName = 'schemeID'; + } + + trigger OnBeforePassVariable() + begin + if CustomerEndpointID = '' then + currXMLport.Skip(); + end; + } + textelement(customerpartyidentification) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyIdentification'; + textelement(customerpartyidentificationid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + textattribute(customerpartyidschemeid) + { + XmlName = 'schemeID'; + } + } + + trigger OnBeforePassVariable() + begin + if CustomerPartyIdentificationID = '' then + currXMLport.Skip(); + end; + } + textelement(custoemerpartyname) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyName'; + textelement(customername) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + } + textelement(customerpostaladdress) + { + NamespacePrefix = 'cac'; + XmlName = 'PostalAddress'; + textelement(customerstreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'StreetName'; + } + textelement(customeradditionalstreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'AdditionalStreetName'; + + trigger OnBeforePassVariable() + begin + if CustomerAdditionalStreetName = '' then + currXMLport.Skip(); + end; + } + textelement(customercityname) + { + NamespacePrefix = 'cbc'; + XmlName = 'CityName'; + } + textelement(customerpostalzone) + { + NamespacePrefix = 'cbc'; + XmlName = 'PostalZone'; + } + textelement(customercountrysubentity) + { + NamespacePrefix = 'cbc'; + XmlName = 'CountrySubentity'; + + trigger OnBeforePassVariable() + begin + if CustomerCountrySubentity = '' then + currXMLport.Skip(); + end; + } + textelement(customercountry) + { + NamespacePrefix = 'cac'; + XmlName = 'Country'; + textelement(customeridentificationcode) + { + NamespacePrefix = 'cbc'; + XmlName = 'IdentificationCode'; + } + } + } + textelement(customerpartytaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyTaxScheme'; + textelement(custpartytaxschemecompanyid) + { + NamespacePrefix = 'cbc'; + XmlName = 'CompanyID'; + textattribute(custpartytaxschemecompidschid) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if CustPartyTaxSchemeCompIDSchID = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if CustPartyTaxSchemeCompanyID = '' then + currXMLport.Skip(); + end; + } + textelement(custtaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(custtaxschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + begin + if CustTaxSchemeID = '' then + currXMLport.Skip(); + end; + } + textelement(custpartylegalentity) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyLegalEntity'; + textelement(custpartylegalentityregname) + { + NamespacePrefix = 'cbc'; + XmlName = 'RegistrationName'; + + trigger OnBeforePassVariable() + begin + if CustPartyLegalEntityRegName = '' then + currXMLport.Skip(); + end; + } + textelement(custpartylegalentitycompanyid) + { + NamespacePrefix = 'cbc'; + XmlName = 'CompanyID'; + textattribute(custpartylegalentityidschemeid) + { + XmlName = 'schemeID'; + + trigger OnBeforePassVariable() + begin + if CustPartyLegalEntityIDSchemeID = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if CustPartyLegalEntityCompanyID = '' then + currXMLport.Skip(); + end; + } + } + textelement(custcontact) + { + NamespacePrefix = 'cac'; + XmlName = 'Contact'; + textelement(custcontactname) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + textelement(custcontacttelephone) + { + NamespacePrefix = 'cbc'; + XmlName = 'Telephone'; + + trigger OnBeforePassVariable() + begin + if CustContactTelephone = '' then + currXMLport.Skip(); + end; + } + textelement(custcontacttelefax) + { + NamespacePrefix = 'cbc'; + XmlName = 'Telefax'; + + trigger OnBeforePassVariable() + begin + if CustContactTelefax = '' then + currXMLport.Skip(); + end; + } + textelement(custcontactelectronicmail) + { + NamespacePrefix = 'cbc'; + XmlName = 'ElectronicMail'; + + trigger OnBeforePassVariable() + begin + if CustContactElectronicMail = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + begin + if (CustContactName = '') and (CustContactElectronicMail = '') and + (CustContactTelephone = '') and (CustContactTelefax = '') + then + currXMLport.Skip(); + end; + } + } + + trigger OnBeforePassVariable() + var + PEPPOLPartyInfoProvider: Interface "PEPPOL Party Info Provider"; + begin + PEPPOLPartyInfoProvider := GetFormat(); + PEPPOLPartyInfoProvider.GetAccountingCustomerPartyInfoBIS( + SalesHeader, + CustomerEndpointID, + CustomerSchemeID, + CustomerPartyIdentificationID, + CustomerPartyIDSchemeID, + CustomerName); + + PEPPOLPartyInfoProvider.GetAccountingCustomerPartyPostalAddr( + SalesHeader, + CustomerStreetName, + CustomerAdditionalStreetName, + CustomerCityName, + CustomerPostalZone, + CustomerCountrySubentity, + CustomerIdentificationCode, + DummyVar); + + PEPPOLPartyInfoProvider.GetAccountingCustomerPartyTaxSchemeBIS30( + SalesHeader, + CustPartyTaxSchemeCompanyID, + CustPartyTaxSchemeCompIDSchID, + CustTaxSchemeID, + TempVATAmtLine); + + PEPPOLPartyInfoProvider.GetAccountingCustomerPartyLegalEntityBIS( + SalesHeader, + CustPartyLegalEntityRegName, + CustPartyLegalEntityCompanyID, + CustPartyLegalEntityIDSchemeID); + + PEPPOLPartyInfoProvider.GetAccountingCustomerPartyContact( + SalesHeader, + DummyVar, + CustContactName, + CustContactTelephone, + CustContactTelefax, + CustContactElectronicMail); + end; + } + textelement(TaxRepresentativeParty) + { + NamespacePrefix = 'cac'; + textelement(taxreppartypartyname) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyName'; + textelement(taxreppartynamename) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + } + textelement(payeepartytaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyTaxScheme'; + textelement(payeepartytaxschemecompanyid) + { + NamespacePrefix = 'cbc'; + XmlName = 'CompanyID'; + textattribute(payeepartytaxschcompidschemeid) + { + XmlName = 'schemeID'; + } + } + textelement(payeepartytaxschemetaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(payeepartytaxschemetaxschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + begin + if PayeePartyTaxScheme = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLPartyInfoProvider: Interface "PEPPOL Party Info Provider"; + begin + PEPPOLPartyInfoProvider := GetFormat(); + PEPPOLPartyInfoProvider.GetTaxRepresentativePartyInfo( + TaxRepPartyNameName, + PayeePartyTaxSchemeCompanyID, + PayeePartyTaxSchCompIDSchemeID, + PayeePartyTaxSchemeTaxSchemeID); + + if TaxRepPartyPartyName = '' then + currXMLport.Skip(); + end; + } + textelement(Delivery) + { + NamespacePrefix = 'cac'; + textelement(ActualDeliveryDate) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if ActualDeliveryDate = '' then + currXMLport.Skip(); + end; + } + textelement(DeliveryLocation) + { + NamespacePrefix = 'cac'; + textelement(deliveryid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + textattribute(deliveryidschemeid) + { + XmlName = 'schemeID'; + } + + trigger OnBeforePassVariable() + begin + if DeliveryID = '' then + currXMLport.Skip(); + end; + } + textelement(deliveryaddress) + { + NamespacePrefix = 'cac'; + XmlName = 'Address'; + textelement(deliverystreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'StreetName'; + } + textelement(deliveryadditionalstreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'AdditionalStreetName'; + + trigger OnBeforePassVariable() + begin + if DeliveryAdditionalStreetName = '' then + currXMLport.Skip(); + end; + } + textelement(deliverycityname) + { + NamespacePrefix = 'cbc'; + XmlName = 'CityName'; + + trigger OnBeforePassVariable() + begin + if DeliveryCityName = '' then + currXMLport.Skip(); + end; + } + textelement(deliverypostalzone) + { + NamespacePrefix = 'cbc'; + XmlName = 'PostalZone'; + + trigger OnBeforePassVariable() + begin + if DeliveryPostalZone = '' then + currXMLport.Skip(); + end; + } + textelement(deliverycountrysubentity) + { + NamespacePrefix = 'cbc'; + XmlName = 'CountrySubentity'; + + trigger OnBeforePassVariable() + begin + if DeliveryCountrySubentity = '' then + currXMLport.Skip(); + end; + } + textelement(deliverycountry) + { + NamespacePrefix = 'cac'; + XmlName = 'Country'; + textelement(deliverycountryidcode) + { + NamespacePrefix = 'cbc'; + XmlName = 'IdentificationCode'; + } + } + } + } + textelement(DeliveryParty) + { + NamespacePrefix = 'cac'; + XMLName = 'DeliveryParty'; + textelement(DeliveryPartyName) + { + NamespacePrefix = 'cac'; + XmlName = 'PartyName'; + textelement(DeliveryPartyNameValue) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + } + trigger OnBeforePassVariable() + begin + if DeliveryPartyNameValue = '' then + currXMLport.Skip(); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLDeliveryInfoProvider: Interface "PEPPOL Delivery Info Provider"; + begin + PEPPOLDeliveryInfoProvider := GetFormat(); + PEPPOLDeliveryInfoProvider.GetGLNDeliveryInfo( + SalesHeader, + ActualDeliveryDate, + DeliveryID, + DeliveryIDSchemeID); + + PEPPOLDeliveryInfoProvider.GetDeliveryAddress( + SalesHeader, + DeliveryStreetName, + DeliveryAdditionalStreetName, + DeliveryCityName, + DeliveryPostalZone, + DeliveryCountrySubentity, + DeliveryCountryIdCode, + DummyVar); + + PEPPOLDeliveryInfoProvider.GetDeliveryPartyName(SalesHeader, DeliveryPartyNameValue); + end; + } + textelement(PaymentMeans) + { + NamespacePrefix = 'cac'; + textelement(PaymentMeansCode) + { + NamespacePrefix = 'cbc'; + } + textelement(PaymentChannelCode) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if PaymentChannelCode = '' then + currXMLport.Skip(); + end; + } + textelement(PaymentID) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if PaymentID = '' then + currXMLport.Skip(); + end; + } + textelement(CardAccount) + { + NamespacePrefix = 'cac'; + textelement(PrimaryAccountNumberID) + { + NamespacePrefix = 'cbc'; + } + textelement(NetworkID) + { + NamespacePrefix = 'cbc'; + } + + trigger OnBeforePassVariable() + begin + if PrimaryAccountNumberID = '' then + currXMLport.Skip(); + end; + } + textelement(PayeeFinancialAccount) + { + NamespacePrefix = 'cac'; + textelement(payeefinancialaccountid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(FinancialInstitutionBranch) + { + NamespacePrefix = 'cac'; + textelement(financialinstitutionbranchid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + } + + trigger OnBeforePassVariable() + var + PEPPOLPaymentInfoProvider: Interface "PEPPOL Payment Info Provider"; + begin + PEPPOLPaymentInfoProvider := GetFormat(); + PEPPOLPaymentInfoProvider.GetPaymentMeansInfo( + SalesHeader, + PaymentMeansCode, + DummyVar, + DummyVar, + PaymentChannelCode, + PaymentID, + PrimaryAccountNumberID, + NetworkID); + + PEPPOLPaymentInfoProvider.GetPaymentMeansPayeeFinancialAccBIS( + SalesHeader, + PayeeFinancialAccountID, + FinancialInstitutionBranchID); + end; + } + tableelement(pmttermsloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'PaymentTerms'; + textelement(paymenttermsnote) + { + NamespacePrefix = 'cbc'; + XmlName = 'Note'; + } + + trigger OnAfterGetRecord() + var + PEPPOLPaymentInfoProvider: Interface "PEPPOL Payment Info Provider"; + begin + PEPPOLPaymentInfoProvider := GetFormat(); + PEPPOLPaymentInfoProvider.GetPaymentTermsInfo( + SalesHeader, + PaymentTermsNote); + + if PaymentTermsNote = '' then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + begin + PmtTermsLoop.SetRange(Number, 1, 1); + end; + } + tableelement(allowancechargeloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'AllowanceCharge'; + textelement(ChargeIndicator) + { + NamespacePrefix = 'cbc'; + } + textelement(AllowanceChargeReasonCode) + { + NamespacePrefix = 'cbc'; + } + textelement(AllowanceChargeReason) + { + NamespacePrefix = 'cbc'; + } + textelement(Amount) + { + NamespacePrefix = 'cbc'; + textattribute(allowancechargecurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(TaxCategory) + { + NamespacePrefix = 'cac'; + textelement(taxcategoryid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(Percent) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if Percent = '' then + currXMLport.Skip(); + end; + } + textelement(TaxScheme) + { + NamespacePrefix = 'cac'; + textelement(allowancechargetaxschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + } + + trigger OnAfterGetRecord() + var + PEPPOLTaxInfoProvider: Interface "PEPPOL Tax Info Provider"; + begin + if not FindNextVATAmtRec(TempVATAmtLine, AllowanceChargeLoop.Number) then + currXMLport.Break(); + + PEPPOLTaxInfoProvider := GetFormat(); + PEPPOLTaxInfoProvider.GetAllowanceChargeInfo( + TempVATAmtLine, + SalesHeader, + ChargeIndicator, + AllowanceChargeReasonCode, + DummyVar, + AllowanceChargeReason, + Amount, + AllowanceChargeCurrencyID, + TaxCategoryID, + DummyVar, + Percent, + AllowanceChargeTaxSchemeID); + + if ChargeIndicator = '' then + currXMLport.Skip(); + end; + } + tableelement(allowancechargepaymentdiscountloop; Integer) + { + NamespacePrefix = 'cac'; + XmlName = 'AllowanceCharge'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + textelement(ChargeIndicatorPaymentDiscount) + { + XmlName = 'ChargeIndicator'; + NamespacePrefix = 'cbc'; + } + textelement(AllowanceChargeReasonCodePaymentDiscount) + { + XmlName = 'AllowanceChargeReasonCode'; + NamespacePrefix = 'cbc'; + } + textelement(AllowanceChargeReasonPaymentDiscount) + { + XmlName = 'AllowanceChargeReason'; + NamespacePrefix = 'cbc'; + } + textelement(AmountPaymentDiscount) + { + XmlName = 'Amount'; + NamespacePrefix = 'cbc'; + textattribute(allowancechargecurrencyidPaymentDiscount) + { + XmlName = 'currencyID'; + } + } + textelement(TaxCategoryPaymentDiscount) + { + XmlName = 'TaxCategory'; + NamespacePrefix = 'cac'; + textelement(taxcategoryidPaymentDiscount) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(PercentPaymentDiscount) + { + XmlName = 'Percent'; + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if PercentPaymentDiscount = '' then + currXMLport.Skip(); + end; + } + textelement(TaxSchemePaymentDiscount) + { + XmlName = 'TaxScheme'; + NamespacePrefix = 'cac'; + textelement(allowancechargetaxschemeidPaymentDiscount) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + } + + trigger OnAfterGetRecord() + var + PEPPOLPaymentInfoProvider: Interface "PEPPOL Payment Info Provider"; + begin + if not FindNextVATAmtRec(TempVATAmtLine, AllowanceChargePaymentDiscountLoop.Number) then + currXMLport.Break(); + + PEPPOLPaymentInfoProvider := GetFormat(); + PEPPOLPaymentInfoProvider.GetAllowanceChargeInfoPaymentDiscount( + TempVATAmtLine, + SalesHeader, + ChargeIndicatorPaymentDiscount, + AllowanceChargeReasonCodePaymentDiscount, + DummyVar, + AllowanceChargeReasonPaymentDiscount, + AmountPaymentDiscount, + AllowanceChargeCurrencyIDPaymentDiscount, + TaxCategoryIDPaymentDiscount, + DummyVar, + PercentPaymentDiscount, + AllowanceChargeTaxSchemeIDPaymentDiscount); + + if ChargeIndicatorPaymentDiscount = '' then + currXMLport.Skip(); + end; + } + textelement(TaxTotal) + { + NamespacePrefix = 'cac'; + textelement(TaxAmount) + { + NamespacePrefix = 'cbc'; + textattribute(taxtotalcurrencyid) + { + XmlName = 'currencyID'; + } + } + tableelement(taxsubtotalloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'TaxSubtotal'; + textelement(TaxableAmount) + { + NamespacePrefix = 'cbc'; + textattribute(taxsubtotalcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(subtotaltaxamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'TaxAmount'; + textattribute(taxamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(subtotaltaxcategory) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxCategory'; + textelement(taxtotaltaxcategoryid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(taxcategorypercent) + { + NamespacePrefix = 'cbc'; + XmlName = 'Percent'; + } + textelement(TaxExemptionReason) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if TaxExemptionReason = '' then + currXMLport.Skip(); + end; + } + textelement(taxsubtotaltaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(taxtotaltaxschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + } + + trigger OnAfterGetRecord() + var + TransactionCurrencyTaxAmount: Text; + TransCurrTaxAmtCurrencyID: Text; + PEPPOLTaxInfoProvider: Interface "PEPPOL Tax Info Provider"; + begin + if (not FindNextVATAmtRec(TempVATAmtLine, TaxSubtotalLoop.Number)) and (TaxSubtotalLoop.Number > 1) then + currXMLport.Break(); + + PEPPOLTaxInfoProvider := GetFormat(); + PEPPOLTaxInfoProvider.GetTaxSubtotalInfo( + TempVATAmtLine, + SalesHeader, + TaxableAmount, + TaxAmountCurrencyID, + SubtotalTaxAmount, + TaxSubtotalCurrencyID, + TransactionCurrencyTaxAmount, + TransCurrTaxAmtCurrencyID, + TaxTotalTaxCategoryID, + DummyVar, + TaxCategoryPercent, + TaxTotalTaxSchemeID); + + PEPPOLTaxInfoProvider.GetTaxExemptionReason(TempVATProductPostingGroup, TaxExemptionReason, TaxTotalTaxCategoryID); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLTaxInfoProvider: Interface "PEPPOL Tax Info Provider"; + begin + PEPPOLTaxInfoProvider := GetFormat(); + PEPPOLTaxInfoProvider.GetTaxTotalInfo( + SalesHeader, + TempVATAmtLine, + TaxAmount, + TaxTotalCurrencyID); + end; + } + textelement(taxtotallcy) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxTotal'; + textelement(taxamountlcy) + { + NamespacePrefix = 'cbc'; + XmlName = 'TaxAmount'; + textattribute(taxtotalcurrencyidlcy) + { + XmlName = 'currencyID'; + } + } + + trigger OnBeforePassVariable() + begin + if TaxTotalCurrencyIDLCY = '' then + currXMLport.Skip(); + end; + } + textelement(LegalMonetaryTotal) + { + NamespacePrefix = 'cac'; + textelement(LineExtensionAmount) + { + NamespacePrefix = 'cbc'; + textattribute(legalmonetarytotalcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(TaxExclusiveAmount) + { + NamespacePrefix = 'cbc'; + textattribute(taxexclusiveamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(TaxInclusiveAmount) + { + NamespacePrefix = 'cbc'; + textattribute(taxinclusiveamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(AllowanceTotalAmount) + { + NamespacePrefix = 'cbc'; + textattribute(allowancetotalamountcurrencyid) + { + XmlName = 'currencyID'; + } + + trigger OnBeforePassVariable() + begin + if AllowanceTotalAmount = '' then + currXMLport.Skip(); + end; + } + textelement(ChargeTotalAmount) + { + NamespacePrefix = 'cbc'; + textattribute(chargetotalamountcurrencyid) + { + XmlName = 'currencyID'; + } + + trigger OnBeforePassVariable() + begin + if ChargeTotalAmount = '' then + currXMLport.Skip(); + end; + } + textelement(PrepaidAmount) + { + NamespacePrefix = 'cbc'; + textattribute(prepaidcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(PayableRoundingAmount) + { + NamespacePrefix = 'cbc'; + textattribute(payablerndingamountcurrencyid) + { + XmlName = 'currencyID'; + } + + trigger OnBeforePassVariable() + begin + if PayableRoundingAmount = '' then + currXMLport.Skip(); + end; + } + textelement(PayableAmount) + { + NamespacePrefix = 'cbc'; + textattribute(payableamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + + trigger OnBeforePassVariable() + var + PEPPOLMonetaryInfoProvider: Interface "PEPPOL Monetary Info Provider"; + begin + PEPPOLMonetaryInfoProvider := GetFormat(); + PEPPOLMonetaryInfoProvider.GetLegalMonetaryInfo( + SalesHeader, + TempSalesLineRounding, + TempVATAmtLine, + LineExtensionAmount, + LegalMonetaryTotalCurrencyID, + TaxExclusiveAmount, + TaxExclusiveAmountCurrencyID, + TaxInclusiveAmount, + TaxInclusiveAmountCurrencyID, + AllowanceTotalAmount, + AllowanceTotalAmountCurrencyID, + ChargeTotalAmount, + ChargeTotalAmountCurrencyID, + PrepaidAmount, + PrepaidCurrencyID, + PayableRoundingAmount, + PayableRndingAmountCurrencyID, + PayableAmount, + PayableAmountCurrencyID); + end; + } + tableelement(invoicelineloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'InvoiceLine'; + textelement(invoicelineid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(invoicelinenote) + { + NamespacePrefix = 'cbc'; + XmlName = 'Note'; + + trigger OnBeforePassVariable() + begin + if InvoiceLineNote = '' then + currXMLport.Skip(); + end; + } + textelement(InvoicedQuantity) + { + NamespacePrefix = 'cbc'; + textattribute(unitCode) + { + } + } + textelement(invoicelineextensionamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'LineExtensionAmount'; + textattribute(lineextensionamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(invoicelineaccountingcost) + { + NamespacePrefix = 'cbc'; + XmlName = 'AccountingCost'; + + trigger OnBeforePassVariable() + begin + if InvoiceLineAccountingCost = '' then + currXMLport.Skip(); + end; + } + textelement(invoicelineinvoiceperiod) + { + NamespacePrefix = 'cac'; + XmlName = 'InvoicePeriod'; + textelement(invlineinvoiceperiodstartdate) + { + NamespacePrefix = 'cbc'; + XmlName = 'StartDate'; + } + textelement(invlineinvoiceperiodenddate) + { + NamespacePrefix = 'cbc'; + XmlName = 'EndDate'; + } + + trigger OnBeforePassVariable() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineInvoicePeriodInfo( + InvLineInvoicePeriodStartDate, + InvLineInvoicePeriodEndDate); + + if (InvLineInvoicePeriodStartDate = '') and (InvLineInvoicePeriodEndDate = '') then + currXMLport.Skip(); + end; + } + textelement(OrderLineReference) + { + NamespacePrefix = 'cac'; + textelement(orderlinereferencelineid) + { + NamespacePrefix = 'cbc'; + XmlName = 'LineID'; + } + + trigger OnBeforePassVariable() + begin + if OrderLineReferenceLineID = '' then + currXMLport.Skip(); + end; + } + textelement(invoicelinedelivery) + { + NamespacePrefix = 'cac'; + XmlName = 'Delivery'; + textelement(invoicelineactualdeliverydate) + { + NamespacePrefix = 'cbc'; + XmlName = 'ActualDeliveryDate'; + } + textelement(invoicelinedeliverylocation) + { + NamespacePrefix = 'cac'; + XmlName = 'DeliveryLocation'; + textelement(invoicelinedeliveryid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + textattribute(invoicelinedeliveryidschemeid) + { + XmlName = 'schemeID'; + } + } + textelement(invoicelinedeliveryaddress) + { + NamespacePrefix = 'cac'; + XmlName = 'Address'; + textelement(invoicelinedeliverystreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'StreetName'; + } + textelement(invlinedeliveryaddstreetname) + { + NamespacePrefix = 'cbc'; + XmlName = 'AdditionalStreetName'; + } + textelement(invoicelinedeliverycityname) + { + NamespacePrefix = 'cbc'; + XmlName = 'CityName'; + } + textelement(invoicelinedeliverypostalzone) + { + NamespacePrefix = 'cbc'; + XmlName = 'PostalZone'; + } + textelement(invlndeliverycountrysubentity) + { + NamespacePrefix = 'cbc'; + XmlName = 'CountrySubentity'; + } + textelement(invoicelinedeliverycountry) + { + NamespacePrefix = 'cac'; + XmlName = 'Country'; + textelement(invlndeliverycountryidcode) + { + NamespacePrefix = 'cbc'; + XmlName = 'IdentificationCode'; + } + } + } + } + + trigger OnBeforePassVariable() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + InvLineDeliveryCountryListID: Text; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineDeliveryInfo( + InvoiceLineActualDeliveryDate, + InvoiceLineDeliveryID, + InvoiceLineDeliveryIDSchemeID); + + PEPPOLLineInfoProvider.GetLineDeliveryPostalAddr( + InvoiceLineDeliveryStreetName, + InvLineDeliveryAddStreetName, + InvoiceLineDeliveryCityName, + InvoiceLineDeliveryPostalZone, + InvLnDeliveryCountrySubentity, + InvLnDeliveryCountryIdCode, + InvLineDeliveryCountryListID); + + if (InvoiceLineDeliveryID = '') and + (InvoiceLineDeliveryStreetName = '') and + (InvoiceLineActualDeliveryDate = '') + then + currXMLport.Skip(); + end; + } + tableelement(invlnallowancechargeloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'AllowanceCharge'; + textelement(invlnallowancechargeindicator) + { + NamespacePrefix = 'cbc'; + XmlName = 'ChargeIndicator'; + } + textelement(invlnallowancechargereason) + { + NamespacePrefix = 'cbc'; + XmlName = 'AllowanceChargeReason'; + } + textelement(invlnallowancechargeamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'Amount'; + textattribute(invlnallowancechargeamtcurrid) + { + XmlName = 'currencyID'; + } + } + + trigger OnAfterGetRecord() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineAllowanceChargeInfo( + SalesLine, + SalesHeader, + InvLnAllowanceChargeIndicator, + InvLnAllowanceChargeReason, + InvLnAllowanceChargeAmount, + InvLnAllowanceChargeAmtCurrID); + + if InvLnAllowanceChargeIndicator = '' then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + begin + InvLnAllowanceChargeLoop.SetRange(Number, 1, 1); + end; + } + textelement(Item) + { + NamespacePrefix = 'cac'; + textelement(Description) + { + NamespacePrefix = 'cbc'; + + trigger OnBeforePassVariable() + begin + if Description = '' then + currXMLport.Skip(); + end; + } + textelement(Name) + { + NamespacePrefix = 'cbc'; + } + textelement(SellersItemIdentification) + { + NamespacePrefix = 'cac'; + textelement(sellersitemidentificationid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + + trigger OnBeforePassVariable() + begin + if SellersItemIdentificationID = '' then + currXMLport.Skip(); + end; + } + textelement(StandardItemIdentification) + { + NamespacePrefix = 'cac'; + textelement(standarditemidentificationid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + textattribute(stditemididschemeid) + { + XmlName = 'schemeID'; + } + } + + trigger OnBeforePassVariable() + begin + if StandardItemIdentificationID = '' then + currXMLport.Skip(); + end; + } + textelement(OriginCountry) + { + NamespacePrefix = 'cac'; + textelement(origincountryidcode) + { + NamespacePrefix = 'cbc'; + XmlName = 'IdentificationCode'; + textattribute(origincountryidcodelistid) + { + XmlName = 'listID'; + } + } + + trigger OnBeforePassVariable() + begin + if OriginCountryIdCode = '' then + currXMLport.Skip(); + end; + } + tableelement(commodityclassificationloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'CommodityClassification'; + textelement(CommodityCode) + { + NamespacePrefix = 'cbc'; + textattribute(commoditycodelistid) + { + XmlName = 'listID'; + } + + trigger OnBeforePassVariable() + begin + if CommodityCode = '' then + currXMLport.Skip(); + end; + } + textelement(ItemClassificationCode) + { + NamespacePrefix = 'cbc'; + textattribute(itemclassificationcodelistid) + { + XmlName = 'listID'; + } + + trigger OnBeforePassVariable() + begin + if ItemClassificationCode = '' then + currXMLport.Skip(); + end; + } + + trigger OnAfterGetRecord() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineItemCommodityClassificationInfo( + CommodityCode, + CommodityCodeListID, + ItemClassificationCode, + ItemClassificationCodeListID); + + if (CommodityCode = '') and (ItemClassificationCode = '') then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + begin + CommodityClassificationLoop.SetRange(Number, 1, 1); + end; + } + textelement(ClassifiedTaxCategory) + { + NamespacePrefix = 'cac'; + textelement(classifiedtaxcategoryid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + textelement(invoicelinetaxpercent) + { + NamespacePrefix = 'cbc'; + XmlName = 'Percent'; + + trigger OnBeforePassVariable() + begin + if InvoiceLineTaxPercent = '' then + currXMLport.Skip(); + end; + } + textelement(classifiedtaxcategorytaxscheme) + { + NamespacePrefix = 'cac'; + XmlName = 'TaxScheme'; + textelement(classifiedtaxcategoryschemeid) + { + NamespacePrefix = 'cbc'; + XmlName = 'ID'; + } + } + + trigger OnBeforePassVariable() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineItemClassifiedTaxCategoryBIS( + SalesLine, + ClassifiedTaxCategoryID, + DummyVar, + InvoiceLineTaxPercent, + ClassifiedTaxCategorySchemeID); + end; + } + tableelement(additionalitempropertyloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'AdditionalItemProperty'; + textelement(additionalitempropertyname) + { + NamespacePrefix = 'cbc'; + XmlName = 'Name'; + } + textelement(additionalitempropertyvalue) + { + NamespacePrefix = 'cbc'; + XmlName = 'Value'; + } + + trigger OnAfterGetRecord() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineAdditionalItemPropertyInfo( + SalesLine, + AdditionalItemPropertyName, + AdditionalItemPropertyValue); + + if AdditionalItemPropertyName = '' then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + begin + AdditionalItemPropertyLoop.SetRange(Number, 1, 1); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLineItemInfo( + SalesLine, + Description, + Name, + SellersItemIdentificationID, + StandardItemIdentificationID, + StdItemIdIDSchemeID, + OriginCountryIdCode, + OriginCountryIdCodeListID); + end; + } + textelement(invoicelineprice) + { + NamespacePrefix = 'cac'; + XmlName = 'Price'; + textelement(invoicelinepriceamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'PriceAmount'; + textattribute(invlinepriceamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(BaseQuantity) + { + NamespacePrefix = 'cbc'; + textattribute(unitcodebaseqty) + { + XmlName = 'unitCode'; + } + } + tableelement(priceallowancechargeloop; Integer) + { + NamespacePrefix = 'cac'; + SourceTableView = sorting(Number) where(Number = filter(1 ..)); + XmlName = 'AllowanceCharge'; + textelement(pricechargeindicator) + { + NamespacePrefix = 'cbc'; + XmlName = 'ChargeIndicator'; + } + textelement(priceallowancechargeamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'Amount'; + textattribute(priceallowanceamountcurrencyid) + { + XmlName = 'currencyID'; + } + } + textelement(priceallowancechargebaseamount) + { + NamespacePrefix = 'cbc'; + XmlName = 'BaseAmount'; + textattribute(priceallowchargebaseamtcurrid) + { + XmlName = 'currencyID'; + } + } + + trigger OnAfterGetRecord() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLinePriceAllowanceChargeInfo( + PriceChargeIndicator, + PriceAllowanceChargeAmount, + PriceAllowanceAmountCurrencyID, + PriceAllowanceChargeBaseAmount, + PriceAllowChargeBaseAmtCurrID); + + if PriceChargeIndicator = '' then + currXMLport.Skip(); + end; + + trigger OnPreXmlItem() + begin + PriceAllowanceChargeLoop.SetRange(Number, 1, 1); + end; + } + + trigger OnBeforePassVariable() + var + PEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + PEPPOLLineInfoProvider := GetFormat(); + PEPPOLLineInfoProvider.GetLinePriceInfo( + SalesLine, + SalesHeader, + InvoiceLinePriceAmount, + InvLinePriceAmountCurrencyID, + BaseQuantity, + UnitCodeBaseQty); + end; + } + + trigger OnAfterGetRecord() + var + IPEPPOLLineInfoProvider: Interface "PEPPOL Line Info Provider"; + begin + if not PostedLineIterator.GetNextPostedLineAsSalesLine(PostedSourceLineRecRef, SalesLine) then + currXMLport.Break(); + + IPEPPOLLineInfoProvider := GetFormat(); + IPEPPOLLineInfoProvider.GetLineGeneralInfo( + SalesLine, + SalesHeader, + InvoiceLineID, + InvoiceLineNote, + InvoicedQuantity, + InvoiceLineExtensionAmount, + LineExtensionAmountCurrencyID, + InvoiceLineAccountingCost); + + IPEPPOLLineInfoProvider.GetLineUnitCodeInfo(SalesLine, unitCode, DummyVar); + end; + } + + trigger OnAfterGetRecord() + var + PEPPOL30Common: Codeunit "PEPPOL30 Common"; + IPEPPOLDocumentInfoProvider: Interface "PEPPOL Document Info Provider"; + begin + if not PostedHeaderIterator.GetNextPostedHeaderAsSalesHeader(PostedSourceRecRef, SalesHeader) then + currXMLport.Break(); + + PEPPOL30Common.GetTotals(PostedSourceRecRef, PostedSourceLineRecRef, TempVATAmtLine, TempVATProductPostingGroup, GetFormat()); + + IPEPPOLDocumentInfoProvider := GetFormat(); + IPEPPOLDocumentInfoProvider.GetGeneralInfoBIS( + SalesHeader, + ID, + IssueDate, + InvoiceTypeCode, + Note, + TaxPointDate, + DocumentCurrencyCode, + AccountingCost); + + CustomizationID := GetCustomizationID(); + ProfileID := GetProfileID(); + end; + } + } + + requestpage + { + + layout + { + area(content) + { + group(Control2) + { + ShowCaption = false; + field(SalesInvoiceNumber; SalesInvoiceHeader."No.") + { + ApplicationArea = Basic, Suite; + Caption = 'Sales Invoice No.'; + TableRelation = "Sales Invoice Header"; + ToolTip = 'Specifies the sales invoice to be exported as a PEPPOL 3.0 document.'; + } + } + } + } + } + + trigger OnPreXmlPort() + begin + CompanyInformation.Get(); + end; + + var + TempVATAmtLine: Record "VAT Amount Line" temporary; + SalesInvoiceHeader: Record "Sales Invoice Header"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TempVATProductPostingGroup: Record "VAT Product Posting Group" temporary; + TempSalesLineRounding: Record "Sales Line" temporary; + DocumentAttachments: Record "Document Attachment"; + CompanyInformation: Record "Company Information"; + PEPPOL30NOManagement: Codeunit "PEPPOL30 NO Management"; + PostedSourceRecRef, PostedSourceLineRecRef : RecordRef; + PostedHeaderIterator, PostedLineIterator : Interface "PEPPOL Posted Document Iterator"; + PEPPOL30Format: Enum "PEPPOL 3.0 Format"; + DummyVar: Text; + IsFormatSet, IsFormatInitialized : Boolean; + GeneratePDF: Boolean; + + + procedure SetFormat(Format: Enum "PEPPOL 3.0 Format") + begin + PEPPOL30Format := Format; + IsFormatSet := true; + end; + + local procedure GetFormat(): Enum "PEPPOL 3.0 Format" + var + PeppolSetup: Record "PEPPOL 3.0 Setup"; + begin + if not IsFormatSet then begin + PeppolSetup.GetSetup(); + PEPPOL30Format := PeppolSetup."PEPPOL 3.0 Sales Format"; + end; + exit(PEPPOL30Format); + end; + + local procedure FindNextVATAmtRec(var VATAmtLine: Record "VAT Amount Line"; Position: Integer): Boolean + begin + if Position = 1 then + exit(VATAmtLine.Find('-')); + exit(VATAmtLine.Next() <> 0); + end; + + procedure Initialize(DocVariant: Variant; Format: Enum "PEPPOL 3.0 Format") + var + PEPPOL30Common: Codeunit "PEPPOL30 Common"; + DocumentAttachmentMgt: Codeunit "Document Attachment Mgmt"; + begin + SetFormat(Format); + PostedSourceRecRef.GetTable(DocVariant); + if PostedSourceRecRef.Number <> 0 then begin + DocumentAttachmentMgt.SetDocumentAttachmentFiltersForRecRef(DocumentAttachments, PostedSourceRecRef); + PEPPOL30Common.GetInvoiceRoundingLine(PostedSourceRecRef, TempSalesLineRounding, GetFormat()); + PEPPOL30Common.SetFilters(PostedSourceRecRef, PostedSourceLineRecRef, TempSalesLineRounding); + + PostedHeaderIterator := GetFormat(); + PostedLineIterator := GetFormat(); + end; + end; + + /// + /// Controls whether a PDF document should be generated and included as an additional document reference. + /// + /// If true, generates a PDF based on Report Selection settings. + procedure SetGeneratePDF(GeneratePDFValue: Boolean) + begin + this.GeneratePDF := GeneratePDFValue; + end; + + local procedure GetCustomizationID(): Text + begin + exit('urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0') + end; + + local procedure GetProfileID(): Text + begin + exit('urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'); + end; + +} diff --git a/Apps/NO/SustainabilityContosoCoffeeDemoDatasetNO/app/app.json b/Apps/NO/SustainabilityContosoCoffeeDemoDatasetNO/app/app.json index 3ab92498cb..8865355327 100644 --- a/Apps/NO/SustainabilityContosoCoffeeDemoDatasetNO/app/app.json +++ b/Apps/NO/SustainabilityContosoCoffeeDemoDatasetNO/app/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/app.json b/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/app.json index 0af9837921..d756acde05 100644 --- a/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/app.json +++ b/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/NZ/EDocument_NZ/demo data/app.json b/Apps/NZ/EDocument_NZ/demo data/app.json index 23c4b329f5..3b22c2aa4b 100644 --- a/Apps/NZ/EDocument_NZ/demo data/app.json +++ b/Apps/NZ/EDocument_NZ/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/NZ/HybridBCLast_NZ/app/app.json b/Apps/NZ/HybridBCLast_NZ/app/app.json index 4ec5953edf..3c6935a7d8 100644 --- a/Apps/NZ/HybridBCLast_NZ/app/app.json +++ b/Apps/NZ/HybridBCLast_NZ/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/RU/CDTracking/app/app.json b/Apps/RU/CDTracking/app/app.json index e86d41eccf..8040eb7fe4 100644 --- a/Apps/RU/CDTracking/app/app.json +++ b/Apps/RU/CDTracking/app/app.json @@ -18,7 +18,7 @@ }, "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "application": "29.0.0.0" } diff --git a/Apps/RU/CDTracking/test/app.json b/Apps/RU/CDTracking/test/app.json index 2f61084844..fe6a9c4804 100644 --- a/Apps/RU/CDTracking/test/app.json +++ b/Apps/RU/CDTracking/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/RU/Onprem Permissions RU/app/app.json b/Apps/RU/Onprem Permissions RU/app/app.json index 174ab7fe2e..c02c13fc97 100644 --- a/Apps/RU/Onprem Permissions RU/app/app.json +++ b/Apps/RU/Onprem Permissions RU/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/app.json b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/app.json index c0954c8fa1..96c7e79578 100644 --- a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/app.json +++ b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/SE/EDocument_SE/demo data/app.json b/Apps/SE/EDocument_SE/demo data/app.json index 4b0b5bc40f..f908c44f60 100644 --- a/Apps/SE/EDocument_SE/demo data/app.json +++ b/Apps/SE/EDocument_SE/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 11251, diff --git a/Apps/SE/IntrastatSE/app/app.json b/Apps/SE/IntrastatSE/app/app.json index 5262277203..3c9c3d984c 100644 --- a/Apps/SE/IntrastatSE/app/app.json +++ b/Apps/SE/IntrastatSE/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 11298, diff --git a/Apps/SE/SECore/app/app.json b/Apps/SE/SECore/app/app.json index bc5dd84901..047c307561 100644 --- a/Apps/SE/SECore/app/app.json +++ b/Apps/SE/SECore/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/SE/SECore/test/app.json b/Apps/SE/SECore/test/app.json index fb81618d6c..4c7a991fe6 100644 --- a/Apps/SE/SECore/test/app.json +++ b/Apps/SE/SECore/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/SE/SIE/app/app.json b/Apps/SE/SIE/app/app.json index f9c54f6437..a80c809695 100644 --- a/Apps/SE/SIE/app/app.json +++ b/Apps/SE/SIE/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/SE/SIE/test/app.json b/Apps/SE/SIE/test/app.json index cad225d9b5..7c9c7e1746 100644 --- a/Apps/SE/SIE/test/app.json +++ b/Apps/SE/SIE/test/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2141039", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/US/ContosoCoffeeDemoDatasetUS/app/app.json b/Apps/US/ContosoCoffeeDemoDatasetUS/app/app.json index 27eaa35a56..f9599cd169 100644 --- a/Apps/US/ContosoCoffeeDemoDatasetUS/app/app.json +++ b/Apps/US/ContosoCoffeeDemoDatasetUS/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/US/EDocument_US/demo data/app.json b/Apps/US/EDocument_US/demo data/app.json index 377ad4ce4f..cb7c70f28d 100644 --- a/Apps/US/EDocument_US/demo data/app.json +++ b/Apps/US/EDocument_US/demo data/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "features": [ "TranslationFile" ], diff --git a/Apps/US/HybridBCLast_US/app/app.json b/Apps/US/HybridBCLast_US/app/app.json index 19382122e5..6505c7a9de 100644 --- a/Apps/US/HybridBCLast_US/app/app.json +++ b/Apps/US/HybridBCLast_US/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/US/HybridGP_US/app/app.json b/Apps/US/HybridGP_US/app/app.json index ed12bfdb71..bf758a4566 100644 --- a/Apps/US/HybridGP_US/app/app.json +++ b/Apps/US/HybridGP_US/app/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/US/HybridGP_US/test/app.json b/Apps/US/HybridGP_US/test/app.json index 66a1c1f68c..dd7b826456 100644 --- a/Apps/US/HybridGP_US/test/app.json +++ b/Apps/US/HybridGP_US/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/US/HybridSL_US/app/app.json b/Apps/US/HybridSL_US/app/app.json index 35411655b6..59413c6b44 100644 --- a/Apps/US/HybridSL_US/app/app.json +++ b/Apps/US/HybridSL_US/app/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "contextSensitiveHelpUrl": "https://learn.microsoft.com/dynamics365/business-central/", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/US/HybridSL_US/test/app.json b/Apps/US/HybridSL_US/test/app.json index 3c25ee4178..373d67e633 100644 --- a/Apps/US/HybridSL_US/test/app.json +++ b/Apps/US/HybridSL_US/test/app.json @@ -14,7 +14,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2285106", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/US/IRS1096/app/app.json b/Apps/US/IRS1096/app/app.json index 8ff809a2b2..c04457ad59 100644 --- a/Apps/US/IRS1096/app/app.json +++ b/Apps/US/IRS1096/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 10016, diff --git a/Apps/US/IRS1096/test/app.json b/Apps/US/IRS1096/test/app.json index 6e3de697bf..466a1ce5f5 100644 --- a/Apps/US/IRS1096/test/app.json +++ b/Apps/US/IRS1096/test/app.json @@ -10,7 +10,7 @@ "help": "https://learn.microsoft.com/en-us/dynamics365/business-central/localfunctionality/unitedstates/set-up-use-irs1096-form", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/US/IRSForms/app/app.json b/Apps/US/IRSForms/app/app.json index 8e062be795..378873f08c 100644 --- a/Apps/US/IRSForms/app/app.json +++ b/Apps/US/IRSForms/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "internalsVisibleTo": [ { "id": "dff12793-4e1c-4f3c-b7d3-331552c4cf5c", diff --git a/Apps/US/IRSForms/test library/app.json b/Apps/US/IRSForms/test library/app.json index 15e9f23b94..2eea30a949 100644 --- a/Apps/US/IRSForms/test library/app.json +++ b/Apps/US/IRSForms/test library/app.json @@ -29,7 +29,7 @@ "TranslationFile" ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148000, diff --git a/Apps/US/IRSForms/test/app.json b/Apps/US/IRSForms/test/app.json index fc3053afbf..bcee32faf1 100644 --- a/Apps/US/IRSForms/test/app.json +++ b/Apps/US/IRSForms/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?LinkId=724011", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/AMCBanking365Fundamentals/app/app.json b/Apps/W1/AMCBanking365Fundamentals/app/app.json index 2ccb4ad734..4afb348d8b 100644 --- a/Apps/W1/AMCBanking365Fundamentals/app/app.json +++ b/Apps/W1/AMCBanking365Fundamentals/app/app.json @@ -1,6 +1,6 @@ { "id": "16319982-4995-4fb1-8fb2-2b1e13773e3b", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "version": "29.0.0.0", "help": "https://go.microsoft.com/fwlink/?linkid=2101583", diff --git a/Apps/W1/AMCBanking365Fundamentals/test/app.json b/Apps/W1/AMCBanking365Fundamentals/test/app.json index 172e4d1940..4dbb81df0b 100644 --- a/Apps/W1/AMCBanking365Fundamentals/test/app.json +++ b/Apps/W1/AMCBanking365Fundamentals/test/app.json @@ -37,7 +37,7 @@ "version": "29.0.0.0" } ], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/W1/APIV1/app/app.json b/Apps/W1/APIV1/app/app.json index 221129340a..75d9f33b0f 100644 --- a/Apps/W1/APIV1/app/app.json +++ b/Apps/W1/APIV1/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 2146, diff --git a/Apps/W1/APIV1/test/app.json b/Apps/W1/APIV1/test/app.json index bfd5062d69..fcc0bc3996 100644 --- a/Apps/W1/APIV1/test/app.json +++ b/Apps/W1/APIV1/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/W1/APIV2/app/app.json b/Apps/W1/APIV2/app/app.json index b8596e8fe0..c196a814a5 100644 --- a/Apps/W1/APIV2/app/app.json +++ b/Apps/W1/APIV2/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 2145, diff --git a/Apps/W1/APIV2/test/app.json b/Apps/W1/APIV2/test/app.json index 8953ea950e..5c1f7bfe28 100644 --- a/Apps/W1/APIV2/test/app.json +++ b/Apps/W1/APIV2/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/W1/AuditFileExport/app/app.json b/Apps/W1/AuditFileExport/app/app.json index 3a91fd7d0a..33e67cc337 100644 --- a/Apps/W1/AuditFileExport/app/app.json +++ b/Apps/W1/AuditFileExport/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/AuditFileExport/test/app.json b/Apps/W1/AuditFileExport/test/app.json index eccbf90e74..46f27aa260 100644 --- a/Apps/W1/AuditFileExport/test/app.json +++ b/Apps/W1/AuditFileExport/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?LinkId=724011", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/AutomaticAccountCodes/app/app.json b/Apps/W1/AutomaticAccountCodes/app/app.json index a37d3ed1e0..b4219ad6cd 100644 --- a/Apps/W1/AutomaticAccountCodes/app/app.json +++ b/Apps/W1/AutomaticAccountCodes/app/app.json @@ -12,7 +12,7 @@ "logo": "ExtensionLogo.png", "contextSensitiveHelpUrl": "https://learn.microsoft.com/en-us/dynamics365/business-central/ui-extensions", "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 4850, diff --git a/Apps/W1/AutomaticAccountCodes/test/app.json b/Apps/W1/AutomaticAccountCodes/test/app.json index 3e8209dc83..f1a710a5b9 100644 --- a/Apps/W1/AutomaticAccountCodes/test/app.json +++ b/Apps/W1/AutomaticAccountCodes/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2179727", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/BankAccRecWithAI/app/app.json b/Apps/W1/BankAccRecWithAI/app/app.json index bc7d6e3f5d..58e3b9dbe8 100644 --- a/Apps/W1/BankAccRecWithAI/app/app.json +++ b/Apps/W1/BankAccRecWithAI/app/app.json @@ -19,7 +19,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 7250, diff --git a/Apps/W1/BankAccRecWithAI/test/.resources/TestSuites/Accuracy.xml b/Apps/W1/BankAccRecWithAI/test/.resources/TestSuites/Accuracy.xml index 6b6a08ec26..dfb9484630 100644 --- a/Apps/W1/BankAccRecWithAI/test/.resources/TestSuites/Accuracy.xml +++ b/Apps/W1/BankAccRecWithAI/test/.resources/TestSuites/Accuracy.xml @@ -1,6 +1,6 @@ - + diff --git a/Apps/W1/BankAccRecWithAI/test/app.json b/Apps/W1/BankAccRecWithAI/test/app.json index 819b0e8b1f..69cda1d956 100644 --- a/Apps/W1/BankAccRecWithAI/test/app.json +++ b/Apps/W1/BankAccRecWithAI/test/app.json @@ -38,7 +38,7 @@ ], "internalsVisibleTo": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 133500, diff --git a/Apps/W1/BankDeposits/app/app.json b/Apps/W1/BankDeposits/app/app.json index 0e1d4f49a8..22bd98da08 100644 --- a/Apps/W1/BankDeposits/app/app.json +++ b/Apps/W1/BankDeposits/app/app.json @@ -19,7 +19,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/BankDeposits/test/app.json b/Apps/W1/BankDeposits/test/app.json index a809368a85..3ea4451cb9 100644 --- a/Apps/W1/BankDeposits/test/app.json +++ b/Apps/W1/BankDeposits/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/W1/BasicExperience/app/app.json b/Apps/W1/BasicExperience/app/app.json index 98767af494..4c6bca5b80 100644 --- a/Apps/W1/BasicExperience/app/app.json +++ b/Apps/W1/BasicExperience/app/app.json @@ -12,7 +12,7 @@ "contextSensitiveHelpUrl": "https://AL16.com/help/", "logo": "logo/ExtensionLogo.png", "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 20600, diff --git a/Apps/W1/BasicExperience/test/app.json b/Apps/W1/BasicExperience/test/app.json index 2f6b61e25b..d3aa90fa94 100644 --- a/Apps/W1/BasicExperience/test/app.json +++ b/Apps/W1/BasicExperience/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/ClientAddIns/app/app.json b/Apps/W1/ClientAddIns/app/app.json index b180a78529..42332ad635 100644 --- a/Apps/W1/ClientAddIns/app/app.json +++ b/Apps/W1/ClientAddIns/app/app.json @@ -11,7 +11,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/CompanyHub/app/app.json b/Apps/W1/CompanyHub/app/app.json index e6fb0c9cba..f56cccfe8a 100644 --- a/Apps/W1/CompanyHub/app/app.json +++ b/Apps/W1/CompanyHub/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/ConnectivityApps/app/app.json b/Apps/W1/ConnectivityApps/app/app.json index d7f232211a..2128b0861f 100644 --- a/Apps/W1/ConnectivityApps/app/app.json +++ b/Apps/W1/ConnectivityApps/app/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2204236", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/ConnectivityApps/test/app.json b/Apps/W1/ConnectivityApps/test/app.json index 86cf5fbc0d..004b57ae73 100644 --- a/Apps/W1/ConnectivityApps/test/app.json +++ b/Apps/W1/ConnectivityApps/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2135559", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/app.json b/Apps/W1/ContosoCoffeeDemoDataset/app/app.json index 8c98f6390e..5e73373aa1 100644 --- a/Apps/W1/ContosoCoffeeDemoDataset/app/app.json +++ b/Apps/W1/ContosoCoffeeDemoDataset/app/app.json @@ -24,7 +24,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/ContosoCoffeeDemoDataset/test/app.json b/Apps/W1/ContosoCoffeeDemoDataset/test/app.json index a0cc9a3d0a..518783ac57 100644 --- a/Apps/W1/ContosoCoffeeDemoDataset/test/app.json +++ b/Apps/W1/ContosoCoffeeDemoDataset/test/app.json @@ -25,7 +25,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/CreateProductInformationWithCopilot/app/app.json b/Apps/W1/CreateProductInformationWithCopilot/app/app.json index a985927831..4f1f108241 100644 --- a/Apps/W1/CreateProductInformationWithCopilot/app/app.json +++ b/Apps/W1/CreateProductInformationWithCopilot/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "target": "OnPrem", "idRanges": [ diff --git a/Apps/W1/CrossEnvironmentIntercompany/app/app.json b/Apps/W1/CrossEnvironmentIntercompany/app/app.json index b28d20a76f..e9833de970 100644 --- a/Apps/W1/CrossEnvironmentIntercompany/app/app.json +++ b/Apps/W1/CrossEnvironmentIntercompany/app/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?linkid=724011", "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2134520", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "target": "Cloud", "idRanges": [ diff --git a/Apps/W1/DynamicsGPHistoricalData/app/app.json b/Apps/W1/DynamicsGPHistoricalData/app/app.json index a3549eff1a..ad3a74570c 100644 --- a/Apps/W1/DynamicsGPHistoricalData/app/app.json +++ b/Apps/W1/DynamicsGPHistoricalData/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/DynamicsGPHistoricalData/test/app.json b/Apps/W1/DynamicsGPHistoricalData/test/app.json index 1f92d208d5..7e3b135be2 100644 --- a/Apps/W1/DynamicsGPHistoricalData/test/app.json +++ b/Apps/W1/DynamicsGPHistoricalData/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/DynamicsGPHistorySmartLists/app/app.json b/Apps/W1/DynamicsGPHistorySmartLists/app/app.json index c381d30188..934e854267 100644 --- a/Apps/W1/DynamicsGPHistorySmartLists/app/app.json +++ b/Apps/W1/DynamicsGPHistorySmartLists/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/DynamicsSLHistoricalData/app/app.json b/Apps/W1/DynamicsSLHistoricalData/app/app.json index d3c5391c52..eb6383e8ac 100644 --- a/Apps/W1/DynamicsSLHistoricalData/app/app.json +++ b/Apps/W1/DynamicsSLHistoricalData/app/app.json @@ -12,7 +12,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/EDocumentConnectors/B2Brouter/app/app.json b/Apps/W1/EDocumentConnectors/B2Brouter/app/app.json index f42c37f798..97990a755a 100644 --- a/Apps/W1/EDocumentConnectors/B2Brouter/app/app.json +++ b/Apps/W1/EDocumentConnectors/B2Brouter/app/app.json @@ -27,7 +27,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/EDocumentConnectors/B2Brouter/test/app.json b/Apps/W1/EDocumentConnectors/B2Brouter/test/app.json index 177bd28986..a184aa760d 100644 --- a/Apps/W1/EDocumentConnectors/B2Brouter/test/app.json +++ b/Apps/W1/EDocumentConnectors/B2Brouter/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/EDocumentConnectors/Logiq/app/app.json b/Apps/W1/EDocumentConnectors/Logiq/app/app.json index 3bb19773c2..b18b123496 100644 --- a/Apps/W1/EDocumentConnectors/Logiq/app/app.json +++ b/Apps/W1/EDocumentConnectors/Logiq/app/app.json @@ -27,7 +27,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/EDocumentConnectors/Logiq/test/app.json b/Apps/W1/EDocumentConnectors/Logiq/test/app.json index 0baeee4e05..86783bb26a 100644 --- a/Apps/W1/EDocumentConnectors/Logiq/test/app.json +++ b/Apps/W1/EDocumentConnectors/Logiq/test/app.json @@ -56,7 +56,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/EDocumentConnectors/Microsoft365/app/app.json b/Apps/W1/EDocumentConnectors/Microsoft365/app/app.json index 81de87d429..c25311c3c9 100644 --- a/Apps/W1/EDocumentConnectors/Microsoft365/app/app.json +++ b/Apps/W1/EDocumentConnectors/Microsoft365/app/app.json @@ -27,11 +27,11 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 6381, - "to": 6387 + "to": 6388 } ], "resourceExposurePolicy": { diff --git a/Apps/W1/EDocumentConnectors/Microsoft365/app/src/EDocM365ConnEvents.Codeunit.al b/Apps/W1/EDocumentConnectors/Microsoft365/app/src/EDocM365ConnEvents.Codeunit.al new file mode 100644 index 0000000000..aa4acc8d0a --- /dev/null +++ b/Apps/W1/EDocumentConnectors/Microsoft365/app/src/EDocM365ConnEvents.Codeunit.al @@ -0,0 +1,20 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.EServices.EDocumentConnector.Microsoft365; + +using Microsoft.eServices.EDocument; + +codeunit 6388 "E-Doc. M365 Conn. Events" +{ + /// + /// Allows to change the tag applied to the outlook emails processed + /// + /// The record of the e-document service for which the category is being retrieved. This allows to have different categories for different e-document services if needed. + /// Out parameter. The description of the category to be applied to the outlook emails. + [IntegrationEvent(false, false)] + internal procedure OnGetOutlookCategoryDescription(EDocumentService: Record "E-Document Service"; var CategoryDescription: Text) + begin + end; +} \ No newline at end of file diff --git a/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookProcessing.Codeunit.al b/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookProcessing.Codeunit.al index 5106c6b506..5ef181d58c 100644 --- a/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookProcessing.Codeunit.al +++ b/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookProcessing.Codeunit.al @@ -46,7 +46,47 @@ codeunit 6385 "Outlook Processing" if EDocument."Outlook Mail Message Id" = '' then Error(MailMessageIdEmptyErr, EDocument."Entry No"); + Email.MarkAsRead(OutlookSetup."Email Account ID", OutlookSetup."Email Connector", EDocument."Outlook Mail Message Id"); + Email.ApplyEmailCategory(OutlookSetup."Email Account ID", OutlookSetup."Email Connector", EDocument."Outlook Mail Message Id", RetrieveOrCreateOutlookCategory(OutlookSetup, EDocumentService)); + end; + + /// + /// Retrieves the display name of the Outlook category associated to the processing by this E-Document Service. If the category does not exist, it is created. + /// + /// + /// + /// The display name of the Outlook category as needed by AddCategoryFilter. This name is guaranteed to exist in Outlook after the procedure completes. + local procedure RetrieveOrCreateOutlookCategory(var OutlookSetup: Record "Outlook Setup"; EDocumentService: Record "E-Document Service"): Text + var + TempEmailCategories: Record "Email Categories" temporary; + Email: Codeunit Email; + RedCategoryTok: Label 'Preset0', Locked = true; + CategoryFound: Boolean; + begin + Email.GetEmailCategories(OutlookSetup."Email Account ID", OutlookSetup."Email Connector", TempEmailCategories); + // We try to find the category used to tag the outlook emails by id + if OutlookSetup."Outlook Category Id" <> '' then begin + TempEmailCategories.SetRange("Id", OutlookSetup."Outlook Category Id"); + CategoryFound := TempEmailCategories.FindFirst(); + TempEmailCategories.SetRange("Id"); + end; + // If we cannot find the category by id, we try to find it by name + if not CategoryFound then begin + TempEmailCategories.SetRange("Display Name", GetOutlookCategoryDescription(EDocumentService)); + CategoryFound := TempEmailCategories.FindFirst(); + if CategoryFound then begin + OutlookSetup."Outlook Category Id" := TempEmailCategories.Id; // we update the setup with the id of the category we found to avoid having to do this search again + OutlookSetup.Modify(); + end; + TempEmailCategories.SetRange("Display Name"); + end; + // If we cannot find the category by id nor by name, we create it and assign it to the setup + if not CategoryFound then begin + OutlookSetup."Outlook Category Id" := CopyStr(Email.CreateEmailCategory(OutlookSetup."Email Account ID", OutlookSetup."Email Connector", GetOutlookCategoryDescription(EDocumentService), RedCategoryTok), 1, MaxStrLen(OutlookSetup."Outlook Category Id")); + OutlookSetup.Modify(); + end; + exit(CategoryFound ? TempEmailCategories."Display Name" : GetOutlookCategoryDescription(EDocumentService)); end; procedure ReceiveDocuments(var EDocumentService: Record "E-Document Service"; Documents: Codeunit "Temp Blob List"; ReceiveContext: Codeunit ReceiveContext) @@ -56,6 +96,7 @@ codeunit 6385 "Outlook Processing" OutlookProcessing: Codeunit "Outlook Processing"; FeatureTelemetry: Codeunit "Feature Telemetry"; DocumentsArray: JsonArray; + CategoryDescription: Text; begin CheckSetupEnabled(OutlookSetup); if DailyEmailLimitReached(EDocumentService) then begin @@ -67,14 +108,16 @@ codeunit 6385 "Outlook Processing" Session.LogMessage('0000QJ1', 'Daily limit for e-mail attachments received has been reached.', Verbosity::Warning, DataClassification::SystemMetadata, TelemetryScope::All, 'Category', FeatureName()); exit; end; - + CategoryDescription := RetrieveOrCreateOutlookCategory(OutlookSetup, EDocumentService); FeatureTelemetry.LogUptake('0000OGS', FeatureName(), Enum::"Feature Uptake Status"::Used); FeatureTelemetry.LogUsage('0000OGV', FeatureName(), Format(EDocumentService."Service Integration V2")); - TempFilters."Unread Emails" := true; TempFilters."Load Attachments" := true; TempFilters."Max No. of Emails" := GetMaxNoOfEmails(); TempFilters."Earliest Email" := OutlookSetup."Last Sync At"; + TempFilters."Category Filter Type" := TempFilters."Category Filter Type"::Exclude; + TempFilters.AddCategoryFilter(CategoryDescription); OutlookProcessing.ConfigureForEmailRetrieval(TempFilters); + Commit(); if not OutlookProcessing.Run() then begin // Email.RetrieveEmails() called this way to "catch" and recover // If email retrieval fails, the problem may be triggered by a specific email, so we attempt to recover by pushing the date of the emails retrieved so that we skip the problematic email @@ -163,11 +206,9 @@ codeunit 6385 "Outlook Processing" local procedure BuildDocumentsArray(var EmailInbox: Record "Email Inbox"; var DocumentsArray: JsonArray) var EmailMessage: Codeunit "Email Message"; - TempBlob: Codeunit "Temp Blob"; Attachment: JsonObject; TelemetryCustomDimensions: Dictionary of [Text, Text]; AttachmentsAdded, IgnoredBecauseExisting, AttachmentsLoaded : Integer; - EDocWithNoAttachmentName: Text; begin if not EmailInbox.FindSet() then exit; @@ -183,7 +224,6 @@ codeunit 6385 "Outlook Processing" repeat if not IgnoreMailAttachment(EmailMessage, EmailInbox."External Message Id", IgnoredBecauseExisting) then begin Clear(Attachment); - Clear(TempBlob); Attachment.Add('emailInboxId', EmailInbox.Id); Attachment.Add('messageid', EmailInbox."Message Id"); Attachment.Add('externalmessageid', EmailInbox."External Message Id"); @@ -198,11 +238,9 @@ codeunit 6385 "Outlook Processing" end; AttachmentsLoaded += 1; until EmailMessage.Attachments_Next() = 0; - EDocWithNoAttachmentName := NoSupportedAttachmentTxt; if AttachmentsAdded > GetMaxNoOfAttachmentsPerEmail() then begin Clear(DocumentsArray); AttachmentsAdded := 0; - EDocWithNoAttachmentName := StrSubstNo(TooManyAttachmentsTxt, GetMaxNoOfAttachmentsPerEmail()); end; Clear(TelemetryCustomDimensions); TelemetryCustomDimensions.Add('Category', FeatureName()); @@ -415,6 +453,16 @@ codeunit 6385 "Outlook Processing" #pragma warning restore AL0432 #endif + local procedure GetOutlookCategoryDescription(EDocumentService: Record "E-Document Service"): Text + var + EDocM365ConnEvents: Codeunit "E-Doc. M365 Conn. Events"; + CategoryDescription: Text; + begin + CategoryDescription := OutlookCategoryTxt; + EDocM365ConnEvents.OnGetOutlookCategoryDescription(EDocumentService, CategoryDescription); + exit(CategoryDescription); + end; + var TempEmailRetrievalFilters: Record "Email Retrieval Filters" temporary; RetrievedEmailInbox: Record "Email Inbox"; @@ -424,10 +472,9 @@ codeunit 6385 "Outlook Processing" MailMessageIdEmptyErr: Label 'Mail Message Id is empty on e-document %1.', Comment = '%1 - an integer'; InvalidAttachmentIdErr: Label 'Failed to determine id for attachment %1.', Comment = '%1 - a file name'; InvalidAttachmentReceivedDateTimeErr: Label 'Failed to determine received date time for attachment %1.', Comment = '%1 - a file name'; - NoSupportedAttachmentTxt: Label 'E-mail with no attachment of supported type.'; - TooManyAttachmentsTxt: Label 'E-mail with more than %1 attachments is ignored.', Comment = '%1 - an integer (10)'; RetrieveEmailsErr: Label 'Failed to retrieve emails from the email connector.'; ProcessingEmailTxt: label 'Processing email.', Locked = true; PageCountExceededTelemetryTxt: label 'PDF Attachment ignored because it exceeds page count of %1.', Locked = true; PageCountCallFailedTelemetryTxt: label 'Unable to calculate page count for PDF Attachment.', Locked = true; + OutlookCategoryTxt: Label 'Processed by Business Central'; } \ No newline at end of file diff --git a/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookSetup.Table.al b/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookSetup.Table.al index a650991227..89457c2476 100644 --- a/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookSetup.Table.al +++ b/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookSetup.Table.al @@ -73,6 +73,12 @@ table 6383 "Outlook Setup" ToolTip = 'Specifies whether the customer has given consent to the privacy notice.'; DataClassification = SystemMetadata; } + field(6; "Outlook Category Id"; Text[2048]) + { + Caption = 'Outlook Category'; + ToolTip = 'Specifies the Outlook category that will be set when an email has been processed by the connector.'; + DataClassification = CustomerContent; + } field(16; "Enabled At"; DateTime) { Caption = 'Enabled At'; diff --git a/Apps/W1/EDocumentConnectors/Microsoft365/test/app.json b/Apps/W1/EDocumentConnectors/Microsoft365/test/app.json index 0c463e021b..61eadafce8 100644 --- a/Apps/W1/EDocumentConnectors/Microsoft365/test/app.json +++ b/Apps/W1/EDocumentConnectors/Microsoft365/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148195, diff --git a/Apps/W1/EDocumentConnectors/Pagero/app/app.json b/Apps/W1/EDocumentConnectors/Pagero/app/app.json index 97d75e6565..8e5d354143 100644 --- a/Apps/W1/EDocumentConnectors/Pagero/app/app.json +++ b/Apps/W1/EDocumentConnectors/Pagero/app/app.json @@ -27,7 +27,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 6360, diff --git a/Apps/W1/EDocumentConnectors/Pagero/test/app.json b/Apps/W1/EDocumentConnectors/Pagero/test/app.json index a7f16cdb13..38dc062556 100644 --- a/Apps/W1/EDocumentConnectors/Pagero/test/app.json +++ b/Apps/W1/EDocumentConnectors/Pagero/test/app.json @@ -56,7 +56,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 148191, diff --git a/Apps/W1/EDocumentConnectors/SignUp/app/app.json b/Apps/W1/EDocumentConnectors/SignUp/app/app.json index f197ab89e3..3a45759fc8 100644 --- a/Apps/W1/EDocumentConnectors/SignUp/app/app.json +++ b/Apps/W1/EDocumentConnectors/SignUp/app/app.json @@ -27,7 +27,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 6440, diff --git a/Apps/W1/EDocumentConnectors/SignUp/test/app.json b/Apps/W1/EDocumentConnectors/SignUp/test/app.json index 4232e5e833..d373e4e97d 100644 --- a/Apps/W1/EDocumentConnectors/SignUp/test/app.json +++ b/Apps/W1/EDocumentConnectors/SignUp/test/app.json @@ -80,7 +80,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/ESGStatisticalAccountsDemoTool/app/app.json b/Apps/W1/ESGStatisticalAccountsDemoTool/app/app.json index 48d9ad0ac8..a99f3eb365 100644 --- a/Apps/W1/ESGStatisticalAccountsDemoTool/app/app.json +++ b/Apps/W1/ESGStatisticalAccountsDemoTool/app/app.json @@ -25,7 +25,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/EU3PartyTradePurchase/app/app.json b/Apps/W1/EU3PartyTradePurchase/app/app.json index 9f8d159518..3d49bd02ed 100644 --- a/Apps/W1/EU3PartyTradePurchase/app/app.json +++ b/Apps/W1/EU3PartyTradePurchase/app/app.json @@ -19,7 +19,7 @@ "publisher": "Microsoft" } ], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 4880, diff --git a/Apps/W1/EU3PartyTradePurchase/test/app.json b/Apps/W1/EU3PartyTradePurchase/test/app.json index 82799ba961..60ccdac7e7 100644 --- a/Apps/W1/EU3PartyTradePurchase/test/app.json +++ b/Apps/W1/EU3PartyTradePurchase/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2179727", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/Email - Current User Connector/app/app.json b/Apps/W1/Email - Current User Connector/app/app.json index a15c32b316..f7d8336266 100644 --- a/Apps/W1/Email - Current User Connector/app/app.json +++ b/Apps/W1/Email - Current User Connector/app/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 2, diff --git a/Apps/W1/Email - Current User Connector/test/app.json b/Apps/W1/Email - Current User Connector/test/app.json index c65dd5c9bf..710bab08b7 100644 --- a/Apps/W1/Email - Current User Connector/test/app.json +++ b/Apps/W1/Email - Current User Connector/test/app.json @@ -55,7 +55,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139750, diff --git a/Apps/W1/Email - Microsoft 365 Connector/app/app.json b/Apps/W1/Email - Microsoft 365 Connector/app/app.json index f484ad4745..3aecce9529 100644 --- a/Apps/W1/Email - Microsoft 365 Connector/app/app.json +++ b/Apps/W1/Email - Microsoft 365 Connector/app/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/Email - Microsoft 365 Connector/test/app.json b/Apps/W1/Email - Microsoft 365 Connector/test/app.json index 25f1a17f2c..c03ca6302c 100644 --- a/Apps/W1/Email - Microsoft 365 Connector/test/app.json +++ b/Apps/W1/Email - Microsoft 365 Connector/test/app.json @@ -61,7 +61,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139775, diff --git a/Apps/W1/Email - Outlook REST API/app/app.json b/Apps/W1/Email - Outlook REST API/app/app.json index ff1efc3400..be58510d17 100644 --- a/Apps/W1/Email - Outlook REST API/app/app.json +++ b/Apps/W1/Email - Outlook REST API/app/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/Email - Outlook REST API/test/app.json b/Apps/W1/Email - Outlook REST API/test/app.json index b77d0c56d5..f09d294b27 100644 --- a/Apps/W1/Email - Outlook REST API/test/app.json +++ b/Apps/W1/Email - Outlook REST API/test/app.json @@ -43,7 +43,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139752, diff --git a/Apps/W1/Email - SMTP API/app/app.json b/Apps/W1/Email - SMTP API/app/app.json index 9908a334ad..687a95cffb 100644 --- a/Apps/W1/Email - SMTP API/app/app.json +++ b/Apps/W1/Email - SMTP API/app/app.json @@ -31,7 +31,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 4611, diff --git a/Apps/W1/Email - SMTP API/test library/app.json b/Apps/W1/Email - SMTP API/test library/app.json index 46c92945cb..b0ca316937 100644 --- a/Apps/W1/Email - SMTP API/test library/app.json +++ b/Apps/W1/Email - SMTP API/test library/app.json @@ -19,7 +19,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 100000, diff --git a/Apps/W1/Email - SMTP API/test/app.json b/Apps/W1/Email - SMTP API/test/app.json index ef8171465d..fef64b033c 100644 --- a/Apps/W1/Email - SMTP API/test/app.json +++ b/Apps/W1/Email - SMTP API/test/app.json @@ -43,7 +43,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 100000, diff --git a/Apps/W1/Email - SMTP Connector/app/app.json b/Apps/W1/Email - SMTP Connector/app/app.json index 5c12899f7b..5126e2fee6 100644 --- a/Apps/W1/Email - SMTP Connector/app/app.json +++ b/Apps/W1/Email - SMTP Connector/app/app.json @@ -27,7 +27,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 4511, diff --git a/Apps/W1/Email - SMTP Connector/test/app.json b/Apps/W1/Email - SMTP Connector/test/app.json index 5f2b745af0..869477fe25 100644 --- a/Apps/W1/Email - SMTP Connector/test/app.json +++ b/Apps/W1/Email - SMTP Connector/test/app.json @@ -50,7 +50,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 100000, diff --git a/Apps/W1/EmailLogging/app/app.json b/Apps/W1/EmailLogging/app/app.json index 4966243ceb..f32e941581 100644 --- a/Apps/W1/EmailLogging/app/app.json +++ b/Apps/W1/EmailLogging/app/app.json @@ -19,7 +19,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/EmailLogging/test/app.json b/Apps/W1/EmailLogging/test/app.json index d42a4e5ded..5b25a13bf2 100644 --- a/Apps/W1/EmailLogging/test/app.json +++ b/Apps/W1/EmailLogging/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/W1/EnforcedDigitalVouchers/app/app.json b/Apps/W1/EnforcedDigitalVouchers/app/app.json index 838ba947f3..847f59711a 100644 --- a/Apps/W1/EnforcedDigitalVouchers/app/app.json +++ b/Apps/W1/EnforcedDigitalVouchers/app/app.json @@ -13,7 +13,7 @@ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2204541", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "internalsVisibleTo": [ { "id": "928f7b70-0dbd-431a-beb5-f45c4adbd361", diff --git a/Apps/W1/EnforcedDigitalVouchers/test library/app.json b/Apps/W1/EnforcedDigitalVouchers/test library/app.json index 6a10314064..ba0fba18da 100644 --- a/Apps/W1/EnforcedDigitalVouchers/test library/app.json +++ b/Apps/W1/EnforcedDigitalVouchers/test library/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139517, diff --git a/Apps/W1/EnforcedDigitalVouchers/test/app.json b/Apps/W1/EnforcedDigitalVouchers/test/app.json index 2d8ee2105f..4aea32cba3 100644 --- a/Apps/W1/EnforcedDigitalVouchers/test/app.json +++ b/Apps/W1/EnforcedDigitalVouchers/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?LinkId=724011", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/ExciseTaxes/app/app.json b/Apps/W1/ExciseTaxes/app/app.json index dfbd628bc5..be3999192a 100644 --- a/Apps/W1/ExciseTaxes/app/app.json +++ b/Apps/W1/ExciseTaxes/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/ExciseTaxes/test/app.json b/Apps/W1/ExciseTaxes/test/app.json index c6c0724c5f..9815fd9be3 100644 --- a/Apps/W1/ExciseTaxes/test/app.json +++ b/Apps/W1/ExciseTaxes/test/app.json @@ -45,7 +45,7 @@ ], "internalsVisibleTo": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/ExternalEvents/app/app.json b/Apps/W1/ExternalEvents/app/app.json index c3512b40d5..1b7931dbf8 100644 --- a/Apps/W1/ExternalEvents/app/app.json +++ b/Apps/W1/ExternalEvents/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 38500, diff --git a/Apps/W1/ExternalEvents/test/app.json b/Apps/W1/ExternalEvents/test/app.json index 370300ddfb..defc275794 100644 --- a/Apps/W1/ExternalEvents/test/app.json +++ b/Apps/W1/ExternalEvents/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/FieldServiceIntegration/app/app.json b/Apps/W1/FieldServiceIntegration/app/app.json index e29b94b035..abdaeeaeaa 100644 --- a/Apps/W1/FieldServiceIntegration/app/app.json +++ b/Apps/W1/FieldServiceIntegration/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 6610, diff --git a/Apps/W1/FieldServiceIntegration/test library/app.json b/Apps/W1/FieldServiceIntegration/test library/app.json index 00dedd39e9..8ab8d9f9ab 100644 --- a/Apps/W1/FieldServiceIntegration/test library/app.json +++ b/Apps/W1/FieldServiceIntegration/test library/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/W1/FieldServiceIntegration/test/app.json b/Apps/W1/FieldServiceIntegration/test/app.json index df90dd680c..6bc21414af 100644 --- a/Apps/W1/FieldServiceIntegration/test/app.json +++ b/Apps/W1/FieldServiceIntegration/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/W1/HybridAPI/app/app.json b/Apps/W1/HybridAPI/app/app.json index f96fec070e..2ace4ed240 100644 --- a/Apps/W1/HybridAPI/app/app.json +++ b/Apps/W1/HybridAPI/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/HybridBC/app/app.json b/Apps/W1/HybridBC/app/app.json index 3ab0b1b7c3..ddf5bc4eb7 100644 --- a/Apps/W1/HybridBC/app/app.json +++ b/Apps/W1/HybridBC/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/HybridBC/test/app.json b/Apps/W1/HybridBC/test/app.json index b2926c671a..be92fbf967 100644 --- a/Apps/W1/HybridBC/test/app.json +++ b/Apps/W1/HybridBC/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/W1/HybridBCLast/app/app.json b/Apps/W1/HybridBCLast/app/app.json index 0e1101bb81..b02c926fb9 100644 --- a/Apps/W1/HybridBCLast/app/app.json +++ b/Apps/W1/HybridBCLast/app/app.json @@ -27,7 +27,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/HybridBCLast/test/app.json b/Apps/W1/HybridBCLast/test/app.json index 0fd586690a..5dfa1f7e5a 100644 --- a/Apps/W1/HybridBCLast/test/app.json +++ b/Apps/W1/HybridBCLast/test/app.json @@ -50,7 +50,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/W1/HybridBaseDeployment/app/app.json b/Apps/W1/HybridBaseDeployment/app/app.json index 6d7208ff4d..bf123f7869 100644 --- a/Apps/W1/HybridBaseDeployment/app/app.json +++ b/Apps/W1/HybridBaseDeployment/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/HybridBaseDeployment/test/app.json b/Apps/W1/HybridBaseDeployment/test/app.json index 13317e7e87..21c0b39c38 100644 --- a/Apps/W1/HybridBaseDeployment/test/app.json +++ b/Apps/W1/HybridBaseDeployment/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/W1/HybridGP/app/app.json b/Apps/W1/HybridGP/app/app.json index 9c9bb12512..d61af48aed 100644 --- a/Apps/W1/HybridGP/app/app.json +++ b/Apps/W1/HybridGP/app/app.json @@ -39,7 +39,7 @@ "publisher": "Microsoft" } ], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/HybridGP/test/app.json b/Apps/W1/HybridGP/test/app.json index a0ed49397d..7c4dab9bf5 100644 --- a/Apps/W1/HybridGP/test/app.json +++ b/Apps/W1/HybridGP/test/app.json @@ -56,7 +56,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/W1/HybridSL/app/app.json b/Apps/W1/HybridSL/app/app.json index dd80f82cfa..1557a1a502 100644 --- a/Apps/W1/HybridSL/app/app.json +++ b/Apps/W1/HybridSL/app/app.json @@ -12,7 +12,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "internalsVisibleTo": [ { diff --git a/Apps/W1/HybridSL/test/app.json b/Apps/W1/HybridSL/test/app.json index edd6af6437..a73cb1d03b 100644 --- a/Apps/W1/HybridSL/test/app.json +++ b/Apps/W1/HybridSL/test/app.json @@ -36,7 +36,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/INTaxEngine/app/TaxEngine-Core/app.json b/Apps/W1/INTaxEngine/app/TaxEngine-Core/app.json index 71e9437721..6ad2c44a93 100644 --- a/Apps/W1/INTaxEngine/app/TaxEngine-Core/app.json +++ b/Apps/W1/INTaxEngine/app/TaxEngine-Core/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "screenshots": [], "idRanges": [ { diff --git a/Apps/W1/INTaxEngine/app/TaxEngine-JsonExchange/app.json b/Apps/W1/INTaxEngine/app/TaxEngine-JsonExchange/app.json index 3a60053734..6c2c5f9390 100644 --- a/Apps/W1/INTaxEngine/app/TaxEngine-JsonExchange/app.json +++ b/Apps/W1/INTaxEngine/app/TaxEngine-JsonExchange/app.json @@ -51,7 +51,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 20360, diff --git a/Apps/W1/INTaxEngine/app/TaxEngine-PostingHandler/app.json b/Apps/W1/INTaxEngine/app/TaxEngine-PostingHandler/app.json index a7a55ad5f5..dc6a3fca1b 100644 --- a/Apps/W1/INTaxEngine/app/TaxEngine-PostingHandler/app.json +++ b/Apps/W1/INTaxEngine/app/TaxEngine-PostingHandler/app.json @@ -45,7 +45,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 20334, diff --git a/Apps/W1/INTaxEngine/app/TaxEngine-ScriptHandler/app.json b/Apps/W1/INTaxEngine/app/TaxEngine-ScriptHandler/app.json index 23d3127ac6..663c5acc85 100644 --- a/Apps/W1/INTaxEngine/app/TaxEngine-ScriptHandler/app.json +++ b/Apps/W1/INTaxEngine/app/TaxEngine-ScriptHandler/app.json @@ -32,7 +32,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 20156, diff --git a/Apps/W1/INTaxEngine/app/TaxEngine-TaxTypeHandler/app.json b/Apps/W1/INTaxEngine/app/TaxEngine-TaxTypeHandler/app.json index b461d4f4f3..a503c23203 100644 --- a/Apps/W1/INTaxEngine/app/TaxEngine-TaxTypeHandler/app.json +++ b/Apps/W1/INTaxEngine/app/TaxEngine-TaxTypeHandler/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "dependencies": [ { "id": "52cd6cb4-0433-4e94-8e62-9d12fff1a02b", diff --git a/Apps/W1/INTaxEngine/app/TaxEngine-UseCaseBuilder/app.json b/Apps/W1/INTaxEngine/app/TaxEngine-UseCaseBuilder/app.json index 7d98562b91..5d043835f1 100644 --- a/Apps/W1/INTaxEngine/app/TaxEngine-UseCaseBuilder/app.json +++ b/Apps/W1/INTaxEngine/app/TaxEngine-UseCaseBuilder/app.json @@ -44,7 +44,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 20283, diff --git a/Apps/W1/INTaxEngine/app/app.json b/Apps/W1/INTaxEngine/app/app.json index fcb3a05aa2..b6cd68806c 100644 --- a/Apps/W1/INTaxEngine/app/app.json +++ b/Apps/W1/INTaxEngine/app/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "screenshots": [], "idRanges": [ { diff --git a/Apps/W1/INTaxEngine/test/TaxEngine-Core/app.json b/Apps/W1/INTaxEngine/test/TaxEngine-Core/app.json index ae984a242a..dd8b3fcb37 100644 --- a/Apps/W1/INTaxEngine/test/TaxEngine-Core/app.json +++ b/Apps/W1/INTaxEngine/test/TaxEngine-Core/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?linkid=2139719", "logo": "ExtensionLogo.png", "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "dependencies": [ { "name": "Tax Engine", diff --git a/Apps/W1/INTaxEngine/test/TaxEngine-JsonExchange/app.json b/Apps/W1/INTaxEngine/test/TaxEngine-JsonExchange/app.json index a4391874dc..fc4f7a8f54 100644 --- a/Apps/W1/INTaxEngine/test/TaxEngine-JsonExchange/app.json +++ b/Apps/W1/INTaxEngine/test/TaxEngine-JsonExchange/app.json @@ -26,7 +26,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 137700, diff --git a/Apps/W1/INTaxEngine/test/TaxEngine-PostingHandler/app.json b/Apps/W1/INTaxEngine/test/TaxEngine-PostingHandler/app.json index bb217515e2..03ba3689dd 100644 --- a/Apps/W1/INTaxEngine/test/TaxEngine-PostingHandler/app.json +++ b/Apps/W1/INTaxEngine/test/TaxEngine-PostingHandler/app.json @@ -38,7 +38,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 137551, diff --git a/Apps/W1/INTaxEngine/test/TaxEngine-ScriptHandler/app.json b/Apps/W1/INTaxEngine/test/TaxEngine-ScriptHandler/app.json index 22d450b743..9ec63a0c08 100644 --- a/Apps/W1/INTaxEngine/test/TaxEngine-ScriptHandler/app.json +++ b/Apps/W1/INTaxEngine/test/TaxEngine-ScriptHandler/app.json @@ -38,7 +38,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 136751, diff --git a/Apps/W1/INTaxEngine/test/TaxEngine-TaxTypeHandler/app.json b/Apps/W1/INTaxEngine/test/TaxEngine-TaxTypeHandler/app.json index fea1517af3..47cb4bd23a 100644 --- a/Apps/W1/INTaxEngine/test/TaxEngine-TaxTypeHandler/app.json +++ b/Apps/W1/INTaxEngine/test/TaxEngine-TaxTypeHandler/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?linkid=2139719", "logo": "ExtensionLogo.png", "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "dependencies": [ { "name": "Tax Engine", diff --git a/Apps/W1/INTaxEngine/test/TaxEngine-UseCaseBuilder/app.json b/Apps/W1/INTaxEngine/test/TaxEngine-UseCaseBuilder/app.json index 61171df0c5..0a2dbb48ac 100644 --- a/Apps/W1/INTaxEngine/test/TaxEngine-UseCaseBuilder/app.json +++ b/Apps/W1/INTaxEngine/test/TaxEngine-UseCaseBuilder/app.json @@ -38,7 +38,7 @@ ], "screenshots": [], "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 136851, diff --git a/Apps/W1/INTaxEngine/test/app.json b/Apps/W1/INTaxEngine/test/app.json index ba10d33063..10210b3e16 100644 --- a/Apps/W1/INTaxEngine/test/app.json +++ b/Apps/W1/INTaxEngine/test/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?linkid=2139719", "logo": "ExtensionLogo.png", "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "dependencies": [ { "id": "c1eafb3f-e397-468e-bdb4-ecc5c317ca00", diff --git a/Apps/W1/ImageAnalysis/app/app.json b/Apps/W1/ImageAnalysis/app/app.json index 5dd7fc07f3..0aa5034993 100644 --- a/Apps/W1/ImageAnalysis/app/app.json +++ b/Apps/W1/ImageAnalysis/app/app.json @@ -13,7 +13,7 @@ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=850308", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/ImageAnalysis/test/app.json b/Apps/W1/ImageAnalysis/test/app.json index 0f2960bbd4..1c4a8b3898 100644 --- a/Apps/W1/ImageAnalysis/test/app.json +++ b/Apps/W1/ImageAnalysis/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/W1/Intrastat/app/app.json b/Apps/W1/Intrastat/app/app.json index d3b3c68b62..ba4cb552ac 100644 --- a/Apps/W1/Intrastat/app/app.json +++ b/Apps/W1/Intrastat/app/app.json @@ -13,7 +13,7 @@ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2283605", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 4810, diff --git a/Apps/W1/Intrastat/demo data/app.json b/Apps/W1/Intrastat/demo data/app.json index 403b228ea6..36b668d016 100644 --- a/Apps/W1/Intrastat/demo data/app.json +++ b/Apps/W1/Intrastat/demo data/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 4844, diff --git a/Apps/W1/Intrastat/test/app.json b/Apps/W1/Intrastat/test/app.json index 95f7abecdf..2d00966b6e 100644 --- a/Apps/W1/Intrastat/test/app.json +++ b/Apps/W1/Intrastat/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2179727", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/LatePaymentPredictor/app/app.json b/Apps/W1/LatePaymentPredictor/app/app.json index 082d93d3f3..c8c26a8b6a 100644 --- a/Apps/W1/LatePaymentPredictor/app/app.json +++ b/Apps/W1/LatePaymentPredictor/app/app.json @@ -13,7 +13,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2206446", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/LatePaymentPredictor/test/app.json b/Apps/W1/LatePaymentPredictor/test/app.json index 7a37776503..4f3f08a5d2 100644 --- a/Apps/W1/LatePaymentPredictor/test/app.json +++ b/Apps/W1/LatePaymentPredictor/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/W1/LibraryNoTransactions/app/app.json b/Apps/W1/LibraryNoTransactions/app/app.json index 20b68b859e..0c78c35984 100644 --- a/Apps/W1/LibraryNoTransactions/app/app.json +++ b/Apps/W1/LibraryNoTransactions/app/app.json @@ -5,7 +5,7 @@ "description": "This app is used for testing that the transactions are not executed. If any transaction is detected with this extension published we will throw an error.", "publisher": "Microsoft", "version": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009", "EULA": "https://go.microsoft.com/fwlink/?linkid=2182906", "help": "https://go.microsoft.com/fwlink/?linkid=2206178", diff --git a/Apps/W1/MSWalletPayments/app/app.json b/Apps/W1/MSWalletPayments/app/app.json index 82059c1650..d9b757e6c6 100644 --- a/Apps/W1/MSWalletPayments/app/app.json +++ b/Apps/W1/MSWalletPayments/app/app.json @@ -13,7 +13,7 @@ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=857276", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/Manufacturing/app/app.json b/Apps/W1/Manufacturing/app/app.json index fc866c5129..082f546560 100644 --- a/Apps/W1/Manufacturing/app/app.json +++ b/Apps/W1/Manufacturing/app/app.json @@ -14,7 +14,7 @@ "screenshots": [], "logo": "ExtensionLogo.png", "internalsVisibleTo": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/Manufacturing/test/app.json b/Apps/W1/Manufacturing/test/app.json index fc9459e70d..8ad36390b0 100644 --- a/Apps/W1/Manufacturing/test/app.json +++ b/Apps/W1/Manufacturing/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2104024", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/MasterDataManagement/app/app.json b/Apps/W1/MasterDataManagement/app/app.json index 7fbc86db4f..1b3f738592 100644 --- a/Apps/W1/MasterDataManagement/app/app.json +++ b/Apps/W1/MasterDataManagement/app/app.json @@ -19,7 +19,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/MasterDataManagement/test library/app.json b/Apps/W1/MasterDataManagement/test library/app.json index 83990e63c9..e385205f59 100644 --- a/Apps/W1/MasterDataManagement/test library/app.json +++ b/Apps/W1/MasterDataManagement/test library/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/W1/MasterDataManagement/test/app.json b/Apps/W1/MasterDataManagement/test/app.json index 9816778d20..60e46b1395 100644 --- a/Apps/W1/MasterDataManagement/test/app.json +++ b/Apps/W1/MasterDataManagement/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "resourceExposurePolicy": { "allowDebugging": false, diff --git a/Apps/W1/MicrosoftUniversalPrint/app/app.json b/Apps/W1/MicrosoftUniversalPrint/app/app.json index 681bf47462..2f7696f8f3 100644 --- a/Apps/W1/MicrosoftUniversalPrint/app/app.json +++ b/Apps/W1/MicrosoftUniversalPrint/app/app.json @@ -11,7 +11,7 @@ "url": "https://go.microsoft.com/fwlink/?linkid=724011", "logo": "ExtensionLogo.png", "application": "29.0.0.0", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "screenshots": [], "target": "OnPrem", "idRanges": [ diff --git a/Apps/W1/OnPrem Permissions/app/app.json b/Apps/W1/OnPrem Permissions/app/app.json index e3806bfaec..798012e9fe 100644 --- a/Apps/W1/OnPrem Permissions/app/app.json +++ b/Apps/W1/OnPrem Permissions/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/W1/OnPrem Permissions/test/app.json b/Apps/W1/OnPrem Permissions/test/app.json index 77c0686ca6..27035ac3c3 100644 --- a/Apps/W1/OnPrem Permissions/test/app.json +++ b/Apps/W1/OnPrem Permissions/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/W1/OnboardingSignals/app/app.json b/Apps/W1/OnboardingSignals/app/app.json index c826ed84aa..ead3a332f2 100644 --- a/Apps/W1/OnboardingSignals/app/app.json +++ b/Apps/W1/OnboardingSignals/app/app.json @@ -20,7 +20,7 @@ "publisher": "Microsoft" } ], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/OnboardingSignals/test/app.json b/Apps/W1/OnboardingSignals/test/app.json index 5f0c600b98..c16ba964d1 100644 --- a/Apps/W1/OnboardingSignals/test/app.json +++ b/Apps/W1/OnboardingSignals/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/PayPalPaymentsStandard/app/app.json b/Apps/W1/PayPalPaymentsStandard/app/app.json index 2f82d5f78c..884c2ea174 100644 --- a/Apps/W1/PayPalPaymentsStandard/app/app.json +++ b/Apps/W1/PayPalPaymentsStandard/app/app.json @@ -13,7 +13,7 @@ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?LinkId=733363", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/PayPalPaymentsStandard/test/app.json b/Apps/W1/PayPalPaymentsStandard/test/app.json index 374d17e76c..a95d043e44 100644 --- a/Apps/W1/PayPalPaymentsStandard/test/app.json +++ b/Apps/W1/PayPalPaymentsStandard/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/W1/PlanConfiguration/app/app.json b/Apps/W1/PlanConfiguration/app/app.json index bcf8b633a8..43fd6a7f92 100644 --- a/Apps/W1/PlanConfiguration/app/app.json +++ b/Apps/W1/PlanConfiguration/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/PlanConfiguration/test/app.json b/Apps/W1/PlanConfiguration/test/app.json index 9345903c16..6dacb65d68 100644 --- a/Apps/W1/PlanConfiguration/test/app.json +++ b/Apps/W1/PlanConfiguration/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/QBMigration/app/app.json b/Apps/W1/QBMigration/app/app.json index 067a0bd6d4..cc7c242c9c 100644 --- a/Apps/W1/QBMigration/app/app.json +++ b/Apps/W1/QBMigration/app/app.json @@ -20,7 +20,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/QBMigration/test/app.json b/Apps/W1/QBMigration/test/app.json index df256694ba..0caa07b244 100644 --- a/Apps/W1/QBMigration/test/app.json +++ b/Apps/W1/QBMigration/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/W1/QuickbooksPayrollFileImport/app/app.json b/Apps/W1/QuickbooksPayrollFileImport/app/app.json index c809d76846..2618c84d08 100644 --- a/Apps/W1/QuickbooksPayrollFileImport/app/app.json +++ b/Apps/W1/QuickbooksPayrollFileImport/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/QuickbooksPayrollFileImport/test/app.json b/Apps/W1/QuickbooksPayrollFileImport/test/app.json index 2107634e2e..92a0668df5 100644 --- a/Apps/W1/QuickbooksPayrollFileImport/test/app.json +++ b/Apps/W1/QuickbooksPayrollFileImport/test/app.json @@ -26,7 +26,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/W1/RecommendedApps/app/app.json b/Apps/W1/RecommendedApps/app/app.json index fcccbe2b11..c129df5e21 100644 --- a/Apps/W1/RecommendedApps/app/app.json +++ b/Apps/W1/RecommendedApps/app/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2173058", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/RecommendedApps/test/app.json b/Apps/W1/RecommendedApps/test/app.json index 640acb223c..28a70c9257 100644 --- a/Apps/W1/RecommendedApps/test/app.json +++ b/Apps/W1/RecommendedApps/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2135559", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/ReportLayouts/app/app.json b/Apps/W1/ReportLayouts/app/app.json index 36682a1fa2..a5e3cdcf4f 100644 --- a/Apps/W1/ReportLayouts/app/app.json +++ b/Apps/W1/ReportLayouts/app/app.json @@ -19,7 +19,7 @@ "allowDownloadingSource": true, "includeSourceInSymbolFile": true }, - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/ReportLayouts/test/app.json b/Apps/W1/ReportLayouts/test/app.json index d12e1ad995..118083101e 100644 --- a/Apps/W1/ReportLayouts/test/app.json +++ b/Apps/W1/ReportLayouts/test/app.json @@ -10,7 +10,7 @@ "EULA": "https://go.microsoft.com", "url": "https://go.microsoft.com", "contextSensitiveHelpUrl": "https://go.microsoft.com", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/W1/ReviewGLEntries/app/app.json b/Apps/W1/ReviewGLEntries/app/app.json index e5256a5f97..3863931843 100644 --- a/Apps/W1/ReviewGLEntries/app/app.json +++ b/Apps/W1/ReviewGLEntries/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/W1/ReviewGLEntries/test/app.json b/Apps/W1/ReviewGLEntries/test/app.json index 8f9ab1dd03..821126ccc7 100644 --- a/Apps/W1/ReviewGLEntries/test/app.json +++ b/Apps/W1/ReviewGLEntries/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/W1/SAF-T/app/app.json b/Apps/W1/SAF-T/app/app.json index 8ba5ed7038..b203deeec9 100644 --- a/Apps/W1/SAF-T/app/app.json +++ b/Apps/W1/SAF-T/app/app.json @@ -27,7 +27,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/SAF-T/test/app.json b/Apps/W1/SAF-T/test/app.json index e750e03753..2f600630d2 100644 --- a/Apps/W1/SAF-T/test/app.json +++ b/Apps/W1/SAF-T/test/app.json @@ -44,7 +44,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/SalesAndInventoryForecast/app/app.json b/Apps/W1/SalesAndInventoryForecast/app/app.json index e16c81b3dd..d3f5678976 100644 --- a/Apps/W1/SalesAndInventoryForecast/app/app.json +++ b/Apps/W1/SalesAndInventoryForecast/app/app.json @@ -13,7 +13,7 @@ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2189535", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/SalesAndInventoryForecast/test/app.json b/Apps/W1/SalesAndInventoryForecast/test/app.json index 358e1b1616..d6a4705ec7 100644 --- a/Apps/W1/SalesAndInventoryForecast/test/app.json +++ b/Apps/W1/SalesAndInventoryForecast/test/app.json @@ -32,7 +32,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Apps/W1/SalesLinesSuggestions/app/app.json b/Apps/W1/SalesLinesSuggestions/app/app.json index 0040b21b7e..b892ef1421 100644 --- a/Apps/W1/SalesLinesSuggestions/app/app.json +++ b/Apps/W1/SalesLinesSuggestions/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "target": "OnPrem", "idRanges": [ diff --git a/Apps/W1/SalesLinesSuggestions/test/app.json b/Apps/W1/SalesLinesSuggestions/test/app.json index 0a6f720a08..6e1b20e7f2 100644 --- a/Apps/W1/SalesLinesSuggestions/test/app.json +++ b/Apps/W1/SalesLinesSuggestions/test/app.json @@ -43,7 +43,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/SalesOrderAgent/app/app.json b/Apps/W1/SalesOrderAgent/app/app.json index 393141c9a8..7acbfce189 100644 --- a/Apps/W1/SalesOrderAgent/app/app.json +++ b/Apps/W1/SalesOrderAgent/app/app.json @@ -12,7 +12,7 @@ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=868966", "logo": "ExtensionLogo.png", "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "target": "OnPrem", "idRanges": [ diff --git a/Apps/W1/ServiceDeclaration/app/app.json b/Apps/W1/ServiceDeclaration/app/app.json index 80c0d8886a..6286514c40 100644 --- a/Apps/W1/ServiceDeclaration/app/app.json +++ b/Apps/W1/ServiceDeclaration/app/app.json @@ -13,7 +13,7 @@ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2204541", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 5010, diff --git a/Apps/W1/ServiceDeclaration/test/app.json b/Apps/W1/ServiceDeclaration/test/app.json index ae5b7396cc..fad4bb5391 100644 --- a/Apps/W1/ServiceDeclaration/test/app.json +++ b/Apps/W1/ServiceDeclaration/test/app.json @@ -10,7 +10,7 @@ "help": "https://learn.microsoft.com/en-us/dynamics365/business-central/finance-how-setup-use-service-declaration", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/ServiceManagement/app/app.json b/Apps/W1/ServiceManagement/app/app.json index e8be722b00..e29ea5ccf4 100644 --- a/Apps/W1/ServiceManagement/app/app.json +++ b/Apps/W1/ServiceManagement/app/app.json @@ -14,7 +14,7 @@ "screenshots": [], "logo": "ExtensionLogo.png", "internalsVisibleTo": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/ServiceManagement/test/app.json b/Apps/W1/ServiceManagement/test/app.json index 9645018b5c..38bb0d58fa 100644 --- a/Apps/W1/ServiceManagement/test/app.json +++ b/Apps/W1/ServiceManagement/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2104024", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/SmartList/app/app.json b/Apps/W1/SmartList/app/app.json index f24801c45a..162db8cd52 100644 --- a/Apps/W1/SmartList/app/app.json +++ b/Apps/W1/SmartList/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "target": "Cloud", "resourceExposurePolicy": { "allowDebugging": true, diff --git a/Apps/W1/StatisticalAccounts/app/app.json b/Apps/W1/StatisticalAccounts/app/app.json index 79efc650c2..05e8859674 100644 --- a/Apps/W1/StatisticalAccounts/app/app.json +++ b/Apps/W1/StatisticalAccounts/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/StatisticalAccounts/app/src/StatisticalAccJournalBatch.Page.al b/Apps/W1/StatisticalAccounts/app/src/StatisticalAccJournalBatch.Page.al index 84c10c09ec..bb9d55cf94 100644 --- a/Apps/W1/StatisticalAccounts/app/src/StatisticalAccJournalBatch.Page.al +++ b/Apps/W1/StatisticalAccounts/app/src/StatisticalAccJournalBatch.Page.al @@ -38,8 +38,8 @@ page 2630 "Statistical Acc. Journal Batch" } field("No. of Lines"; Rec."No. of Lines") { + ApplicationArea = Basic, Suite; Visible = false; - ApplicationArea = All; trigger OnDrillDown() begin OpenWorksheet(); diff --git a/Apps/W1/StatisticalAccounts/test/app.json b/Apps/W1/StatisticalAccounts/test/app.json index d0e96b0a5d..a902755b10 100644 --- a/Apps/W1/StatisticalAccounts/test/app.json +++ b/Apps/W1/StatisticalAccounts/test/app.json @@ -53,7 +53,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "resourceExposurePolicy": { "allowDebugging": false, "allowDownloadingSource": true, diff --git a/Apps/W1/Sustainability/app/app.json b/Apps/W1/Sustainability/app/app.json index 08bb1d68de..bdf24e2d05 100644 --- a/Apps/W1/Sustainability/app/app.json +++ b/Apps/W1/Sustainability/app/app.json @@ -33,7 +33,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/Sustainability/test/app.json b/Apps/W1/Sustainability/test/app.json index 87d3802243..6d9b902726 100644 --- a/Apps/W1/Sustainability/test/app.json +++ b/Apps/W1/Sustainability/test/app.json @@ -51,7 +51,7 @@ ], "internalsVisibleTo": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/SustainabilityContosoCoffeeDemoDataset/app/app.json b/Apps/W1/SustainabilityContosoCoffeeDemoDataset/app/app.json index a90035e573..454294b363 100644 --- a/Apps/W1/SustainabilityContosoCoffeeDemoDataset/app/app.json +++ b/Apps/W1/SustainabilityContosoCoffeeDemoDataset/app/app.json @@ -38,7 +38,7 @@ ], "internalsVisibleTo": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/SustainabilityCopilotSuggestion/app/app.json b/Apps/W1/SustainabilityCopilotSuggestion/app/app.json index 1972376432..5cd5f69428 100644 --- a/Apps/W1/SustainabilityCopilotSuggestion/app/app.json +++ b/Apps/W1/SustainabilityCopilotSuggestion/app/app.json @@ -19,7 +19,7 @@ "version": "29.0.0.0" } ], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "target": "OnPrem", "idRanges": [ diff --git a/Apps/W1/SustainabilityCopilotSuggestion/test/app.json b/Apps/W1/SustainabilityCopilotSuggestion/test/app.json index 73395861ca..c73225b1ca 100644 --- a/Apps/W1/SustainabilityCopilotSuggestion/test/app.json +++ b/Apps/W1/SustainabilityCopilotSuggestion/test/app.json @@ -63,7 +63,7 @@ ], "internalsVisibleTo": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139793, diff --git a/Apps/W1/SyncBase/app/app.json b/Apps/W1/SyncBase/app/app.json index 4ca724468a..df1258043c 100644 --- a/Apps/W1/SyncBase/app/app.json +++ b/Apps/W1/SyncBase/app/app.json @@ -13,7 +13,7 @@ "logo": "ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/VATGroupManagement/app/app.json b/Apps/W1/VATGroupManagement/app/app.json index 21abe626f0..6db9a9fda3 100644 --- a/Apps/W1/VATGroupManagement/app/app.json +++ b/Apps/W1/VATGroupManagement/app/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2194309", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/VATGroupManagement/test/app.json b/Apps/W1/VATGroupManagement/test/app.json index cd137f9ab8..3c2564a34f 100644 --- a/Apps/W1/VATGroupManagement/test/app.json +++ b/Apps/W1/VATGroupManagement/test/app.json @@ -10,7 +10,7 @@ "help": "https://go.microsoft.com/fwlink/?linkid=2135559", "url": "https://go.microsoft.com/fwlink/?LinkId=724011", "logo": "ExtensionLogo.png", - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "dependencies": [ { diff --git a/Apps/W1/WithholdingTax/Test/app.json b/Apps/W1/WithholdingTax/Test/app.json index 4481a2d8da..0813ca1419 100644 --- a/Apps/W1/WithholdingTax/Test/app.json +++ b/Apps/W1/WithholdingTax/Test/app.json @@ -33,7 +33,7 @@ ], "internalsVisibleTo": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsI.Codeunit.al b/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsI.Codeunit.al index 71e7847dc1..e853be9d35 100644 --- a/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsI.Codeunit.al +++ b/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsI.Codeunit.al @@ -1781,6 +1781,58 @@ codeunit 148321 "ERM Withholding Tax Tests I" Assert.AreEqual(VATEntry.Base, WHTEntry."Unrealized Base", 'Not equal'); end; + [Test] + [HandlerFunctions('ConfirmHandler')] + procedure VerifyExternalDocumentNoAndBaseAmountOnWithholdingTaxEntry() + var + WithholdingTaxPostingSetup: Record "Withholding Tax Posting Setup"; + VATPostingSetup: Record "VAT Posting Setup"; + PurchaseHeader: Record "Purchase Header"; + PurchaseLine: array[2] of Record "Purchase Line"; + WHTEntry: Record "Withholding Tax Entry"; + GeneralPostingSetup: Record "General Posting Setup"; + VendorNo: Code[20]; + GLAccountNo: Code[20]; + PostedDocumentNo: Code[20]; + UnrealizedBase: Decimal; + begin + // [SCENARIO 285194] - Test to verify after Posting Purchase Invoice with WHT, WHT Entry - External Document No. is populated with Vendor Invoice No. and Unrealized Base is correctly calculated. + Initialize(); + + // [GIVEN] WHT Posting Setup has been created. + UpdateGeneralLedgerSetup(true, false); // Round Amount for WHT Calc and True as Enable WHT. + LibraryERM.FindZeroVATPostingSetup(VATPostingSetup, VATPostingSetup."VAT Calculation Type"::"Normal VAT"); + LibraryWithholdingTax.CreateWHTPostingSetupWithPayableGLAccounts(WithholdingTaxPostingSetup); + LibraryERM.CreateGeneralPostingSetupInvt(GeneralPostingSetup); + + // [GIVEN] Create Vendor and GL Account with Posting Setup. + VendorNo := CreateVendorNoWithoutABN(VATPostingSetup."VAT Bus. Posting Group", GeneralPostingSetup."Gen. Bus. Posting Group", WithholdingTaxPostingSetup."Wthldg. Tax Bus. Post. Group"); + GLAccountNo := CreateGLAccountWithPostingSetup(VATPostingSetup."VAT Prod. Posting Group", GeneralPostingSetup."Gen. Prod. Posting Group", WithholdingTaxPostingSetup."Wthldg. Tax Prod. Post. Group"); + + // [GIVEN] Create Purchase Invoice with two lines with WHT and WHT Absorb Base + LibraryPurchase.CreatePurchHeader(PurchaseHeader, PurchaseHeader."Document Type"::Invoice, VendorNo); + PurchaseHeader.Validate("Vendor Invoice No.", LibraryRandom.RandText(30)); + PurchaseHeader.Modify(); + LibraryPurchase.CreatePurchaseLine(PurchaseLine[1], PurchaseHeader, PurchaseLine[1].Type::"G/L Account", GLAccountNo, 1); + LibraryPurchase.CreatePurchaseLine(PurchaseLine[2], PurchaseHeader, PurchaseLine[2].Type::"G/L Account", GLAccountNo, 10); + PurchaseLine[2].Validate("Withholding Tax Absorb Base", 600); + PurchaseLine[2].Modify(); + + // [WHEN] Post Purchase Invoice. + PostedDocumentNo := LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true); + + // [THEN] Verify WHT Entry - External Document No. is populated with Vendor Invoice No. and Unrealized Base is correctly calculated. + WHTEntry.SetRange("Document No.", PostedDocumentNo); + Assert.RecordCount(WHTEntry, 1); + WHTEntry.FindFirst(); + UnrealizedBase := PurchaseLine[1].Amount + PurchaseLine[2]."Withholding Tax Absorb Base"; + Assert.AreNearlyEqual( + UnrealizedBase, WHTEntry."Unrealized Base", LibraryERM.GetAmountRoundingPrecision(), + StrSubstNo(AmountErr, WHTEntry.FieldCaption("Unrealized Base"), UnrealizedBase)); + Assert.AreEqual(PurchaseHeader."Vendor Invoice No.", WHTEntry."External Document No.", WHTEntry.FieldCaption("External Document No.")); + Assert.AreEqual(PurchaseHeader."Pay-to Country/Region Code", WHTEntry."Country/Region Code", WHTEntry.FieldCaption("Country/Region Code")); + end; + [Test] [HandlerFunctions('UnapplyVendorEntriesPageHandler,ConfirmHandler,MessageHandler')] [Scope('OnPrem')] diff --git a/Apps/W1/WithholdingTax/app/app.json b/Apps/W1/WithholdingTax/app/app.json index 10221585d0..77034d3074 100644 --- a/Apps/W1/WithholdingTax/app/app.json +++ b/Apps/W1/WithholdingTax/app/app.json @@ -13,7 +13,7 @@ "logo": "./ExtensionLogo.png", "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ { diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/History/WHTPurchCrMemoHdr.TableExt.al b/Apps/W1/WithholdingTax/app/src/Purchase/History/WHTPurchCrMemoHdr.TableExt.al index 0de6790aa6..674801d9f6 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/History/WHTPurchCrMemoHdr.TableExt.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/History/WHTPurchCrMemoHdr.TableExt.al @@ -50,6 +50,11 @@ tableextension 6799 "WHT Purch. Cr. Memo Hdr." extends "Purch. Cr. Memo Hdr." { Caption = 'Actual Vendor No.'; DataClassification = CustomerContent; +#if not CLEAN29 + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + ObsoleteReason = 'This field has been removed and is no longer required.'; +#endif } field(6794; "WHT Printed Tax Document"; Boolean) { diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/History/WHTPurchInvoiceSubform.PageExt.al b/Apps/W1/WithholdingTax/app/src/Purchase/History/WHTPurchInvoiceSubform.PageExt.al index b4ebd28cee..e429e52e09 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/History/WHTPurchInvoiceSubform.PageExt.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/History/WHTPurchInvoiceSubform.PageExt.al @@ -22,7 +22,7 @@ pageextension 6789 "WHT Purch. Invoice Subform" extends "Purch. Invoice Subform" { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the Withholding Tax Product Posting Group is assigned from the Product Entity selected in Purchase Line.'; - Visible = false; + Visible = true; } } addafter("Line Amount") diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingPurchInvHeader.TableExt.al b/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingPurchInvHeader.TableExt.al index e0e6adf76b..2c61f324de 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingPurchInvHeader.TableExt.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingPurchInvHeader.TableExt.al @@ -50,6 +50,11 @@ tableextension 6798 "Withholding Purch. Inv. Header" extends "Purch. Inv. Header { Caption = 'Actual Vendor No.'; DataClassification = CustomerContent; +#if not CLEAN29 + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + ObsoleteReason = 'This field has been removed and is no longer required.'; +#endif } field(6794; "WHT Printed Tax Document"; Boolean) { diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingTaxEntries.Page.al b/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingTaxEntries.Page.al index 01eb24a579..0a7c031b59 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingTaxEntries.Page.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingTaxEntries.Page.al @@ -213,11 +213,17 @@ page 6788 "Withholding Tax Entries" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the Document Date from the applied Withholding Tax Entry is stored for applying the Withholding Tax Entry table.'; } +#if not CLEAN29 field("Actual Vendor No."; Rec."Actual Vendor No.") { ApplicationArea = Basic, Suite; + Visible = false; ToolTip = 'Specifies the Actual Vendor No. from which Invoices or Journals is copied.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + ObsoleteReason = 'This field has been removed and is no longer required.'; } +#endif field("Withholding Certificate No."; Rec."Wthldg. Tax Certificate No.") { ApplicationArea = Basic, Suite; diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingTaxEntry.Table.al b/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingTaxEntry.Table.al index f3bcffd83e..ba6e07d47b 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingTaxEntry.Table.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/History/WithholdingTaxEntry.Table.al @@ -267,6 +267,12 @@ table 6788 "Withholding Tax Entry" field(44; "Actual Vendor No."; Code[20]) { Caption = 'Actual Vendor No.'; + DataClassification = CustomerContent; +#if not CLEAN29 + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + ObsoleteReason = 'This field has been removed and is no longer required.'; +#endif } field(45; "Wthldg. Tax Certificate No."; Code[20]) { diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTCertificateCreditabletax.Report.al b/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTCertificateCreditabletax.Report.al index 5df138f266..364fa703bc 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTCertificateCreditabletax.Report.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTCertificateCreditabletax.Report.al @@ -207,11 +207,7 @@ report 6786 "WHT Certificate Creditable tax" SecondMonth := 0; ThirdMonth := 0; - if "Actual Vendor No." <> '' then - Vend.Get("Actual Vendor No.") - else - Vend.Get("Bill-to/Pay-to No."); - + Vend.Get("Bill-to/Pay-to No."); VendName := Vend.Name; VendTIN := Vend."VAT Registration No."; VendAddress := Vend.Address; diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchCrMemo.Report.al b/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchCrMemo.Report.al new file mode 100644 index 0000000000..d824c6c4db --- /dev/null +++ b/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchCrMemo.Report.al @@ -0,0 +1,895 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.WithholdingTax; + +using Microsoft.CRM.Interaction; +using Microsoft.CRM.Segment; +using Microsoft.CRM.Team; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.VAT.Calculation; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Inventory.Location; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Vendor; +using Microsoft.WithholdingTax; +using System.Globalization; +using System.Utilities; + +report 6789 "WHT Purch. - Cr. Memo" +{ + DefaultLayout = RDLC; + RDLCLayout = 'src\Purchase\Report\WHTPurchCrMemo.rdlc'; + Caption = 'Purch. - Cr. Memo'; + + dataset + { + dataitem("Purch. Cr. Memo Hdr."; "Purch. Cr. Memo Hdr.") + { + DataItemTableView = sorting("No."); + RequestFilterFields = "No.", "Buy-from Vendor No.", "No. Printed"; + RequestFilterHeading = 'Posted Purchase Tax Credit Memo'; + column(No_PurchTaxCrMemoHdr; "No.") + { + } + column(DocumentDateCaption; DocumentDateCaptionLbl) + { + } + column(EMailCaption; EMailCaptionLbl) + { + } + column(HomePageCaption; HomePageCaptionLbl) + { + } + column(AllowInvoiceDiscCaption; AllowInvoiceDiscCaptionLbl) + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem(PageLoop; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(CopyText; StrSubstNo(PurchaseTaxCreditMemoLbl, CopyText)) + { + } + column(VendAddr1; VendAddr[1]) + { + } + column(CompanyAddr1; CompanyAddr[1]) + { + } + column(VendAddr2; VendAddr[2]) + { + } + column(CompanyAddr2; CompanyAddr[2]) + { + } + column(VendAddr3; VendAddr[3]) + { + } + column(CompanyAddr3; CompanyAddr[3]) + { + } + column(VendAddr4; VendAddr[4]) + { + } + column(CompanyAddr4; CompanyAddr[4]) + { + } + column(VendAddr5; VendAddr[5]) + { + } + column(CompanyInfoPhoneNo; CompanyInfo."Phone No.") + { + } + column(CompanyInfoHomepage; CompanyInfo."Home Page") + { + } + column(CompanyInfoEmail; CompanyInfo."E-Mail") + { + } + column(VendAddr6; VendAddr[6]) + { + } + column(CompanyInfoVATRegNo; CompanyInfo."VAT Registration No.") + { + } + column(CompanyInfoGiroNo; CompanyInfo."Giro No.") + { + } + column(CompanyInfoBankName; CompanyInfo."Bank Name") + { + } + column(CompanyInfoBankAccNo; CompanyInfo."Bank Account No.") + { + } + column(PaytoVendNo_PurchTaxCrMemoHdr; "Purch. Cr. Memo Hdr."."Pay-to Vendor No.") + { + } + column(BuyfromVendNo_PurchTaxCrMemoHdr; "Purch. Cr. Memo Hdr."."Buy-from Vendor No.") + { + } + column(FormatedDocumentDate; Format("Purch. Cr. Memo Hdr."."Document Date", 0, 4)) + { + } + column(VATNoText; VATNoText) + { + } + column(VATRegNo_PurchTaxCrMemoHdr; "Purch. Cr. Memo Hdr."."VAT Registration No.") + { + } + column(No_CopyLoop; "Purch. Cr. Memo Hdr."."No.") + { + } + column(PurchaserText; PurchaserText) + { + } + column(SalesPurchPersonName; SalesPurchPerson.Name) + { + } + column(AppliedToText; AppliedToText) + { + } + column(ReferenceText; ReferenceText) + { + } + column(YourRef_PurchTaxCrMemoHdr; "Purch. Cr. Memo Hdr."."Your Reference") + { + } + column(VendAddr7; VendAddr[7]) + { + } + column(VendAddr8; VendAddr[8]) + { + } + column(CompanyAddr5; CompanyAddr[5]) + { + } + column(CompanyAddr6; CompanyAddr[6]) + { + } + column(FormatedPostingDate; Format("Purch. Cr. Memo Hdr."."Posting Date")) + { + } + column(PricesIncluVAT_PurchTaxCrMemoHdr; "Purch. Cr. Memo Hdr."."Prices Including VAT") + { + } + column(ReturnOrderNo_PurchTaxCrMemoHdr; "Purch. Cr. Memo Hdr."."Return Order No.") + { + } + column(ReturnOrderNoText; ReturnOrderNoText) + { + } + column(NoOfLoops; OutputNO) + { + } + column(CompanyInfoPhoneNoCaption; CompanyInfoPhoneNoCaptionLbl) + { + } + column(CompanyInfoVATRegNoCaption; CompanyInfoVATRegNoCaptionLbl) + { + } + column(CompanyInfoGiroNoCaption; CompanyInfoGiroNoCaptionLbl) + { + } + column(CompanyInfoBankNameCaption; CompanyInfoBankNameCaptionLbl) + { + } + column(CompanyInfoBankAccNoCaption; CompanyInfoBankAccNoCaptionLbl) + { + } + column(PurchTaxCrMemoHdrNoCaption; PurchTaxCrMemoHdrNoCaptionLbl) + { + } + column(PurchTaxCrMemoHdrPostingDateCaption; PurchTaxCrMemoHdrPostingDateCaptionLbl) + { + } + column(PaytoVendNo_PurchTaxCrMemoHdrCaption; "Purch. Cr. Memo Hdr.".FieldCaption("Pay-to Vendor No.")) + { + } + column(BuyfromVendNo_PurchTaxCrMemoHdrCaption; "Purch. Cr. Memo Hdr.".FieldCaption("Buy-from Vendor No.")) + { + } + column(PricesIncluVAT_PurchTaxCrMemoHdrCaption; "Purch. Cr. Memo Hdr.".FieldCaption("Prices Including VAT")) + { + } + dataitem(DimensionLoop1; "Integer") + { + DataItemLinkReference = "Purch. Cr. Memo Hdr."; + DataItemTableView = sorting(Number) where(Number = filter(1 ..)); + column(DimText; DimText) + { + } + column(Number_DimensionLoop1; Number) + { + } + column(HeaderDimensionsCaption; HeaderDimensionsCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + if Number = 1 then begin + if not DimSetEntry1.FindFirst() then + CurrReport.Break(); + end else + if not Continue then + CurrReport.Break(); + + Clear(DimText); + Continue := false; + repeat + OldDimText := DimText; + if DimText = '' then + DimText := StrSubstNo( + '%1 %2', DimSetEntry1."Dimension Code", DimSetEntry1."Dimension Value Code") + else + DimText := + StrSubstNo( + '%1, %2 %3', DimText, + DimSetEntry1."Dimension Code", DimSetEntry1."Dimension Value Code"); + if StrLen(DimText) > MaxStrLen(OldDimText) then begin + DimText := OldDimText; + Continue := true; + exit; + end; + until (DimSetEntry1.Next() = 0); + end; + + trigger OnPreDataItem() + begin + if not ShowInternalInfo then + CurrReport.Break(); + end; + } + dataitem("Purch. Cr. Memo Line"; "Purch. Cr. Memo Line") + { + DataItemLink = "Document No." = field("No."); + DataItemLinkReference = "Purch. Cr. Memo Hdr."; + DataItemTableView = sorting("Document No.", "Line No."); + column(LineAmt_PurchTaxCrMemoLine; "Line Amount") + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Desc_PurchTaxCrMemoLine; Description) + { + } + column(Desc_PurchTaxCrMemoLineCaption; FieldCaption(Description)) + { + } + column(TypeNO; TypeNO) + { + } + column(No_PurchTaxCrMemoLine; "No.") + { + } + column(No_PurchTaxCrMemoLineCaption; FieldCaption("No.")) + { + } + column(Quantity_PurchTaxCrMemoLine; Quantity) + { + } + column(QuantityCaption; FieldCaption(Quantity)) + { + } + column(UOM_PurchTaxCrMemoLine; "Unit of Measure") + { + } + column(UOMCaption; FieldCaption("Unit of Measure")) + { + } + column(DirectUnitCost_PurchTaxCrMemoLine; "Direct Unit Cost") + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 2; + } + column(LineDiscount_PurchTaxCrMemoLine; "Line Discount %") + { + } + column(AllowInvoiceDisc_PurchTaxCrMemoLine; "Allow Invoice Disc.") + { + } + column(VATIdentifier_PurchTaxCrMemoLine; "VAT Identifier") + { + } + column(VATIdentifierCaption; FieldCaption("VAT Identifier")) + { + } + column(InvDiscountAmount; -"Inv. Discount Amount") + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(InvDiscountAmount0; TotalInvAmt <> 0) + { + } + column(TotalText; TotalText) + { + } + column(PurchTaxCrMemoLineAmount; Amount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(TotalAmt; TotalAmt) + { + } + column(TotalExclVATText; TotalExclVATText) + { + } + column(TotalInclVATText; TotalInclVATText) + { + } + column(AmountIncluVAT_PurchTaxCrMemoLine; "Amount Including VAT") + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(AmountIncludingVATAmount; "Amount Including VAT" - Amount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(VATAmountLineVATAmountText; TempVATAmountLine.VATAmountText()) + { + } + column(TotalVATAmt; TotalVATAmt) + { + } + column(LineAmtInvDisAmtAmtIncluVAT; -("Line Amount" - "Inv. Discount Amount" - "Amount Including VAT")) + { + AutoFormatExpression = "Purch. Cr. Memo Hdr."."Currency Code"; + AutoFormatType = 1; + } + column(PurchTaxCrMemoHdrVATBaseDis0; "Purch. Cr. Memo Hdr."."VAT Base Discount %" <> 0) + { + } + column(CurrFactor_PurchTaxCrMemoHdr; "Purch. Cr. Memo Hdr."."Currency Factor") + { + } + column(TotalExclVATTextLCY; TotalExclVATTextLCY) + { + } + column(TotalInclVATTextLCY; TotalInclVATTextLCY) + { + } + column(AmountIncLCY; AmountIncLCY) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(AmountIncLCYAmountLCY; AmountIncLCY - AmountLCY) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(AmountLCY; AmountLCY) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(CurrCode_PurchTaxCrMemoHdr; "Purch. Cr. Memo Hdr."."Currency Code") + { + } + column(CurrencyLCY; CurrencyLCY) + { + } + column(AmountLangB1AmountLangB2; AmountLangB[1] + ' ' + AmountLangB[2]) + { + } + column(AmountLangA1AmountLangA2; AmountLangA[1] + ' ' + AmountLangA[2]) + { + } + column(AmountInWords; AmountInWords) + { + } + column(LineNo_PurchTaxCrMemoLine; "Line No.") + { + } + column(TotalLineAmt; TotalLineAmt) + { + } + column(TotalInvAmt; TotalInvAmt) + { + } + column(DirectUnitCostCaption; DirectUnitCostCaptionLbl) + { + } + column(PurchTaxCrMemoLineLineDisCaption; PurchTaxCrMemoLineLineDisCaptionLbl) + { + } + column(AmountCaption; AmountCaptionLbl) + { + } + column(InvDiscountAmountCaption; InvDiscountAmountCaptionLbl) + { + } + column(SubtotalCaption; SubtotalCaptionLbl) + { + } + column(LineAmtInvDisAmtAmtIncluVATCaption; LineAmtInvDisAmtAmtIncluVATCaptionLbl) + { + } + column(ExchangeRateCaption; ExchangeRateCaptionLbl) + { + } + dataitem(DimensionLoop2; "Integer") + { + DataItemTableView = sorting(Number) where(Number = filter(1 ..)); + column(DimText_DimensionLoop2; DimText) + { + } + column(LineDimensionsCaption; LineDimensionsCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + if Number = 1 then begin + if not DimSetEntry2.FindFirst() then + CurrReport.Break(); + end else + if not Continue then + CurrReport.Break(); + + Clear(DimText); + Continue := false; + repeat + OldDimText := DimText; + if DimText = '' then + DimText := StrSubstNo( + '%1 %2', DimSetEntry2."Dimension Code", DimSetEntry2."Dimension Value Code") + else + DimText := + StrSubstNo( + '%1, %2 %3', DimText, + DimSetEntry2."Dimension Code", DimSetEntry2."Dimension Value Code"); + if StrLen(DimText) > MaxStrLen(OldDimText) then begin + DimText := OldDimText; + Continue := true; + exit; + end; + until (DimSetEntry2.Next() = 0); + end; + + trigger OnPreDataItem() + begin + if not ShowInternalInfo then + CurrReport.Break(); + + DimSetEntry2.SetRange("Dimension Set ID", "Purch. Cr. Memo Line"."Dimension Set ID"); + end; + } + + trigger OnAfterGetRecord() + begin + if (Type = Type::"G/L Account") and (not ShowInternalInfo) then + "No." := ''; + + TempVATAmountLine.Init(); + TempVATAmountLine."VAT Identifier" := "VAT Identifier"; + TempVATAmountLine."VAT Calculation Type" := "VAT Calculation Type"; + TempVATAmountLine."Tax Group Code" := "Tax Group Code"; + TempVATAmountLine."Use Tax" := "Use Tax"; + TempVATAmountLine."VAT %" := "VAT %"; + TempVATAmountLine."VAT Base" := Amount; + TempVATAmountLine."Amount Including VAT" := "Amount Including VAT"; + TempVATAmountLine."Line Amount" := "Line Amount"; + if "Allow Invoice Disc." then + TempVATAmountLine."Inv. Disc. Base Amount" := "Line Amount"; + TempVATAmountLine."Invoice Discount Amount" := "Inv. Discount Amount"; + TempVATAmountLine.InsertLine(); + + TypeNO := Type; + TotalLineAmt += "Line Amount"; + TotalInvAmt += "Inv. Discount Amount"; + TotalAmt += Amount; + TotalVATAmt += "Amount Including VAT"; + end; + + trigger OnPreDataItem() + begin + TempVATAmountLine.DeleteAll(); + MoreLines := FindLast(); + while MoreLines and (Description = '') and ("No." = '') and (Quantity = 0) and (Amount = 0) do + MoreLines := Next(-1) <> 0; + if not MoreLines then + CurrReport.Break(); + SetRange("Line No.", 0, "Line No."); + TotalLineAmt := 0; + TotalInvAmt := 0; + TotalAmt := 0; + TotalVATAmt := 0; + end; + } + dataitem(VATCounter; "Integer") + { + DataItemTableView = sorting(Number); + column(VATAmountLineVATBase; TempVATAmountLine."VAT Base") + { + AutoFormatExpression = "Purch. Cr. Memo Hdr."."Currency Code"; + AutoFormatType = 1; + } + column(VATAmountLineVATAmount; TempVATAmountLine."VAT Amount") + { + AutoFormatExpression = "Purch. Cr. Memo Hdr."."Currency Code"; + AutoFormatType = 1; + } + column(VATAmountLineLineAmount; TempVATAmountLine."Line Amount") + { + AutoFormatExpression = "Purch. Cr. Memo Hdr."."Currency Code"; + AutoFormatType = 1; + } + column(VATAmountLineInvDiscBaseAmt; TempVATAmountLine."Inv. Disc. Base Amount") + { + AutoFormatExpression = "Purch. Cr. Memo Hdr."."Currency Code"; + AutoFormatType = 1; + } + column(VATAmountLineInvoiceDisAmt; TempVATAmountLine."Invoice Discount Amount") + { + AutoFormatExpression = "Purch. Cr. Memo Hdr."."Currency Code"; + AutoFormatType = 1; + } + column(VATAmountLineVAT; TempVATAmountLine."VAT %") + { + DecimalPlaces = 0 : 5; + } + column(VATAmountLineVATIdentifier; TempVATAmountLine."VAT Identifier") + { + } + column(VATAmountLineVATCaption; VATAmountLineVATCaptionLbl) + { + } + column(VATAmountLineVATBaseCaption; VATAmountLineVATBaseCaptionLbl) + { + } + column(VATAmountLineVATAmtCaption; VATAmountLineVATAmtCaptionLbl) + { + } + column(VATAmountSpecificationCaption; VATAmountSpecificationCaptionLbl) + { + } + column(VATAmountLineVATIdentCaption; VATAmountLineVATIdentCaptionLbl) + { + } + column(VATAmountLineLineAmtCaption; VATAmountLineLineAmtCaptionLbl) + { + } + column(VATAmtLineInvDiscBaseAmtCaption; VATAmtLineInvDiscBaseAmtCaptionLbl) + { + } + column(VATAmountLineInvDisAmtCaption; VATAmountLineInvDisAmtCaptionLbl) + { + } + column(VATBaseCaption; VATBaseCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + TempVATAmountLine.GetLine(Number); + end; + + trigger OnPreDataItem() + begin + if TempVATAmountLine.GetTotalVATAmount() = 0 then + CurrReport.Break(); + SetRange(Number, 1, TempVATAmountLine.Count); + end; + } + dataitem(Total; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + + trigger OnPreDataItem() + begin + if "Purch. Cr. Memo Hdr."."Buy-from Vendor No." = "Purch. Cr. Memo Hdr."."Pay-to Vendor No." then + CurrReport.Break(); + end; + } + dataitem(Total2; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(ShipToAddr1; ShipToAddr[1]) + { + } + column(ShipToAddr2; ShipToAddr[2]) + { + } + column(ShipToAddr3; ShipToAddr[3]) + { + } + column(ShipToAddr4; ShipToAddr[4]) + { + } + column(ShipToAddr5; ShipToAddr[5]) + { + } + column(ShipToAddr6; ShipToAddr[6]) + { + } + column(ShipToAddr7; ShipToAddr[7]) + { + } + column(ShipToAddr8; ShipToAddr[8]) + { + } + column(ShiptoAddressCaption; ShiptoAddressCaptionLbl) + { + } + + trigger OnPreDataItem() + begin + if ShipToAddr[1] = '' then + CurrReport.Break(); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then + CopyText := CopyLbl; + OutputNO += 1; + end; + + trigger OnPostDataItem() + begin + if not CurrReport.Preview then + CODEUNIT.Run(CODEUNIT::"PurchCrMemo-Printed", "Purch. Cr. Memo Hdr."); + end; + + trigger OnPreDataItem() + begin + NoOfLoops := Abs(NoOfCopies) + 1; + CopyText := ''; + SetRange(Number, 1, NoOfLoops); + + OutputNO := 1; + end; + } + + trigger OnAfterGetRecord() + var + WithholdingTaxMgmt: Codeunit "Withholding Tax Mgmt."; + begin + CurrReport.Language := LanguageMgt.GetLanguageIdOrDefault("Language Code"); + CurrReport.FormatRegion := LanguageMgt.GetFormatRegionOrDefault("Format Region"); + + if RespCenter.Get("Responsibility Center") then begin + FormatAddr.RespCenter(CompanyAddr, RespCenter); + CompanyInfo."Phone No." := RespCenter."Phone No."; + CompanyInfo."Fax No." := RespCenter."Fax No."; + end else + FormatAddr.Company(CompanyAddr, CompanyInfo); + + DimSetEntry1.SetRange("Dimension Set ID", "Dimension Set ID"); + + if "Return Order No." = '' then + ReturnOrderNoText := '' + else + ReturnOrderNoText := FieldCaption("Return Order No."); + if "Purchaser Code" = '' then begin + SalesPurchPerson.Init(); + PurchaserText := ''; + end else begin + SalesPurchPerson.Get("Purchaser Code"); + PurchaserText := PurchaserLbl + end; + if "Your Reference" = '' then + ReferenceText := '' + else + ReferenceText := FieldCaption("Your Reference"); + if "VAT Registration No." = '' then + VATNoText := '' + else + VATNoText := FieldCaption("VAT Registration No."); + if "Currency Code" = '' then begin + GLSetup.TestField("LCY Code"); + TotalText := StrSubstNo(TotalLbl, GLSetup."LCY Code"); + TotalInclVATText := StrSubstNo(TotalIncludingVATLbl, GLSetup."LCY Code"); + TotalExclVATText := StrSubstNo(TotalExclVATLbl, GLSetup."LCY Code"); + end else begin + TotalText := StrSubstNo(TotalLbl, "Currency Code"); + TotalInclVATText := StrSubstNo(TotalIncludingVATLbl, "Currency Code"); + TotalExclVATText := StrSubstNo(TotalExclVATLbl, "Currency Code"); + TotalInclVATTextLCY := StrSubstNo(TotalIncludingVATLbl, GLSetup."LCY Code"); + TotalExclVATTextLCY := StrSubstNo(TotalExclVATLbl, GLSetup."LCY Code"); + end; + FormatAddr.PurchCrMemoPayTo(VendAddr, "Purch. Cr. Memo Hdr."); + + CalcFields(Amount); + CalcFields("Amount Including VAT"); + + AmountLCY := + Round( + CurrExchRate.ExchangeAmtFCYToLCY( + WorkDate(), "Currency Code", Amount, "Currency Factor")); + AmountIncLCY := + Round( + CurrExchRate.ExchangeAmtFCYToLCY( + WorkDate(), "Currency Code", "Amount Including VAT", "Currency Factor")); + WithholdingTaxMgmt.InitTextVariable(); + WithholdingTaxMgmt.FormatNoText(AmountLangA, "Amount Including VAT", "Currency Code"); + AmountLangB[1] := ''; + AmountLangB[2] := ''; + + if "Applies-to Doc. No." = '' then + AppliedToText := '' + else + AppliedToText := StrSubstNo(AppliesToLbl, "Applies-to Doc. Type", "Applies-to Doc. No."); + + FormatAddr.PurchCrMemoShipTo(ShipToAddr, "Purch. Cr. Memo Hdr."); + + if LogInteraction then + if not CurrReport.Preview then + SegManagement.LogDocument( + 16, "No.", 0, 0, DATABASE::Vendor, "Buy-from Vendor No.", "Purchaser Code", '', "Posting Description", ''); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(NoOfCopies; NoOfCopies) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Copies'; + ToolTip = 'Specifies how many copies of the document to print.'; + } + field(ShowInternalInformation; ShowInternalInfo) + { + ApplicationArea = Basic, Suite; + Caption = 'Show Internal Information'; + ToolTip = 'Specifies if the document shows internal information.'; + } + field(LogInteraction; LogInteraction) + { + ApplicationArea = Basic, Suite; + Caption = 'Log Interaction'; + Enabled = LogInteractionEnable; + ToolTip = 'Specifies if you want the program to log this interaction.'; + } + field(AmountInWords; AmountInWords) + { + ApplicationArea = Basic, Suite; + Caption = 'Show Total In Words'; + ToolTip = 'Specifies that you want to print total amounts as words.'; + } + field(CurrencyLCY; CurrencyLCY) + { + ApplicationArea = Basic, Suite; + Caption = 'Show LCY for FCY'; + ToolTip = 'Specifies if you want to use your own currency instead of the currency of your customers or vendors.'; + } + } + } + } + + actions + { + } + + trigger OnInit() + begin + LogInteractionEnable := true; + end; + + trigger OnOpenPage() + begin + LogInteraction := SegManagement.FindInteractionTemplateCode("Interaction Log Entry Document Type"::"Purch. Cr. Memo") <> ''; + LogInteractionEnable := LogInteraction; + end; + } + + labels + { + } + + trigger OnInitReport() + begin + GLSetup.Get(); + CompanyInfo.Get(); + end; + + var + GLSetup: Record "General Ledger Setup"; + CompanyInfo: Record "Company Information"; + SalesPurchPerson: Record "Salesperson/Purchaser"; + TempVATAmountLine: Record "VAT Amount Line" temporary; + DimSetEntry1: Record "Dimension Set Entry"; + DimSetEntry2: Record "Dimension Set Entry"; + RespCenter: Record "Responsibility Center"; + CurrExchRate: Record "Currency Exchange Rate"; + LanguageMgt: Codeunit Language; + FormatAddr: Codeunit "Format Address"; + SegManagement: Codeunit SegManagement; + VendAddr: array[8] of Text[100]; + ShipToAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + ReturnOrderNoText: Text[30]; + PurchaserText: Text[30]; + VATNoText: Text[30]; + ReferenceText: Text[35]; + AppliedToText: Text[40]; + TotalText: Text[50]; + AmountLangA: array[2] of Text[80]; + AmountLangB: array[2] of Text[80]; + TotalInclVATText: Text[50]; + TotalExclVATText: Text[50]; + MoreLines: Boolean; + NoOfCopies: Integer; + NoOfLoops: Integer; + CopyText: Text[30]; + DimText: Text[120]; + OldDimText: Text[75]; + ShowInternalInfo: Boolean; + Continue: Boolean; + LogInteraction: Boolean; + AmountInWords: Boolean; + PurchaserLbl: Label 'Purchaser'; + TotalLbl: Label 'Total %1'; + TotalIncludingVATLbl: Label 'Total %1 Incl. VAT'; + AppliesToLbl: Label '(Applies to %1 %2)'; + CopyLbl: Label 'COPY'; + PurchaseTaxCreditMemoLbl: Label 'Purchase - Tax Credit Memo %1'; + TotalExclVATLbl: Label 'Total %1 Excl. VAT'; + CurrencyLCY: Boolean; + AmountIncLCY: Decimal; + TotalInclVATTextLCY: Text[50]; + TotalExclVATTextLCY: Text[50]; + AmountLCY: Decimal; + TypeNO: Integer; + OutputNO: Integer; + TotalLineAmt: Decimal; + TotalInvAmt: Decimal; + TotalAmt: Decimal; + TotalVATAmt: Decimal; + LogInteractionEnable: Boolean; + CompanyInfoPhoneNoCaptionLbl: Label 'Phone No.'; + CompanyInfoVATRegNoCaptionLbl: Label 'VAT Registration No.'; + CompanyInfoGiroNoCaptionLbl: Label 'Giro No.'; + CompanyInfoBankNameCaptionLbl: Label 'Bank'; + CompanyInfoBankAccNoCaptionLbl: Label 'Account No.'; + PurchTaxCrMemoHdrNoCaptionLbl: Label 'Credit Memo No.'; + PurchTaxCrMemoHdrPostingDateCaptionLbl: Label 'Posting Date'; + HeaderDimensionsCaptionLbl: Label 'Header Dimensions'; + DirectUnitCostCaptionLbl: Label 'Direct Unit Cost'; + PurchTaxCrMemoLineLineDisCaptionLbl: Label 'Discount %'; + AmountCaptionLbl: Label 'Amount'; + InvDiscountAmountCaptionLbl: Label 'Invoice Discount Amount'; + SubtotalCaptionLbl: Label 'Subtotal'; + LineAmtInvDisAmtAmtIncluVATCaptionLbl: Label 'Payment Discount on VAT'; + ExchangeRateCaptionLbl: Label 'Exchange Rate'; + LineDimensionsCaptionLbl: Label 'Line Dimensions'; + VATAmountLineVATCaptionLbl: Label 'VAT %'; + VATAmountLineVATBaseCaptionLbl: Label 'VAT Base'; + VATAmountLineVATAmtCaptionLbl: Label 'VAT Amount'; + VATAmountSpecificationCaptionLbl: Label 'VAT Amount Specification'; + VATAmountLineVATIdentCaptionLbl: Label 'VAT Identifier'; + VATAmountLineLineAmtCaptionLbl: Label 'Line Amount'; + VATAmtLineInvDiscBaseAmtCaptionLbl: Label 'Invoice Discount Base Amount'; + VATAmountLineInvDisAmtCaptionLbl: Label 'Invoice Discount Amount'; + VATBaseCaptionLbl: Label 'Total'; + ShiptoAddressCaptionLbl: Label 'Ship-to Address'; + DocumentDateCaptionLbl: Label 'Document Date'; + EMailCaptionLbl: Label 'E Mail'; + HomePageCaptionLbl: Label 'HomePage'; + AllowInvoiceDiscCaptionLbl: Label 'Allow Invoice Discount'; +} + diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchTaxCrMemo.rdlc b/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchCrMemo.rdlc similarity index 100% rename from Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchTaxCrMemo.rdlc rename to Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchCrMemo.rdlc diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchInvoice.Report.al b/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchInvoice.Report.al new file mode 100644 index 0000000000..7874e91260 --- /dev/null +++ b/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchInvoice.Report.al @@ -0,0 +1,932 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.WithholdingTax; + +using Microsoft.CRM.Interaction; +using Microsoft.CRM.Segment; +using Microsoft.CRM.Team; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.VAT.Calculation; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Foundation.PaymentTerms; +using Microsoft.Foundation.Shipping; +using Microsoft.Inventory.Location; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Vendor; +using Microsoft.WithholdingTax; +using System.Globalization; +using System.Utilities; + +report 6788 "WHT Purch. - Invoice" +{ + DefaultLayout = RDLC; + RDLCLayout = 'src\Purchase\Report\WHTPurchInvoice.rdlc'; + Caption = 'Purch. - Invoice'; + + dataset + { + dataitem("Purch. Inv. Header"; "Purch. Inv. Header") + { + DataItemTableView = sorting("No."); + RequestFilterFields = "No.", "Buy-from Vendor No.", "No. Printed"; + RequestFilterHeading = 'Posted Purchase Tax Invoice'; + column(No_PurchTaxInvHdr; "No.") + { + } + column(DocumentDateCation; DocumentDateCationLbl) + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem(PageLoop; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(BuyfromVendNo_PurchTaxInvHdr; "Purch. Inv. Header"."Buy-from Vendor No.") + { + } + column(BuyfromVendNo_PurchTaxInvHdrCaption; "Purch. Inv. Header".FieldCaption("Buy-from Vendor No.")) + { + } + column(HomePage; CompanyInfo."Home Page") + { + } + column(Email; CompanyInfo."E-Mail") + { + } + column(PaymentTermsDescription; PaymentTerms.Description) + { + } + column(ShipmentMethodDescription; ShipmentMethod.Description) + { + } + column(ShipmentMethodDescriptionCaption; ShipmentMethodDescriptionCaptionLbl) + { + } + column(PaymentTermsDescriptionCaption; PaymentTermsDescriptionCaptionLbl) + { + } + column(PurchTaxInvCopyText; StrSubstNo(PurchTaxInvoiceTitleLbl, CopyText)) + { + } + column(VendAddr1; VendAddr[1]) + { + } + column(CompanyAddr1; CompanyAddr[1]) + { + } + column(VendAddr2; VendAddr[2]) + { + } + column(CompanyAddr2; CompanyAddr[2]) + { + } + column(VendAddr3; VendAddr[3]) + { + } + column(CompanyAddr3; CompanyAddr[3]) + { + } + column(VendAddr4; VendAddr[4]) + { + } + column(CompanyAddr4; CompanyAddr[4]) + { + } + column(VendAddr5; VendAddr[5]) + { + } + column(CompanyInfoPhoneNo; CompanyInfo."Phone No.") + { + } + column(VendAddr6; VendAddr[6]) + { + } + column(CompanyInfoVATRegNo; CompanyInfo."VAT Registration No.") + { + } + column(CompanyInfoGiroNo; CompanyInfo."Giro No.") + { + } + column(CompanyInfoBankName; CompanyInfo."Bank Name") + { + } + column(CompanyInfoBankAccNo; CompanyInfo."Bank Account No.") + { + } + column(PaytoVendNo_PurchTaxInvHdr; "Purch. Inv. Header"."Pay-to Vendor No.") + { + } + column(FormatedDocumentDate; Format("Purch. Inv. Header"."Document Date", 0, 4)) + { + } + column(VATNoText; VATNoText) + { + } + column(VATRegNo_PurchTaxInvHdr; "Purch. Inv. Header"."VAT Registration No.") + { + } + column(FormatedDueDate; Format("Purch. Inv. Header"."Due Date")) + { + } + column(PurchaserText; PurchaserText) + { + } + column(SalesPurchPersonName; SalesPurchPerson.Name) + { + } + column(No_PageLoop; "Purch. Inv. Header"."No.") + { + } + column(ReferenceText; ReferenceText) + { + } + column(YourReference_PurchTaxInvHdr; "Purch. Inv. Header"."Your Reference") + { + } + column(OrderNoText; OrderNoText) + { + } + column(OrderNo_PurchTaxInvHdr; "Purch. Inv. Header"."Order No.") + { + } + column(VendAddr7; VendAddr[7]) + { + } + column(VendAddr8; VendAddr[8]) + { + } + column(CompanyAddr5; CompanyAddr[5]) + { + } + column(CompanyAddr6; CompanyAddr[6]) + { + } + column(FormatedPostingDate; Format("Purch. Inv. Header"."Posting Date")) + { + } + column(PricesIncluVAT_PurchTaxInvHdr; "Purch. Inv. Header"."Prices Including VAT") + { + } + column(NoOfLoops; OutputNO) + { + } + column(CompanyInfoPhoneNoCaption; CompanyInfoPhoneNoCaptionLbl) + { + } + column(CompanyInfoVATRegNoCaption; CompanyInfoVATRegNoCaptionLbl) + { + } + column(CompanyInfoGiroNoCaption; CompanyInfoGiroNoCaptionLbl) + { + } + column(CompanyInfoBankNameCaption; CompanyInfoBankNameCaptionLbl) + { + } + column(CompanyInfoBankAccNoCaption; CompanyInfoBankAccNoCaptionLbl) + { + } + column(DueDateCaption; DueDateCaptionLbl) + { + } + column(InvoiceNoCaption; InvoiceNoCaptionLbl) + { + } + column(PostingDateCaption; PostingDateCaptionLbl) + { + } + column(CompanyInfoHomepageCapation; CompanyInfoHomepageCapationLbl) + { + } + column(CompanyInfoEmailCaption; CompanyInfoEmailCaptionLbl) + { + } + column(PaytoVendNo_PurchTaxInvHdrCaption; "Purch. Inv. Header".FieldCaption("Pay-to Vendor No.")) + { + } + column(PricesIncluVAT_PurchTaxInvHdrCaption; "Purch. Inv. Header".FieldCaption("Prices Including VAT")) + { + } + dataitem(DimensionLoop1; "Integer") + { + DataItemLinkReference = "Purch. Inv. Header"; + DataItemTableView = sorting(Number) where(Number = filter(1 ..)); + column(DimText; DimText) + { + } + column(Number_DimensionLoop1; Number) + { + } + column(HeaderDimensionsCaption; HeaderDimensionsCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + if Number = 1 then begin + if not DimSetEntry1.FindFirst() then + CurrReport.Break(); + end else + if not Continue then + CurrReport.Break(); + + Clear(DimText); + Continue := false; + repeat + OldDimText := DimText; + if DimText = '' then + DimText := StrSubstNo( + '%1 %2', DimSetEntry1."Dimension Code", DimSetEntry1."Dimension Value Code") + else + DimText := + StrSubstNo( + '%1, %2 %3', DimText, + DimSetEntry1."Dimension Code", DimSetEntry1."Dimension Value Code"); + if StrLen(DimText) > MaxStrLen(OldDimText) then begin + DimText := OldDimText; + Continue := true; + exit; + end; + until (DimSetEntry1.Next() = 0); + end; + + trigger OnPreDataItem() + begin + if not ShowInternalInfo then + CurrReport.Break(); + end; + } + dataitem("Purch. Inv. Line"; "Purch. Inv. Line") + { + DataItemLink = "Document No." = field("No."); + DataItemLinkReference = "Purch. Inv. Header"; + DataItemTableView = sorting("Document No.", "Line No."); + column(LineAmount_PurchTaxInvLine; "Line Amount") + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Description_PurchTaxInvLine; Description) + { + } + column(TypeNo; TypeNO) + { + } + column(Quantity_PurchTaxInvLine; Quantity) + { + } + column(DirectUnitCost_PurchTaxInvLine; "Direct Unit Cost") + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 2; + } + column(LineDiscount_PurchTaxInvLine; "Line Discount %") + { + } + column(AllowInvDisc_PurchTaxInvLine; "Allow Invoice Disc.") + { + } + column(VATIdentifier_PurchTaxInvLine; "VAT Identifier") + { + } + column(ExternalDoNo_PurchTaxInvLine; "Purch. Inv. Header"."Vendor Invoice No.") + { + } + column(InvDiscountAmount; -"Inv. Discount Amount") + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(InvDiscountAmount0; TotalInvAmt <> 0) + { + } + column(TotalText; TotalText) + { + } + column(Amount_PurchTaxInvLine; Amount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(TotalAmt; TotalAmt) + { + } + column(TotalVATAmt; TotalVATAmt) + { + } + column(TotalInclVATText; TotalInclVATText) + { + } + column(AmtIncluVAT_PurchTaxInvLine; "Amount Including VAT") + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(AmountIncludingVATAmount; "Amount Including VAT" - Amount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(VATAmountLineVATAmountText; TempVATAmountLine.VATAmountText()) + { + } + column(TotalExclVATText; TotalExclVATText) + { + } + column(LineAmtInvDisAmtAmtIncluVAT; -("Line Amount" - "Inv. Discount Amount" - "Amount Including VAT")) + { + AutoFormatExpression = "Purch. Inv. Header"."Currency Code"; + AutoFormatType = 1; + } + column(PurchTaxInvHdrVATBaseDiscount0; "Purch. Inv. Header"."VAT Base Discount %" <> 0) + { + } + column(AmountIncLCY; AmountIncLCY) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(TotalInclVATTextLCY; TotalInclVATTextLCY) + { + } + column(CurrFactor_PurchTaxInvHdr; "Purch. Inv. Header"."Currency Factor") + { + } + column(TotalExclVATTextLCY; TotalExclVATTextLCY) + { + } + column(AmountLCY; AmountLCY) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(CurrencyLCY; CurrencyLCY) + { + } + column(CurrCode_PurchTaxInvHdr; "Purch. Inv. Header"."Currency Code") + { + } + column(AmountLangB1AmountLangB2; AmountLangB[1] + ' ' + AmountLangB[2]) + { + AutoFormatType = 1; + } + column(AmountLangA1AmountLangA2; AmountLangA[1] + ' ' + AmountLangA[2]) + { + AutoFormatType = 1; + } + column(AmountInWords; AmountInWords) + { + } + column(LineNo_PurchTaxInvLine; "Line No.") + { + } + column(TotalLineAmt; TotalLineAmt) + { + } + column(TotalInvAmt; TotalInvAmt) + { + } + column(InvoiceRefCaption; InvoiceRefCaptionLbl) + { + } + column(DirectUnitCostCaption; DirectUnitCostCaptionLbl) + { + } + column(PurchTaxInvLineLineDiscountCaption; PurchTaxInvLineLineDiscountCaptionLbl) + { + } + column(AmountCaption; AmountCaptionLbl) + { + } + column(InvDiscountAmountCaption; InvDiscountAmountCaptionLbl) + { + } + column(SubtotalCaption; SubtotalCaptionLbl) + { + } + column(LineAmtInvDisAmtAmtIncluVATCaption; LineAmtInvDisAmtAmtIncluVATCaptionLbl) + { + } + column(ExchangeRateCaption; ExchangeRateCaptionLbl) + { + } + column(Description_PurchTaxInvLineCaption; FieldCaption(Description)) + { + } + column(Quantity_PurchTaxInvLineCaption; FieldCaption(Quantity)) + { + } + column(AllowInvDisc_PurchTaxInvLineCaption; FieldCaption("Allow Invoice Disc.")) + { + } + column(VATIdentifier_PurchTaxInvLineCaption; FieldCaption("VAT Identifier")) + { + } + dataitem(DimensionLoop2; "Integer") + { + DataItemTableView = sorting(Number) where(Number = filter(1 ..)); + column(DimText_DimensionLoop2; DimText) + { + } + column(LineDimensionsCaption; LineDimensionsCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + if Number = 1 then begin + if not DimSetEntry2.FindFirst() then + CurrReport.Break(); + end else + if not Continue then + CurrReport.Break(); + + Clear(DimText); + Continue := false; + repeat + OldDimText := DimText; + if DimText = '' then + DimText := StrSubstNo( + '%1 %2', DimSetEntry2."Dimension Code", DimSetEntry2."Dimension Value Code") + else + DimText := + StrSubstNo( + '%1, %2 %3', DimText, + DimSetEntry2."Dimension Code", DimSetEntry2."Dimension Value Code"); + if StrLen(DimText) > MaxStrLen(OldDimText) then begin + DimText := OldDimText; + Continue := true; + exit; + end; + until (DimSetEntry2.Next() = 0); + end; + + trigger OnPreDataItem() + begin + if not ShowInternalInfo then + CurrReport.Break(); + + DimSetEntry2.SetRange("Dimension Set ID", "Purch. Inv. Line"."Dimension Set ID"); + end; + } + + trigger OnAfterGetRecord() + begin + if (Type = Type::"G/L Account") and (not ShowInternalInfo) then + "No." := ''; + + TempVATAmountLine.Init(); + TempVATAmountLine."VAT Identifier" := "VAT Identifier"; + TempVATAmountLine."VAT Calculation Type" := "VAT Calculation Type"; + TempVATAmountLine."Tax Group Code" := "Tax Group Code"; + TempVATAmountLine."Use Tax" := "Use Tax"; + TempVATAmountLine."VAT %" := "VAT %"; + TempVATAmountLine."VAT Base" := Amount; + TempVATAmountLine."Amount Including VAT" := "Amount Including VAT"; + TempVATAmountLine."Line Amount" := "Line Amount"; + if "Allow Invoice Disc." then + TempVATAmountLine."Inv. Disc. Base Amount" := "Line Amount"; + TempVATAmountLine."Invoice Discount Amount" := "Inv. Discount Amount"; + TempVATAmountLine.InsertLine(); + + TypeNO := Type; + TotalLineAmt += "Line Amount"; + TotalInvAmt += "Inv. Discount Amount"; + TotalAmt += Amount; + TotalVATAmt += "Amount Including VAT"; + end; + + trigger OnPreDataItem() + begin + TempVATAmountLine.DeleteAll(); + MoreLines := FindLast(); + while MoreLines and (Description = '') and ("No." = '') and (Quantity = 0) and (Amount = 0) do + MoreLines := Next(-1) <> 0; + if not MoreLines then + CurrReport.Break(); + SetRange("Line No.", 0, "Line No."); + TotalLineAmt := 0; + TotalInvAmt := 0; + TotalAmt := 0; + TotalVATAmt := 0; + end; + } + dataitem(VATCounter; "Integer") + { + DataItemTableView = sorting(Number); + column(VATBase_VATAmountLine; TempVATAmountLine."VAT Base") + { + AutoFormatExpression = "Purch. Inv. Header"."Currency Code"; + AutoFormatType = 1; + } + column(VATAmount_VATAmountLine; TempVATAmountLine."VAT Amount") + { + AutoFormatExpression = "Purch. Inv. Header"."Currency Code"; + AutoFormatType = 1; + } + column(LineAmount_VATAmountLine; TempVATAmountLine."Line Amount") + { + AutoFormatExpression = "Purch. Inv. Header"."Currency Code"; + AutoFormatType = 1; + } + column(InvDiscBaseAmt_VATAmountLine; TempVATAmountLine."Inv. Disc. Base Amount") + { + AutoFormatExpression = "Purch. Inv. Header"."Currency Code"; + AutoFormatType = 1; + } + column(InvoiceDisAmt_VATAmountLine; TempVATAmountLine."Invoice Discount Amount") + { + AutoFormatExpression = "Purch. Inv. Header"."Currency Code"; + AutoFormatType = 1; + } + column(VATRealized_VATAmountLine; TempVATAmountLine."WHT VAT Realized") + { + AutoFormatExpression = "Purch. Inv. Header"."Currency Code"; + AutoFormatType = 1; + } + column(AmountPaid_VATAmountLine; TempVATAmountLine."WHT Amount Paid") + { + AutoFormatExpression = "Purch. Inv. Header"."Currency Code"; + AutoFormatType = 1; + } + column(VAT_VATAmountLine; TempVATAmountLine."VAT %") + { + DecimalPlaces = 0 : 5; + } + column(VATIdentifier_VATAmountLine; TempVATAmountLine."VAT Identifier") + { + } + column(VATAmountLineVATCaption; VATAmountLineVATCaptionLbl) + { + } + column(VATBaseCaption; VATBaseCaptionLbl) + { + } + column(VATAmountLineVATAmountCaption; VATAmountLineVATAmountCaptionLbl) + { + } + column(VATAmountSpecificationCaption; VATAmountSpecificationCaptionLbl) + { + } + column(VATAmountLineInvDisAmtCaption; VATAmountLineInvDisAmtCaptionLbl) + { + } + column(VATAmountLineInvDiscBaseAmtCaption; VATAmountLineInvDiscBaseAmtCaptionLbl) + { + } + column(VATAmountLineLineAmtCaption; VATAmountLineLineAmtCaptionLbl) + { + } + column(VATAmountLineVATIdentifierCaption; VATAmountLineVATIdentifierCaptionLbl) + { + } + column(AmountPaidCaption; AmountPaidCaptionLbl) + { + } + column(VATRealizedCaption; VATRealizedCaptionLbl) + { + } + column(VATAmountLineVATBaseCaption; VATAmountLineVATBaseCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + TempVATAmountLine.GetLine(Number); + end; + + trigger OnPreDataItem() + begin + if TempVATAmountLine.GetTotalVATAmount() = 0 then + CurrReport.Break(); + SetRange(Number, 1, TempVATAmountLine.Count); + end; + } + dataitem(Total; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + } + dataitem(Total2; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + + trigger OnPreDataItem() + begin + if "Purch. Inv. Header"."Buy-from Vendor No." = "Purch. Inv. Header"."Pay-to Vendor No." then + CurrReport.Break(); + end; + } + dataitem(Total3; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(ShipToAddr1; ShipToAddr[1]) + { + } + column(ShipToAddr2; ShipToAddr[2]) + { + } + column(ShipToAddr3; ShipToAddr[3]) + { + } + column(ShipToAddr4; ShipToAddr[4]) + { + } + column(ShipToAddr5; ShipToAddr[5]) + { + } + column(ShipToAddr6; ShipToAddr[6]) + { + } + column(ShipToAddr7; ShipToAddr[7]) + { + } + column(ShipToAddr8; ShipToAddr[8]) + { + } + column(ShiptoAddressCaption; ShiptoAddressCaptionLbl) + { + } + + trigger OnPreDataItem() + begin + if ShipToAddr[1] = '' then + CurrReport.Break(); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then + CopyText := CopyCaptionLbl; + OutputNO += 1; + end; + + trigger OnPostDataItem() + begin + if not CurrReport.Preview then + CODEUNIT.Run(CODEUNIT::"Purch. Inv.-Printed", "Purch. Inv. Header"); + end; + + trigger OnPreDataItem() + begin + NoOfLoops := Abs(NoOfCopies) + 1; + CopyText := ''; + SetRange(Number, 1, NoOfLoops); + + OutputNO := 1; + end; + } + + trigger OnAfterGetRecord() + var + WithholdingTaxMgmt: Codeunit "Withholding Tax Mgmt."; + begin + CurrReport.Language := LanguageMgt.GetLanguageIdOrDefault("Language Code"); + CurrReport.FormatRegion := LanguageMgt.GetFormatRegionOrDefault("Format Region"); + + if RespCenter.Get("Responsibility Center") then begin + FormatAddr.RespCenter(CompanyAddr, RespCenter); + CompanyInfo."Phone No." := RespCenter."Phone No."; + CompanyInfo."Fax No." := RespCenter."Fax No."; + end else + FormatAddr.Company(CompanyAddr, CompanyInfo); + + DimSetEntry1.SetRange("Dimension Set ID", "Dimension Set ID"); + + if "Order No." = '' then + OrderNoText := '' + else + OrderNoText := FieldCaption("Order No."); + if "Purchaser Code" = '' then begin + Clear(SalesPurchPerson); + PurchaserText := ''; + end else begin + SalesPurchPerson.Get("Purchaser Code"); + PurchaserText := PurchaserLbl + end; + if "Your Reference" = '' then + ReferenceText := '' + else + ReferenceText := FieldCaption("Your Reference"); + if "VAT Registration No." = '' then + VATNoText := '' + else + VATNoText := FieldCaption("VAT Registration No."); + if "Currency Code" = '' then begin + GLSetup.TestField("LCY Code"); + TotalText := StrSubstNo(totalLbl, GLSetup."LCY Code"); + TotalInclVATText := StrSubstNo(TotalInclVATCaptionLbl, GLSetup."LCY Code"); + TotalExclVATText := StrSubstNo(TotalExclVATCaptionLbl, GLSetup."LCY Code"); + end else begin + TotalText := StrSubstNo(totalLbl, "Currency Code"); + TotalInclVATText := StrSubstNo(TotalInclVATCaptionLbl, "Currency Code"); + TotalExclVATText := StrSubstNo(TotalExclVATCaptionLbl, "Currency Code"); + TotalInclVATTextLCY := StrSubstNo(TotalInclVATCaptionLbl, GLSetup."LCY Code"); + TotalExclVATTextLCY := StrSubstNo(TotalExclVATCaptionLbl, GLSetup."LCY Code"); + end; + FormatAddr.PurchInvPayTo(VendAddr, "Purch. Inv. Header"); + + CalcFields(Amount); + CalcFields("Amount Including VAT"); + + AmountLCY := + Round( + CurrExchRate.ExchangeAmtFCYToLCY( + WorkDate(), "Currency Code", Amount, "Currency Factor")); + AmountIncLCY := + Round( + CurrExchRate.ExchangeAmtFCYToLCY( + WorkDate(), "Currency Code", "Amount Including VAT", "Currency Factor")); + WithholdingTaxMgmt.InitTextVariable(); + WithholdingTaxMgmt.FormatNoText(AmountLangA, "Amount Including VAT", "Currency Code"); + AmountLangB[1] := ''; + AmountLangB[2] := ''; + + if "Payment Terms Code" = '' then + PaymentTerms.Init() + else + PaymentTerms.Get("Payment Terms Code"); + if "Shipment Method Code" = '' then + ShipmentMethod.Init() + else + ShipmentMethod.Get("Shipment Method Code"); + + FormatAddr.PurchInvShipTo(ShipToAddr, "Purch. Inv. Header"); + + if LogInteraction then + if not CurrReport.Preview then + SegManagement.LogDocument( + 14, "No.", 0, 0, DATABASE::Vendor, "Buy-from Vendor No.", "Purchaser Code", '', "Posting Description", ''); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(NoOfCopies; NoOfCopies) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Copies'; + ToolTip = 'Specifies how many copies of the document to print.'; + } + field(ShowInternalInformation; ShowInternalInfo) + { + ApplicationArea = Basic, Suite; + Caption = 'Show Internal Information'; + ToolTip = 'Specifies if the document shows internal information.'; + } + field(LogInteraction; LogInteraction) + { + ApplicationArea = Basic, Suite; + Caption = 'Log Interaction'; + Enabled = LogInteractionEnable; + ToolTip = 'Specifies if you want the program to log this interaction.'; + } + field(AmountInWords; AmountInWords) + { + ApplicationArea = Basic, Suite; + Caption = 'Show Total In Words'; + ToolTip = 'Specifies that you want to print total amounts as words.'; + } + field(CurrencyLCY; CurrencyLCY) + { + ApplicationArea = Basic, Suite; + Caption = 'Show LCY for FCY'; + ToolTip = 'Specifies if you want to use your own currency instead of the currency of your customers or vendors.'; + } + } + } + } + + actions + { + } + + trigger OnInit() + begin + LogInteractionEnable := true; + end; + + trigger OnOpenPage() + begin + LogInteraction := SegManagement.FindInteractionTemplateCode("Interaction Log Entry Document Type"::"Purch. Inv.") <> ''; + LogInteractionEnable := LogInteraction; + end; + } + + labels + { + } + + trigger OnInitReport() + begin + GLSetup.Get(); + CompanyInfo.Get(); + end; + + var + GLSetup: Record "General Ledger Setup"; + CompanyInfo: Record "Company Information"; + ShipmentMethod: Record "Shipment Method"; + PaymentTerms: Record "Payment Terms"; + CurrExchRate: Record "Currency Exchange Rate"; + SalesPurchPerson: Record "Salesperson/Purchaser"; + TempVATAmountLine: Record "VAT Amount Line" temporary; + DimSetEntry1: Record "Dimension Set Entry"; + DimSetEntry2: Record "Dimension Set Entry"; + RespCenter: Record "Responsibility Center"; + LanguageMgt: Codeunit Language; + FormatAddr: Codeunit "Format Address"; + SegManagement: Codeunit SegManagement; + VendAddr: array[8] of Text[100]; + ShipToAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + PurchaserText: Text[30]; + VATNoText: Text[30]; + ReferenceText: Text[35]; + OrderNoText: Text[30]; + TotalText: Text[50]; + TotalInclVATText: Text[50]; + TotalExclVATText: Text[50]; + AmountLangA: array[2] of Text[80]; + AmountLangB: array[2] of Text[80]; + MoreLines: Boolean; + NoOfCopies: Integer; + NoOfLoops: Integer; + CopyText: Text[10]; + DimText: Text[120]; + OldDimText: Text[75]; + ShowInternalInfo: Boolean; + Continue: Boolean; + LogInteraction: Boolean; + AmountInWords: Boolean; + PurchaserLbl: Label 'Purchaser'; + totalLbl: Label 'Total %1'; + TotalInclVATCaptionLbl: Label 'Total %1 Incl. VAT'; + CopyCaptionLbl: Label 'COPY'; + PurchTaxInvoiceTitleLbl: Label 'Purchase - Tax Invoice %1'; + TotalExclVATCaptionLbl: Label 'Total %1 Excl. VAT'; + CurrencyLCY: Boolean; + AmountIncLCY: Decimal; + TotalInclVATTextLCY: Text[50]; + TotalExclVATTextLCY: Text[50]; + AmountLCY: Decimal; + TypeNO: Integer; + OutputNO: Integer; + TotalLineAmt: Decimal; + TotalInvAmt: Decimal; + TotalAmt: Decimal; + TotalVATAmt: Decimal; + LogInteractionEnable: Boolean; + ShipmentMethodDescriptionCaptionLbl: Label 'Shipment Method'; + PaymentTermsDescriptionCaptionLbl: Label 'Payment Terms'; + CompanyInfoPhoneNoCaptionLbl: Label 'Phone No.'; + CompanyInfoVATRegNoCaptionLbl: Label 'VAT Registration No.'; + CompanyInfoGiroNoCaptionLbl: Label 'Giro No.'; + CompanyInfoBankNameCaptionLbl: Label 'Bank'; + CompanyInfoBankAccNoCaptionLbl: Label 'Account No.'; + DueDateCaptionLbl: Label 'Due Date'; + InvoiceNoCaptionLbl: Label 'Invoice No.'; + PostingDateCaptionLbl: Label 'Posting Date'; + CompanyInfoHomepageCapationLbl: Label 'Home Page'; + CompanyInfoEmailCaptionLbl: Label 'E-Mail'; + HeaderDimensionsCaptionLbl: Label 'Header Dimensions'; + InvoiceRefCaptionLbl: Label 'Invoice Ref.'; + DirectUnitCostCaptionLbl: Label 'Direct Unit Cost'; + PurchTaxInvLineLineDiscountCaptionLbl: Label 'Discount %'; + AmountCaptionLbl: Label 'Amount'; + InvDiscountAmountCaptionLbl: Label 'Invoice Discount Amount'; + SubtotalCaptionLbl: Label 'Subtotal'; + LineAmtInvDisAmtAmtIncluVATCaptionLbl: Label 'Payment Discount on VAT'; + ExchangeRateCaptionLbl: Label 'Exchange Rate'; + LineDimensionsCaptionLbl: Label 'Line Dimensions'; + VATAmountLineVATCaptionLbl: Label 'VAT %'; + VATBaseCaptionLbl: Label 'VAT Base'; + VATAmountLineVATAmountCaptionLbl: Label 'VAT Amount'; + VATAmountSpecificationCaptionLbl: Label 'VAT Amount Specification'; + VATAmountLineInvDisAmtCaptionLbl: Label 'Invoice Discount Amount'; + VATAmountLineInvDiscBaseAmtCaptionLbl: Label 'Invoice Discount Base Amount'; + VATAmountLineLineAmtCaptionLbl: Label 'Line Amount'; + VATAmountLineVATIdentifierCaptionLbl: Label 'VAT Identifier'; + AmountPaidCaptionLbl: Label 'Amount Paid'; + VATRealizedCaptionLbl: Label 'VAT Realized'; + VATAmountLineVATBaseCaptionLbl: Label 'Total'; + ShiptoAddressCaptionLbl: Label 'Ship-to Address'; + DocumentDateCationLbl: Label 'Document Date'; +} + diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchTaxInvoice.rdlc b/Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchInvoice.rdlc similarity index 100% rename from Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchTaxInvoice.rdlc rename to Apps/W1/WithholdingTax/app/src/Purchase/Report/WHTPurchInvoice.rdlc diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Report/WithholdingTaxCertificate.Report.al b/Apps/W1/WithholdingTax/app/src/Purchase/Report/WithholdingTaxCertificate.Report.al index 353bcc87a2..fa3bd62e60 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/Report/WithholdingTaxCertificate.Report.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/Report/WithholdingTaxCertificate.Report.al @@ -213,18 +213,16 @@ report 6790 "Withholding Tax Certificate" trigger OnAfterGetRecord() begin - if "Actual Vendor No." <> '' then - if "Actual Vendor No." <> "Bill-to/Pay-to No." then begin - Vendor.Get("Actual Vendor No."); - PrintPayToVendor := true; - end else begin - Vendor.Get("Bill-to/Pay-to No."); - PrintPayToVendor := false; - end; + if "Bill-to/Pay-to No." <> '' then begin + Vendor.Get("Bill-to/Pay-to No."); + PrintPayToVendor := false; + end; + if "Transaction Type" = "Transaction Type"::Purchase then PayToVendor.Get("Bill-to/Pay-to No.") else PaytoCustomer.Get("Bill-to/Pay-to No."); + FormatAddr.Vendor(VendAddr, Vendor); FormatAddr.Vendor(PayToVendAddr, PayToVendor); end; @@ -359,8 +357,7 @@ report 6790 "Withholding Tax Certificate" trigger OnPreReport() begin if ("WHT Entry".GetFilter("Original Document No.") = '') or - (("WHT Entry".GetFilter("Bill-to/Pay-to No.") = '') and - ("WHT Entry".GetFilter("Actual Vendor No.") = '')) + ("WHT Entry".GetFilter("Bill-to/Pay-to No.") = '') then Error(BillToVendorLbl); end; diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/TempWithholdingTaxEntry.Table.al b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/TempWithholdingTaxEntry.Table.al index 18c133f1d7..a1190db6fc 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/TempWithholdingTaxEntry.Table.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/TempWithholdingTaxEntry.Table.al @@ -301,7 +301,12 @@ table 6790 "Temp Withholding Tax Entry" field(44; "Actual Vendor No."; Code[20]) { Caption = 'Actual Vendor No.'; - DataClassification = SystemMetadata; + DataClassification = CustomerContent; +#if not CLEAN29 + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + ObsoleteReason = 'This field has been removed and is no longer required.'; +#endif } field(45; "Wthldg. Tax Certificate No."; Code[20]) { diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingGenJnlLineExt.TableExt.al b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingGenJnlLineExt.TableExt.al index 9aeb6b48e4..3ab1c376e6 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingGenJnlLineExt.TableExt.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingGenJnlLineExt.TableExt.al @@ -6,7 +6,9 @@ namespace Microsoft.WithholdingTax; using Microsoft.Finance.GeneralLedger.Journal; using Microsoft.Finance.GeneralLedger.Setup; +#if not CLEAN29 using Microsoft.Purchases.Vendor; +#endif tableextension 6793 "Withholding Gen. Jnl. Line Ext" extends "Gen. Journal Line" { @@ -154,8 +156,15 @@ tableextension 6793 "Withholding Gen. Jnl. Line Ext" extends "Gen. Journal Line" field(6803; "WHT Actual Vendor No."; Code[20]) { Caption = 'Actual Vendor No.'; +#if not CLEAN29 TableRelation = Vendor; +#endif DataClassification = CustomerContent; +#if not CLEAN29 + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + ObsoleteReason = 'This field has been removed and is no longer required.'; +#endif } } diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingPurchHeaderExt.TableExt.al b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingPurchHeaderExt.TableExt.al index 69a23f1502..a4743b3a1a 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingPurchHeaderExt.TableExt.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingPurchHeaderExt.TableExt.al @@ -5,7 +5,9 @@ namespace Microsoft.WithholdingTax; using Microsoft.Purchases.Document; +#if not CLEAN29 using Microsoft.Purchases.Vendor; +#endif tableextension 6788 "Withholding Purch. Header Ext" extends "Purchase Header" { @@ -28,8 +30,15 @@ tableextension 6788 "Withholding Purch. Header Ext" extends "Purchase Header" field(6793; "WHT Actual Vendor No."; Code[20]) { Caption = 'Actual Vendor No.'; +#if not CLEAN29 TableRelation = Vendor; +#endif DataClassification = CustomerContent; +#if not CLEAN29 + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + ObsoleteReason = 'This field has been removed and is no longer required.'; +#endif } } } \ No newline at end of file diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingPurchOrdSubform.PageExt.al b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingPurchOrdSubform.PageExt.al index b606111a50..ca30eba177 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingPurchOrdSubform.PageExt.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingPurchOrdSubform.PageExt.al @@ -22,7 +22,7 @@ pageextension 6787 "Withholding Purch Ord Subform" extends "Purchase Order Subfo { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the Withholding Tax Product Posting Group is assigned from the Product Entity selected in Purchase Line.'; - Visible = false; + Visible = true; } } } diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingTaxMgmt.Codeunit.al b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingTaxMgmt.Codeunit.al index 90ff8e4d15..de9ba6725f 100644 --- a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingTaxMgmt.Codeunit.al +++ b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WithholdingTaxMgmt.Codeunit.al @@ -49,10 +49,11 @@ codeunit 6785 "Withholding Tax Mgmt." WithholdingRevenueType: Code[10]; Dim1: Code[20]; Dim2: Code[20]; - ExtDocNo: Code[20]; + ExtDocNo: Code[35]; WithholdingReportLineNo: Code[10]; SourceCode: Code[10]; ReasonCode: Code[10]; + CountryRegionCode: Code[10]; GenBusPostGrp: Code[20]; GenProdPostGrp: Code[20]; OnesText: array[20] of Text[30]; @@ -72,7 +73,6 @@ codeunit 6785 "Withholding Tax Mgmt." NextWithholdingTaxEntryNo: Integer; ExitLoop: Boolean; UnrealizedWithholding: Boolean; - ActualVendorNo: Code[20]; CurrencyCodeSameErr: Label 'Currency Code should be same for Payment and Invoice.'; WithholdingMinInvNotConsistentErr: Label 'You cannot post a transaction using different Withholding Tax minimum invoice amounts on lines.'; DiffWithholdingPostGroupsErr: Label 'The Withholding Tax posting groups are different and thus the entries cannot be apply.'; @@ -176,6 +176,7 @@ codeunit 6785 "Withholding Tax Mgmt." GLSetup: Record "General Ledger Setup"; Vendor: Record Vendor; PrepaymentAmtDeducted: Decimal; + IsWHTAbsorbBase: Boolean; begin PurchInvLine.Reset(); PurchInvLine.SetCurrentKey("Document No.", "Wthldg. Tax Bus. Post. Group", "Wthldg. Tax Prod. Post. Group"); @@ -204,6 +205,7 @@ codeunit 6785 "Withholding Tax Mgmt." if GLSetup."Enable Withholding Tax" then begin Vendor.Get(PurchInvHeader."Pay-to Vendor No."); + IsWHTAbsorbBase := CheckWithhodingAbsorbBase(PurchInvHeader); TotalInvoiceAmount := 0; TotalInvoiceAmountLCY := 0; PurchaseInvLine.Reset(); @@ -251,6 +253,8 @@ codeunit 6785 "Withholding Tax Mgmt." PayToAccType := PayToAccType::Vendor; PayToVendCustNo := PurchInvHeader."Pay-to Vendor No."; BuyFromAccType := BuyFromAccType::Vendor; + ExtDocNo := PurchInvHeader."Vendor Invoice No."; + CountryRegionCode := PurchInvHeader."Pay-to Country/Region Code"; GenBusPostGrp := PurchInvLine."Gen. Bus. Posting Group"; GenProdPostGrp := PurchInvLine."Gen. Prod. Posting Group"; TransType := TransType::Purchase; @@ -292,7 +296,11 @@ codeunit 6785 "Withholding Tax Mgmt." AbsorbBase := 0; AmountVAT := 0; PurchInvHeader.Amount := PurchInvHeader.Amount + PurchInvLine.Amount; - AbsorbBase := AbsorbBase + PurchInvLine."Withholding Tax Absorb Base"; + if IsWHTAbsorbBase then + if PurchInvLine."Withholding Tax Absorb Base" = 0 then + AbsorbBase := AbsorbBase + PurchInvLine.Amount + else + AbsorbBase := AbsorbBase + PurchInvLine."Withholding Tax Absorb Base"; if AbsorbBase <> 0 then AmountVAT := AbsorbBase @@ -302,7 +310,11 @@ codeunit 6785 "Withholding Tax Mgmt." WithholdingBusPostGrp := PurchInvLine."Wthldg. Tax Bus. Post. Group"; WithholdingProdPostGrp := PurchInvLine."Wthldg. Tax Prod. Post. Group"; PurchInvHeader.Amount := PurchInvHeader.Amount + PurchInvLine.Amount; - AbsorbBase := AbsorbBase + PurchInvLine."Withholding Tax Absorb Base"; + if IsWHTAbsorbBase then + if PurchInvLine."Withholding Tax Absorb Base" = 0 then + AbsorbBase := AbsorbBase + PurchInvLine.Amount + else + AbsorbBase := AbsorbBase + PurchInvLine."Withholding Tax Absorb Base"; if AbsorbBase <> 0 then AmountVAT := AbsorbBase @@ -433,7 +445,8 @@ codeunit 6785 "Withholding Tax Mgmt." GenBusPostGrp := PurchCrMemoLine."Gen. Bus. Posting Group"; GenProdPostGrp := PurchCrMemoLine."Gen. Prod. Posting Group"; TransType := TransType::Purchase; - BuyFromVendCustNo := PurchCreditHeader."WHT Actual Vendor No."; + ExtDocNo := PurchCreditHeader."Vendor Cr. Memo No."; + CountryRegionCode := PurchCreditHeader."Pay-to Country/Region Code"; PostingDate := PurchCreditHeader."Posting Date"; DocDate := PurchCreditHeader."Document Date"; CurrencyCode := PurchCreditHeader."Currency Code"; @@ -521,7 +534,6 @@ codeunit 6785 "Withholding Tax Mgmt." PayToVendCustNo := GenJnlLine."Account No."; BuyFromAccType := BuyFromAccType::Vendor; BuyFromVendCustNo := GenJnlLine."Account No."; - ActualVendorNo := GenJnlLine."WHT Actual Vendor No."; ApplyDocType := GenJnlLine."Applies-to Doc. Type"; ApplyDocNo := GenJnlLine."Applies-to Doc. No."; "Applies-toID" := GenJnlLine."Applies-to ID"; @@ -547,6 +559,7 @@ codeunit 6785 "Withholding Tax Mgmt." Dim1 := GenJnlLine."Shortcut Dimension 1 Code"; Dim2 := GenJnlLine."Shortcut Dimension 2 Code"; ExtDocNo := GenJnlLine."External Document No."; + CountryRegionCode := GenJnlLine."Country/Region Code"; CurrencyCode := GenJnlLine."Currency Code"; SourceCode := GenJnlLine."Source Code"; @@ -625,10 +638,12 @@ codeunit 6785 "Withholding Tax Mgmt." WithholdingTaxEntry."Posting Date" := PostingDate; WithholdingTaxEntry."Document Date" := DocDate; WithholdingTaxEntry."Document No." := DocNo; + WithholdingTaxEntry."External Document No." := ExtDocNo; WithholdingTaxEntry."Withholding Tax %" := WithholdingPostingSetup."Withholding Tax %"; WithholdingTaxEntry."Applies-to Doc. Type" := ApplyDocType; WithholdingTaxEntry."Applies-to Doc. No." := ApplyDocNo; WithholdingTaxEntry."Source Code" := SourceCode; + WithholdingTaxEntry."Country/Region Code" := CountryRegionCode; WithholdingTaxEntry."Reason Code" := ReasonCode; WithholdingTaxEntry."Withholding Tax Revenue Type" := WithholdingPostingSetup."Revenue Type"; WithholdingTaxEntry."Document Type" := DocType; @@ -2175,7 +2190,6 @@ codeunit 6785 "Withholding Tax Mgmt." GenBusPostGrp := PurchLine."Gen. Bus. Posting Group"; GenProdPostGrp := PurchLine."Gen. Prod. Posting Group"; TransType := TransType::Purchase; - BuyFromVendCustNo := PurchInvHeader."WHT Actual Vendor No."; PostingDate := PurchInvHeader."Posting Date"; DocDate := PurchInvHeader."Document Date"; CurrencyCode := PurchInvHeader."Currency Code"; @@ -2251,7 +2265,6 @@ codeunit 6785 "Withholding Tax Mgmt." GenBusPostGrp := PurchLine."Gen. Bus. Posting Group"; GenProdPostGrp := PurchLine."Gen. Prod. Posting Group"; TransType := TransType::Purchase; - BuyFromVendCustNo := PurchHeader."WHT Actual Vendor No."; PostingDate := PurchHeader."Posting Date"; DocDate := PurchHeader."Document Date"; CurrencyCode := PurchHeader."Currency Code"; @@ -2329,7 +2342,6 @@ codeunit 6785 "Withholding Tax Mgmt." else WithholdingTaxEntry."Transaction Type" := WithholdingTaxEntry."Transaction Type"::Sale; - WithholdingTaxEntry."Actual Vendor No." := ActualVendorNo; WithholdingTaxEntry."Source Code" := SourceCode; WithholdingTaxEntry."Bill-to/Pay-to No." := PayToVendCustNo; WithholdingTaxEntry."User ID" := UserId; @@ -3587,7 +3599,6 @@ codeunit 6785 "Withholding Tax Mgmt." VendorArray: array[1000] of Code[20]; DocumentArray: array[1000] of Code[20]; WHTSlipNo: Code[20]; - ActualVendorExist: Boolean; begin x := 0; GLRegFilter := GLReg.GetFilters(); @@ -3618,12 +3629,7 @@ codeunit 6785 "Withholding Tax Mgmt." x := x + 1; - if WithholdingTaxEntry."Actual Vendor No." <> '' then begin - VendorArray[x] := WithholdingTaxEntry."Actual Vendor No."; - ActualVendorExist := true; - end else - VendorArray[x] := WithholdingTaxEntry."Bill-to/Pay-to No."; - + VendorArray[x] := WithholdingTaxEntry."Bill-to/Pay-to No."; DocumentArray[x] := WithholdingTaxEntry."Original Document No."; until WithholdingTaxEntry.Next() = 0; @@ -3660,10 +3666,7 @@ codeunit 6785 "Withholding Tax Mgmt." WithholdingTaxEntry.Reset(); WithholdingTaxEntry.SetCurrentKey("Bill-to/Pay-to No.", "Original Document No.", "Withholding Tax Revenue Type"); - if ActualVendorExist then - WithholdingTaxEntry.SetRange("Actual Vendor No.", VendorArray[PrintSlips]) - else - WithholdingTaxEntry.SetRange("Bill-to/Pay-to No.", VendorArray[PrintSlips]); + WithholdingTaxEntry.SetRange("Bill-to/Pay-to No.", VendorArray[PrintSlips]); WithholdingTaxEntry.SetRange("Original Document No.", DocumentArray[PrintSlips]); if WithholdingTaxEntry.FindSet() then repeat @@ -3683,10 +3686,7 @@ codeunit 6785 "Withholding Tax Mgmt." WithholdingTaxEntry.Reset(); WithholdingTaxEntry.SetCurrentKey("Bill-to/Pay-to No.", "Original Document No.", "Withholding Tax Revenue Type"); - if ActualVendorExist then - WithholdingTaxEntry.SetRange("Actual Vendor No.", VendorArray[PrintSlips]) - else - WithholdingTaxEntry.SetRange("Bill-to/Pay-to No.", VendorArray[PrintSlips]); + WithholdingTaxEntry.SetRange("Bill-to/Pay-to No.", VendorArray[PrintSlips]); WithholdingTaxEntry.SetRange("Original Document No.", DocumentArray[PrintSlips]); WithholdingTaxEntry.SetRange("Wthldg. Tax Certificate No.", WHTSlipNo); if WithholdingTaxEntry.FindSet() then @@ -4092,7 +4092,6 @@ codeunit 6785 "Withholding Tax Mgmt." WithholdingTaxEntry2."Applies-to Entry No." := WithholdingTaxEntry."Entry No."; WithholdingTaxEntry2."User ID" := UserId; WithholdingTaxEntry2."External Document No." := GenJnlLine."External Document No."; - WithholdingTaxEntry2."Actual Vendor No." := GenJnlLine."WHT Actual Vendor No."; WithholdingTaxEntry2."Original Document No." := GenJnlLine."Document No."; WithholdingTaxEntry2."Source Code" := GenJnlLine."Source Code"; WithholdingTaxEntry2."Transaction No." := TransactionNo; @@ -4874,7 +4873,6 @@ codeunit 6785 "Withholding Tax Mgmt." WithholdingTaxEntry2."Applies-to Entry No." := WithholdingTaxEntry."Entry No."; WithholdingTaxEntry2."User ID" := UserId; WithholdingTaxEntry2."External Document No." := GenJnlLine."External Document No."; - WithholdingTaxEntry2."Actual Vendor No." := GenJnlLine."WHT Actual Vendor No."; WithholdingTaxEntry2."Original Document No." := GenJnlLine."Document No."; WithholdingTaxEntry2."Source Code" := GenJnlLine."Source Code"; WithholdingTaxEntry2."Transaction No." := TransactionNo; @@ -4967,6 +4965,17 @@ codeunit 6785 "Withholding Tax Mgmt." exit(WithholdingTaxEntry2."Entry No." + 1); end; + local procedure CheckWithhodingAbsorbBase(PurchInvHeader: Record "Purch. Inv. Header"): Boolean + var + PurchaseInvoiceLine: Record "Purch. Inv. Line"; + begin + PurchaseInvoiceLine.SetLoadFields("Document No.", "Withholding Tax Absorb Base"); + PurchaseInvoiceLine.SetRange("Document No.", PurchInvHeader."No."); + PurchaseInvoiceLine.SetFilter("Withholding Tax Absorb Base", '<>0'); + if not PurchaseInvoiceLine.IsEmpty() then + exit(true); + end; + procedure CheckVendorWithholdingTaxLiable(GenJnlLine: Record "Gen. Journal Line"): Boolean var Vendor: Record Vendor; diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WthldgTaxPreviewHandler.Codeunit.al b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WthldgTaxPreviewHandler.Codeunit.al new file mode 100644 index 0000000000..8a8d96d2b9 --- /dev/null +++ b/Apps/W1/WithholdingTax/app/src/Purchase/Transaction/WthldgTaxPreviewHandler.Codeunit.al @@ -0,0 +1,105 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.WithholdingTax; + +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.GeneralLedger.Preview; +using Microsoft.Foundation.Navigate; +using Microsoft.Purchases.Posting; + +codeunit 6792 "Wthldg Tax Preview Handler" +{ + SingleInstance = true; + + var + TempWithholdingTaxEntry: Record "Withholding Tax Entry" temporary; + PreviewPosting: Boolean; + DocumentNoTxt: Label '***', Locked = true; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Posting Preview Event Handler", 'OnGetEntries', '', false, false)] + local procedure WithholdingTaxEntry(TableNo: Integer; var RecRef: RecordRef) + begin + case TableNo of + Database::"Withholding Tax Entry": + RecRef.GetTable(TempWithholdingTaxEntry); + end; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Posting Preview Event Handler", 'OnAfterShowEntries', '', false, false)] + local procedure WithholdingTaxShowEntries(TableNo: Integer) + begin + case TableNo of + Database::"Withholding Tax Entry": + Page.Run(Page::"Withholding Tax Entries", TempWithholdingTaxEntry); + end; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Posting Preview Event Handler", 'OnAfterFillDocumentEntry', '', false, false)] + local procedure FillWithholdingTaxEntries(var DocumentEntry: Record "Document Entry") + var + PostingPreviewEventHandler: Codeunit "Posting Preview Event Handler"; + begin + PostingPreviewEventHandler.InsertDocumentEntry(TempWithholdingTaxEntry, DocumentEntry); + end; + + [EventSubscriber(ObjectType::Table, Database::"Withholding Tax Entry", 'OnAfterInsertEvent', '', false, false)] + local procedure SavePreviewWithholdingTaxEntry(var Rec: Record "Withholding Tax Entry"; RunTrigger: Boolean) + begin + if not PreviewPosting then + exit; + + if Rec.IsTemporary() then + exit; + + TempWithholdingTaxEntry := Rec; + TempWithholdingTaxEntry."Document No." := DocumentNoTxt; + TempWithholdingTaxEntry.Insert(); + end; + + [EventSubscriber(ObjectType::Page, Page::Navigate, 'OnBeforeShowRecords', '', false, false)] + local procedure ShowEntries(DocNoFilter: Text; PostingDateFilter: Text; var TempDocumentEntry: Record "Document Entry"; var IsHandled: Boolean) + var + WithholdingTaxEntries: Record "Withholding Tax Entry"; + begin + case TempDocumentEntry."Table ID" of + Database::"Withholding Tax Entry": + begin + WithholdingTaxEntries.Reset(); + WithholdingTaxEntries.SetRange("Document No.", DocNoFilter); + WithholdingTaxEntries.SetFilter("Posting Date", PostingDateFilter); + Page.Run(0, WithholdingTaxEntries); + IsHandled := true; + end; + end; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post", 'OnBeforePostPurchaseDoc', '', false, false)] + local procedure OnBeforePostPurchaseDoc() + begin + TempWithholdingTaxEntry.Reset(); + if not TempWithholdingTaxEntry.IsEmpty() then + TempWithholdingTaxEntry.DeleteAll(); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post", OnBeforeCode, '', false, false)] + local procedure OnBeforeGenJnlDoc() + begin + TempWithholdingTaxEntry.Reset(); + if not TempWithholdingTaxEntry.IsEmpty() then + TempWithholdingTaxEntry.DeleteAll(); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Preview", 'OnAfterBindSubscription', '', false, false)] + local procedure OnAfterBindSubscription() + begin + PreviewPosting := true; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Preview", 'OnAfterUnBindSubscription', '', false, false)] + local procedure OnAfterUnBindSubscription() + begin + PreviewPosting := false; + end; +} \ No newline at end of file diff --git a/Apps/W1/WorldPayPaymentsStandard/app/app.json b/Apps/W1/WorldPayPaymentsStandard/app/app.json index ef8f0223e0..7384a4fe2c 100644 --- a/Apps/W1/WorldPayPaymentsStandard/app/app.json +++ b/Apps/W1/WorldPayPaymentsStandard/app/app.json @@ -18,7 +18,7 @@ }, "dependencies": [], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 1, diff --git a/Apps/W1/WorldPayPaymentsStandard/test/app.json b/Apps/W1/WorldPayPaymentsStandard/test/app.json index fdcebc6a8c..b8ec5b95e7 100644 --- a/Apps/W1/WorldPayPaymentsStandard/test/app.json +++ b/Apps/W1/WorldPayPaymentsStandard/test/app.json @@ -38,7 +38,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "idRanges": [ { "from": 139500, diff --git a/Other/Tests/BCPT-SampleTests/app.json b/Other/Tests/BCPT-SampleTests/app.json index 0eefbaf647..0b6fd06a18 100644 --- a/Other/Tests/BCPT-SampleTests/app.json +++ b/Other/Tests/BCPT-SampleTests/app.json @@ -19,7 +19,7 @@ } ], "screenshots": [], - "platform": "28.0.0.0", + "platform": "29.0.0.0", "application": "29.0.0.0", "idRanges": [ {