From 6554d4db9b69803db0fc508eb2faaea055a18a88 Mon Sep 17 00:00:00 2001 From: Jesper Schulz-Wedde Date: Mon, 2 Feb 2026 17:35:19 +0100 Subject: [PATCH] Syncing with version 28.0.45539.0 --- .github/AL-Go-Settings.json | 2 +- .../app/AppResources/AT_DataExchDefMap.xml | 2 +- .../AUContosoLocalization.Codeunit.al | 5 +- .../CreateAllocationAccountAU.Codeunit.al | 7 +- .../CreateDemoEDocsAU.Codeunit.al | 27 +- .../CreateEDocSampleInvAU.Codeunit.al | 4 +- .../CreateDeferralTemplateBE.Codeunit.al | 22 + .../CreateGLAccountBE.Codeunit.al | 2 + .../CreatePostingGroupBE.Codeunit.al | 4 + .../ContosoCoffeeDemoDatasetBE/app/app.json | 2 +- .../CreateDemoEDocsBE.Codeunit.al | 115 + .../CreateEDocSampleInvBE.Codeunit.al | 57 + .../demo data/EDocDemodataBE.Codeunit.al | 34 + .../EDocument_BE/demo data/ExtensionLogo.png | Bin 0 -> 5201 bytes Apps/BE/EDocument_BE/demo data/app.json | 58 + .../AppResources/BE_DataExchDefMapRcptE.xml | 2 +- .../CAContosoLocalization.Codeunit.al | 3 +- .../CreateCAGLAccounts.Codeunit.al | 3 +- .../CreateAllocationAccountCA.Codeunit.al | 20 +- .../CreateDemoEDocsCA.Codeunit.al | 27 +- .../CreateEDocSampleInvCA.Codeunit.al | 4 +- .../CreateAllocationAccountCH.Codeunit.al | 22 + .../CreateGLAccountCZ.Codeunit.al | 2 +- .../PageExtensions/UserSetupCZL.PageExt.al | 10 +- .../TableExtensions/UserSetupCZL.TableExt.al | 15 + .../DEContosoLocalization.Codeunit.al | 7 +- .../CreateAllocationAccountDE.Codeunit.al | 20 +- .../ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al | 5 +- .../ZUGFeRD/PostedSalesInvoice.ReportExt.al | 2 - .../CreateDemoEDocsDE.Codeunit.al | 29 +- .../CreateEDocSampleInvDE.Codeunit.al | 4 +- .../src/ZUGFeRDCustomSalesInvoice.Report.al | 1 - .../app/AppResources/DE_DataExchDefMap.xml | 2 +- .../DKContosoLocalization.Codeunit.al | 7 +- .../CreateDeferralTemplateDK.Codeunit.al | 8 +- .../1.Setup Data/CreateGLAccDK.Codeunit.al | 2 + .../CreateAllocationAccountDK.Codeunit.al | 20 +- .../CreateDemoEDocsDK.Codeunit.al | 29 +- .../CreateEDocSampleInvDK.Codeunit.al | 4 +- .../ESContosoLocalization.Codeunit.al | 3 +- .../CreateDeferralTemplateES.Codeunit.al | 8 +- .../CreateESGLAccounts.Codeunit.al | 2 + .../CreateAllocationAccountES.Codeunit.al | 20 +- .../app/src/Core/VerifactuExport.Codeunit.al | 8 +- .../app/src/Data/VerifactuSetup.Table.al | 6 +- .../CreateDemoEDocsES.Codeunit.al | 29 +- .../CreateEDocSampleInvES.Codeunit.al | 4 +- .../app/AppResources/ES_DataExchDefMap.xml | 2 +- .../CreateAllocationAccountFI.Codeunit.al | 22 + .../AppResources/FI_DataExchDefMapRcpt.xml | 2 +- .../AppResources/FI_DataExchDefMapShpt.xml | 2 +- .../CreateBankAccountFR.Codeunit.al | 16 + .../ContosoFRLocalization.Codeunit.al | 1 - .../CreateAllocationAccountFR.Codeunit.al | 5 + .../CreateDemoEDocsFR.Codeunit.al | 29 +- .../CreateEDocSampleInvFR.Codeunit.al | 4 +- .../ExportEngine/GenerateFileFEC.Codeunit.al | 36 +- .../src/FECAuditFileExportTests.Codeunit.al | 35 +- .../app/Permissions/frpms.permissionset.al | 5 +- ...ISVPaymentManagementFR.PermissionSetExt.al | 12 + ...SICPaymentManagementFR.PermissionSetExt.al | 12 + ...EADPaymentManagementFR.PermissionSetExt.al | 13 + ...BERPaymentManagementFR.PermissionSetExt.al | 13 + .../app/Permissions/Local.PermissionSetExt.al | 22 + .../Permissions/LocalRead.PermissionSetExt.al | 22 + .../PaymentManagementFRFull.PermissionSet.al | 25 + .../PaymentManagementFRRM.PermissionSet.al | 25 + .../PaymentManagementFRRead.PermissionSet.al | 23 + .../PaymentMgtFRObjectsX.PermissionSet.al | 59 + Apps/FR/PaymentManagementFR/app/app.json | 41 + .../PaymentManagementFR/app/extensionlogo.png | Bin 0 -> 5201 bytes .../Codeunits/FeaturePaymentMgtFR.Codeunit.al | 301 + .../LocalNavigateHandlerFR.Codeunit.al | 100 + .../src/Codeunits/PaymentApplyFR.Codeunit.al | 450 + .../Codeunits/PaymentManagementFR.Codeunit.al | 1179 ++ .../PaymentManagementFeatureFR.Codeunit.al | 37 + .../PaymentMgtSubscribersFR.Codeunit.al | 531 + .../app/src/Codeunits/RIBKeyFR.Codeunit.al | 62 + .../UpgTagPaymentManagementFR.Codeunit.al | 23 + .../UpgradePaymentManagementFR.Codeunit.al | 116 + .../src/Enum/PaymentStepActionTypeFR.Enum.al | 18 + .../FeaturePaymentMgtFR.EnumExt.al | 21 + .../AccPayablesCoordinatorRC.PageExt.al | 95 + .../AccReceivablesAdmRC.PageExt.al | 92 + .../AccountingManagerRoleCenter.PageExt.al | 100 + .../PageExtensions/BankAccountCard.PageExt.al | 88 + .../BookkeeperRoleCenter.PageExt.al | 90 + .../CashReceiptJournal.PageExt.al | 57 + .../CustomerBankAccountCard.PageExt.al | 73 + .../PageExtensions/CustomerCard.PageExt.al | 90 + .../FinanceManagerRoleCenter.PageExt.al | 99 + .../SmallBusinessOwnerRC.PageExt.al | 103 + .../VendorBankAccountCard.PageExt.al | 73 + .../src/PageExtensions/VendorCard.PageExt.al | 90 + .../app/src/Pages/PaymentAddressesFR.Page.al | 120 + .../src/Pages/PaymentBankArchiveFR.Page.al | 120 + .../app/src/Pages/PaymentBankFR.Page.al | 118 + .../app/src/Pages/PaymentClassFR.Page.al | 184 + .../app/src/Pages/PaymentClassListFR.Page.al | 40 + .../Pages/PaymentLineModificationFR.Page.al | 96 + .../Pages/PaymentLinesArchiveListFR.Page.al | 177 + .../app/src/Pages/PaymentLinesListFR.Page.al | 245 + .../app/src/Pages/PaymentReportFR.Page.al | 71 + .../src/Pages/PaymentSlipArchiveFR.Page.al | 188 + .../app/src/Pages/PaymentSlipFR.Page.al | 396 + .../Pages/PaymentSlipListArchiveFR.Page.al | 57 + .../app/src/Pages/PaymentSlipListFR.Page.al | 78 + .../Pages/PaymentSlipSubformArchiveFR.Page.al | 227 + .../src/Pages/PaymentSlipSubformFR.Page.al | 481 + .../app/src/Pages/PaymentStatusFR.Page.al | 85 + .../app/src/Pages/PaymentStatusListFR.Page.al | 74 + .../app/src/Pages/PaymentStepCardFR.Page.al | 271 + .../app/src/Pages/PaymentStepLedgerFR.Page.al | 255 + .../src/Pages/PaymentStepLedgerListFR.Page.al | 105 + .../app/src/Pages/PaymentStepsFR.Page.al | 37 + .../app/src/Pages/PaymentStepsListFR.Page.al | 58 + .../src/Pages/ViewEditPaymentLineFR.Page.al | 66 + .../Reports/ArchivePaymentSlipsFR.Report.al | 72 + .../app/src/Reports/Bill.rdlc | 2583 +++ .../app/src/Reports/BillFR.Report.al | 245 + .../app/src/Reports/Draft.rdlc | 2714 +++ .../app/src/Reports/DraftFR.Report.al | 242 + .../app/src/Reports/Draftnotice.rdlc | 3289 ++++ .../app/src/Reports/DraftnoticeFR.Report.al | 498 + .../app/src/Reports/Draftrecapitulation.rdlc | 3913 +++++ .../Reports/DraftrecapitulationFR.Report.al | 447 + .../Reports/DuplicateparameterFR.Report.al | 150 + .../app/src/Reports/ETEBACFilesFR.Report.al | 339 + .../GLCustLedgerReconciliation.Report.al | 263 + .../Reports/GLCustLedgerReconciliation.rdlc | 245 + .../GLVendLedgerReconciliation.Report.al | 263 + .../Reports/GLVendLedgerReconciliation.rdlc | 245 + .../app/src/Reports/PaymentList.rdlc | 1133 ++ .../app/src/Reports/PaymentListFR.Report.al | 104 + .../Reports/RecapitulationFormFR.Report.al | 315 + .../app/src/Reports/RecapitulationFormFR.rdlc | 3117 ++++ .../app/src/Reports/Remittance.rdlc | 3587 ++++ .../app/src/Reports/RemittanceFR.Report.al | 457 + .../app/src/Reports/SEPAISO20022FR.Report.al | 534 + .../src/Reports/SuggestCustPayments.Report.al | 461 + .../src/Reports/SuggestVendPayments.Report.al | 526 + .../app/src/Reports/WithdrawFR.Report.al | 341 + .../app/src/Reports/Withdrawnotice.rdlc | 3382 ++++ .../src/Reports/WithdrawnoticeFR.Report.al | 511 + .../src/Reports/Withdrawrecapitulation.rdlc | 2991 ++++ .../WithdrawrecapitulationFR.Report.al | 459 + .../TableExtensions/BankAccount.TableExt.al | 60 + .../src/TableExtensions/Customer.TableExt.al | 27 + .../CustomerBankAccount.TableExt.al | 59 + .../GeneralLedgerSetup.TableExt.al | 31 + .../src/TableExtensions/Vendor.TableExt.al | 27 + .../VendorBankAccount.TableExt.al | 59 + .../src/Tables/BankAccountBufferFR.Table.al | 44 + .../app/src/Tables/PaymentAddressFR.Table.al | 133 + .../app/src/Tables/PaymentClassFR.Table.al | 170 + .../Tables/PaymentHeaderArchiveFR.Table.al | 251 + .../app/src/Tables/PaymentHeaderFR.Table.al | 702 + .../src/Tables/PaymentLineArchiveFR.Table.al | 348 + .../app/src/Tables/PaymentLineFR.Table.al | 891 + .../src/Tables/PaymentPostBufferFR.Table.al | 394 + .../app/src/Tables/PaymentStatusFR.Table.al | 120 + .../app/src/Tables/PaymentStepFR.Table.al | 165 + .../src/Tables/PaymentStepLedgerFR.Table.al | 125 + .../ImportExportParametersFR.XmlPort.al | 211 + Apps/FR/PaymentManagementFR/test/app.json | 53 + .../test/extensionlogo.png | Bin 0 -> 5201 bytes .../ERMDimensionSubscriberFR.Codeunit.al | 32 + .../CloudMigCountryTables.Codeunit.al | 31 + .../RegularTests/ERMBankAccountFR.Codeunit.al | 251 + .../RegularTests/ERMFRFeatureBugs.Codeunit.al | 236 + .../ERMPaymentManagement.Codeunit.al | 3393 ++++ .../ERMPaymentManagementII.Codeunit.al | 1056 ++ .../RegularTests/ERMPaymentSlip.Codeunit.al | 358 + .../ERMPaymentToleranceFR.Codeunit.al | 666 + .../test/src/RegularTests/ERMSEPA.Codeunit.al | 302 + .../SEPA02DDFunctionalTest.Codeunit.al | 950 ++ .../SEPA03CTFunctionalTest.Codeunit.al | 521 + .../RegularTests/SEPA03CTUnitTest.Codeunit.al | 1007 ++ .../SEPA08DDFunctionalTest.Codeunit.al | 952 ++ .../SEPA09CTFunctionalTest.Codeunit.al | 522 + .../UTArchiveTableValidation.Codeunit.al | 63 + .../src/RegularTests/UTBANKACC.Codeunit.al | 298 + .../UTREPPaymentManagement.Codeunit.al | 849 + .../UTREPPaymentManagementII.Codeunit.al | 582 + .../src/RegularTests/UTRemittance.Codeunit.al | 228 + .../test/src/RegularTests/UTSEPA.Codeunit.al | 824 + .../UTTABPaymentManagement.Codeunit.al | 908 + .../LibraryLocalizationFR.Codeunit.al | 94 + .../CreateAllocationAccountGB.Codeunit.al | 20 +- .../GBContosoLocalization.Codeunit.al | 3 +- .../CreateDemoEDocsGB.Codeunit.al | 27 +- .../CreateEDocSampleInvGB.Codeunit.al | 4 +- Apps/GB/GovTalk/app/app.json | 8 - .../AppResources/GB_DataExchDefMapRcpt.xml | 2 +- .../AppResources/GB_DataExchDefMapShpt.xml | 2 +- .../src/Codeunit/GSTDistribution.Codeunit.al | 2 + .../0cded40a-a359-45e0-aaec-afe7bbcfbc96.json | 10298 ++++++------ .../1e42fdf3-1868-4205-a6d6-d2fc67bd132f.json | 13764 ++++++++-------- .../33bfbe99-9140-4112-a55b-35ec0d9b61b9.json | 11440 ++++++------- .../3EFD6FE9-72B2-427F-A254-C36E7CA61D6D.json | 7278 ++++++++ .../430D7BC2-7F79-4B77-A16C-63C758DA1FD0.json | 7122 ++++++++ .../5F2E69B7-0288-468A-83C8-D6A2AF993782.json | 5564 +++++++ .../CC412FD1-030F-4F28-BBDC-46F25D2B7BF3.json | 6066 +++++++ .../E3446842-7BE3-448E-A055-2BBA1A627C6E.json | 6135 +++++++ .../f8bf58d9-7681-458d-9dfc-71ea23a9f853.json | 12702 +++++++------- .../TDSTaxConfiguration.Codeunit.al | 13 +- .../src/page/TDSConcessionalCodes.Page.al | 5 + .../src/table/TDSConcessionalCode.Table.al | 21 + .../src/codeunit/TDSSubscribers.Codeunit.al | 214 + .../pageextension/PurchaseInvoice.PageExt.al | 6 + .../pageextension/PurchaseOrder.PageExt.al | 6 + .../tableextension/PurchaseHeader.TableExt.al | 6 + .../test/TDSBase/src/LibraryTDS.Codeunit.al | 33 + .../src/TDSOnPurchaseInvoice.Codeunit.al | 87 + .../app/Translations/India Tax Base.en-US.xlf | 2 +- .../CreateAllocationAccountIT.Codeunit.al | 6 + .../ITContosoLocalization.Codeunit.al | 6 +- .../CreateDemoEDocsIT.Codeunit.al | 36 +- .../CreateEDocSampleInvIT.Codeunit.al | 4 +- .../test/.resources/CobrandTokenOK.txt | 1 + .../test/.resources/ConsumerTokenOK.txt | 1 + .../DuplicateSiteAccountsDetails.txt | 1 + .../test/.resources/Empty.txt | 1 + .../test/.resources/FastlinkTokenOK.txt | 1 + .../test/.resources/SiteAccounts.txt | 1 + .../test/.resources/SiteAccountsDetails.txt | 1 + .../.resources/SiteAccountsDetailsMFA.txt | 1 + .../test/.resources/StaleTokens.txt | 1 + .../test/.resources/Status403.txt | 1 + .../test/.resources/Status404.txt | 1 + .../test/.resources/Status500.txt | 1 + .../test/.resources/refreshdata.txt | 1 + .../test/.resources/refreshdatadone.txt | 1 + .../test/.resources/transactions.json | 1 + .../NA/EnvestnetYodleeBankFeeds/test/app.json | 5 +- .../src/MSYodleeBankServiceTests.Codeunit.al | 264 +- .../DemoData/CreateNLGLAccounts.Codeunit.al | 6 +- .../CreateAllocationAccountNL.Codeunit.al | 24 + .../CreatePostingGroupsNL.Codeunit.al | 1 + .../NLContosoLocalization.Codeunit.al | 4 +- .../ContosoCoffeeDemoDatasetNL/app/app.json | 2 +- .../CreateDemoEDocsNL.Codeunit.al | 115 + .../CreateEDocSampleInvNL.Codeunit.al | 57 + .../demo data/EDocDemodataNL.Codeunit.al | 34 + .../EDocument_NL/demo data/ExtensionLogo.png | Bin 0 -> 5201 bytes Apps/NL/EDocument_NL/demo data/app.json | 58 + .../app/AppResources/NL_DataExchDefMap.xml | 2 +- .../CreatePostingGroupsNO.Codeunit.al | 2 + .../CreateDemoEDocsNO.Codeunit.al | 115 + .../CreateEDocSampleInvNO.Codeunit.al | 57 + .../demo data/EDocDemodataNO.Codeunit.al | 34 + .../EDocument_NO/demo data/ExtensionLogo.png | Bin 0 -> 5201 bytes Apps/NO/EDocument_NO/demo data/app.json | 58 + .../CreateAllocationAccountNZ.Codeunit.al | 7 +- .../NZContosoLocalization.Codeunit.al | 5 +- .../CreateDemoEDocsNZ.Codeunit.al | 25 +- .../CreateEDocSampleInvNZ.Codeunit.al | 4 +- .../CreatePostingGroupsSE.Codeunit.al | 2 + .../CreateDemoEDocsSE.Codeunit.al | 115 + .../CreateEDocSampleInvSE.Codeunit.al | 57 + .../demo data/EDocDemodataSE.Codeunit.al | 34 + .../EDocument_SE/demo data/ExtensionLogo.png | Bin 0 -> 5201 bytes Apps/SE/EDocument_SE/demo data/app.json | 58 + .../app/AppResources/DataExchDefMap.xml | 2 +- .../CreateAccScheduleNameUS.Codeunit.al | 4 +- .../CreateColumnLayoutNameUS.Codeunit.al | 6 +- .../CreateFinancialReportUS.Codeunit.al | 6 +- .../CreateAllocationAccountUS.Codeunit.al | 20 +- .../USContosoLocalization.Codeunit.al | 3 +- .../CreateDemoEDocsUS.Codeunit.al | 27 +- .../CreateEDocSampleInvUS.Codeunit.al | 4 +- ...365TeamMemberExtHSLUS.PermissionSetExt.al} | 0 ...elligentCloudExtHSLUS.PermissionSetExt.al} | 0 Apps/US/HybridSL_US/app/app.json | 12 +- .../Codeunits/SLCloudMigrationUS.Codeunit.al | 2 +- .../SLPopulateVendor1099Data.Codeunit.al | 11 +- ...Page.al => SL1099MigrationLogList.Page.al} | 0 .../SLCompanyAddSettingsExt.TableExt.al | 4 +- Apps/US/HybridSL_US/test/app.json | 14 +- .../test/src/SLAPBalancesData.XmlPort.al | 2 +- .../Document/IRS1099FormDocsImpl.Codeunit.al | 55 +- .../src/Document/IRS1099FormDocuments.Page.al | 19 + .../IRS1099BaseAppSubscribers.Codeunit.al | 9 + .../src/IRIS/GenerateXmlFileIRIS.Codeunit.al | 16 +- .../app/src/IRIS/HelperIRIS.Codeunit.al | 4 +- .../src/IRIS/KeyVaultClientIRIS.Codeunit.al | 116 +- .../src/IRIS/ProcessResponseIRIS.Codeunit.al | 19 +- .../IRIS/ProcessTransmissionIRIS.Codeunit.al | 34 +- .../app/src/IRIS/SetupIRISUserID.Page.al | 6 +- .../app/src/IRIS/TransmissionIRIS.Page.al | 18 +- .../IRS1099IRISConfiguration.Interface.al | 43 + .../src/Interface/IRSFormsFacade.Codeunit.al | 25 + .../Interface/IRSFormsImplementation.Enum.al | 8 +- .../IRSFormsOrchestrator.Codeunit.al | 5 + .../app/src/Printing/IRS1099Print.Report.al | 2 +- .../Reporting/IRS1099VendorOverview.Page.al | 2 + .../app/src/Setup/IRSFormsData.Codeunit.al | 2 - .../src/Setup/IRSReportingPeriod.Codeunit.al | 11 + .../IRS1099FormBoxCalcImpl.Codeunit.al | 6 +- Apps/US/IRSForms/test library/app.json | 4 + .../src/IRSFormsImplTest.EnumExt.al | 13 + .../src/LibraryIRS1099Document.Codeunit.al | 35 + .../src/LibraryIRS1099IRIS.Codeunit.al | 111 + .../src/MockKeyVaultClientIRIS.Codeunit.al | 99 + .../test/src/IRS1099DocumentTests.Codeunit.al | 62 + .../test/src/IRS1099FormCalcTests.Codeunit.al | 108 +- .../test/src/IRS1099IRISTests.Codeunit.al | 216 + .../test/src/IRS1099LiableTests.Codeunit.al | 54 + .../test/src/IRS1099VendorTests.Codeunit.al | 85 + .../APIV2WorkflowEventHandler.Codeunit.al | 29 - .../pages/APIV2RequisitionWkshName.Page.al | 64 - .../test/.resources/TestSuites/Accuracy.xml | 2 +- .../CreateAccScheduleName.Codeunit.al | 6 +- .../CreateColumnLayoutName.Codeunit.al | 32 +- .../CreateDeferralTemplate.Codeunit.al | 19 + .../CreateAllocationAccount.Codeunit.al | 60 + .../CreateFinancialReport.Codeunit.al | 22 +- .../Finance/FinanceModule.Codeunit.al | 1 + .../Finance/FinanceModuleSetup.Table.al | 10 + .../Contoso Helpers/ContosoSales.Codeunit.al | 2 +- .../src/OutlookIntegrationImpl.Codeunit.al | 1 + .../app/src/SMTPAccountWizard.Page.al | 2 +- .../test/src/SMTPAccountAuthTests.Codeunit.al | 109 + Apps/W1/ExciseTaxes/app/ExtensionLogo.png | Bin 0 -> 6773 bytes Apps/W1/ExciseTaxes/app/app.json | 40 + .../ExciseTaxesAdmin.permissionset.al | 14 + .../ExciseTaxesEdit.permissionset.al | 19 + .../ExciseTaxesObjects.permissionset.al | 22 + .../ExciseTaxesRead.permissionset.al | 19 + .../d365BasicExciseTaxes.PermissionsetExt.al | 12 + ...sFullAccessExciseTaxes.PermissionsetExt.al | 12 + .../d365ReadExciseTaxes.PermissionsetExt.al | 12 + ...5TeamMemberExciseTaxes.PermissionsetExt.al | 12 + .../codeunit/ExciseTaxCalculation.Codeunit.al | 302 + .../ExciseTaxTransSubscriber.Codeunit.al | 87 + .../app/src/enum/ExciseEntryType.Enum.al | 39 + .../app/src/enum/ExciseSourceType.Enum.al | 24 + .../app/src/enum/ExciseTaxBasis.Enum.al | 31 + .../page/ExciseTaxEntryPermissions.Page.al | 75 + .../app/src/page/ExciseTaxItemFARates.Page.al | 55 + .../app/src/page/ExciseTaxTypeCard.Page.al | 80 + .../app/src/page/ExciseTaxTypes.Page.al | 70 + .../ExciseFixedAssetCardExt.PageExt.al | 36 + .../ExciseItemCardExt.PageExt.al | 36 + .../ExciseItemLedgerEntriesExt.PageExt.al | 22 + .../ExciseJournalBatchExt.PageExt.al | 22 + .../ExciseJournalLineExt.PageExt.al | 101 + .../ExciseTaxTransLogExt.PageExt.al | 116 + .../CreateExciseTaxJnlEntries.Report.al | 197 + .../table/ExciseTaxEntryPermission.Table.al | 93 + .../src/table/ExciseTaxItemFARate.Table.al | 172 + .../app/src/table/ExciseTaxType.Table.al | 63 + .../ExciseFALedgerEntryExt.TableExt.al | 20 + .../ExciseFixedAssetExt.TableExt.al | 74 + .../tableextension/ExciseItemExt.TableExt.al | 70 + .../ExciseItemLedgerEntryExt.TableExt.al | 20 + .../ExciseJournalLineExt.TableExt.al | 136 + .../ExciseTaxesTransLogExt.TableExt.al | 65 + .../SustainabilityBatchExcise.TableExt.al | 40 + Apps/W1/ExciseTaxes/test/ExtensionLogo.png | Bin 0 -> 5446 bytes Apps/W1/ExciseTaxes/test/app.json | 65 + .../src/ExciseTaxCalculationTests.Codeunit.al | 746 + .../test/src/LibraryExciseTax.Codeunit.al | 212 + .../src/codeunits/HybridBCWizard.Codeunit.al | 5 +- .../codeunits/HybridBCLastWizard.Codeunit.al | 5 +- .../app/Permissions/HBDEdit.PermissionSet.al | 5 + .../Permissions/HBDObjects.PermissionSet.al | 5 + .../app/Permissions/HBDRead.PermissionSet.al | 5 + .../INTELLIGENTCLOUDHBD.PermissionSetExt.al | 7 + .../d365basicHBD.permissionsetext.al | 7 + .../d365basicisvHBD.permissionsetext.al | 7 + .../d365teammemberHBD.permissionsetext.al | 7 + .../CustomMigrationProvider.Codeunit.al | 123 + .../CustomMigrationProvider.Enum.al | 20 + .../CustomMigrationProvider.Interface.al | 54 + .../CustomMigrationTableMapping.Interface.al | 49 + .../OnPremMigrationHandler.Codeunit.al | 273 + .../AddCustomMigrationMapping.Page.al | 240 + .../CustomMigrationMappingList.Page.al | 194 + .../CustomMigrationTableBuffer.Table.al | 307 + .../MigrationSetupTableMapping.Table.al | 62 + .../ReplicationTableMapping.Table.al | 63 + .../codeunits/CalculateAmounts.Codeunit.al | 5 + .../CloudMigReplicateDataMgt.Codeunit.al | 148 +- .../src/codeunits/CloudMigUpgrade.codeunit.al | 5 + .../codeunits/CreateCompaniesIC.Codeunit.al | 17 +- .../DataLakeMigrationCleanup.Codeunit.al | 5 + .../FixDataOnRunCompleted.Codeunit.al | 5 + .../HandleCreateCompanyFailure.Codeunit.al | 5 + .../HandleFixDataFailure.Codeunit.al | 5 + .../codeunits/HybridCloudInstall.Codeunit.al | 5 + .../HybridCloudManagement.Codeunit.al | 116 +- .../HybridCompanyInitialize.Codeunit.al | 5 + .../HybridCueSetupManagement.Codeunit.al | 5 + .../codeunits/HybridFilterCompanies.Page.al | 5 + .../HybridHandleCompInitError.Codeunit.al | 5 + .../HybridMessageManagement.Codeunit.al | 5 + .../HybridReplicationStatistics.Codeunit.al | 5 + .../HybridScheduledTaskMgr.Codeunit.al | 5 + .../IntelligentCloudNotifier.Codeunit.al | 5 + .../codeunits/NotificationHandler.Codeunit.al | 5 + .../PostMigrationNotificaton.Codeunit.al | 5 + .../RecordLinkMigrationWarning.Codeunit.al | 5 + .../codeunits/TelemetrySubscriber.Codeunit.al | 5 + .../codeunits/TenantMediaWarning.Codeunit.al | 5 + .../W1/HybridBaseDeployment/app/src/dotnet.al | 5 + .../enums/CloudMigrationWarningType.Enum.al | 5 + .../src/enums/MigrationMappingType.Enum.al | 20 + .../CloudMigrationWarning.Interface.al | 5 + .../pages/AddMigrationTableMappings.Page.al | 27 +- .../src/pages/CloudMigChangeDataLog.Page.al | 5 + .../src/pages/CloudMigSelectTables.Page.al | 5 + .../src/pages/CloudMigrationADLSetup.Page.al | 5 + .../pages/CloudMigrationManagement.Page.al | 94 +- .../pages/CloudMigrationSanitizeTable.Page.al | 5 + .../src/pages/CloudMigrationWarnings.Page.al | 5 + .../pages/DatabaseSizeTooLargeDialog.Page.al | 5 + .../HybridAccountantActivities.PageExt.al | 6 +- .../src/pages/HybridCloudSetupWizard.Page.al | 178 +- .../app/src/pages/HybridCompanies.Page.al | 5 + .../app/src/pages/HybridCompaniesList.Page.al | 5 + .../pages/HybridCompaniesManagement.Page.al | 5 + .../app/src/pages/HybridDAApproval.Page.al | 5 + .../app/src/pages/HybridMigrationLog.Page.al | 5 + .../src/pages/HybridO365Activities.PageExt.al | 5 + .../app/src/pages/HybridProductTypes.Page.al | 41 + .../src/pages/IntelligentCloudDetails.Page.al | 5 + .../pages/IntelligentCloudManagement.Page.al | 43 +- .../pages/IntelligentCloudNotMigrated.Page.al | 6 +- .../src/pages/IntelligentCloudReady.Page.al | 6 +- .../pages/IntelligentCloudStatFactbox.Page.al | 5 + .../src/pages/IntelligentCloudUpdate.Page.al | 14 +- .../src/pages/IntelligentEdgeInsights.Page.al | 5 + .../app/src/pages/IntelligentEdgeKPIs.Page.al | 5 + .../src/pages/MigrationTableMapping.Page.al | 5 + .../src/pages/MigrationTableOverview.Page.al | 5 + .../src/pages/MigrationUserMapping.Page.al | 6 +- .../app/src/pages/PauseCloudMigration.Page.al | 5 + .../src/pages/PostMigrationChecklist.Page.al | 6 +- .../HybridEnabledCoRepDetails.Query.al | 5 + .../HybridTablesForReplication.Query.al | 5 + .../queries/HybridUniqueTableStatus.Query.al | 5 + .../tables/CloudMigrationADLSetup.Table.al | 5 + .../tables/CloudMigrationOverrideLog.Table.al | 5 + .../src/tables/CloudMigrationWarning.Table.al | 5 + .../src/tables/HybridActivitesCue.TableExt.al | 5 + .../app/src/tables/HybridCompany.Table.al | 5 + .../src/tables/HybridCompanyStatus.Table.al | 5 + .../app/src/tables/HybridDAApproval.Table.al | 5 + .../src/tables/HybridFinanceCue.TableExt.al | 5 + .../app/src/tables/HybridProductType.Table.al | 11 + .../tables/HybridReplicationDetail.Table.al | 5 + .../tables/HybridReplicationSummary.Table.al | 5 + .../app/src/tables/HybridTableStatus.Table.al | 5 + .../IntelligentCloudNotMigrated.Table.al | 5 + .../src/tables/IntelligentCloudSetup.Table.al | 22 +- .../src/tables/MigrationTableMapping.Table.al | 48 +- .../app/src/tables/MigrationTableType.Enum.al | 6 +- .../tables/PostMigrationChecklist.Table.al | 5 + .../app/src/tables/RecordLinkMapping.Table.al | 5 + .../ReplicationRecordLinkBuffer.Table.al | 5 + .../ReplicationRunCompletedArg.Table.al | 5 + .../app/src/tables/UserMappingSource.Table.al | 5 + .../app/src/tables/UserMappingWork.Table.al | 5 + .../test/src/ADLMigrationTests.Codeunit.al | 2 + .../HybridCloudManagementTests.Codeunit.al | 23 +- .../test/src/HybridWizardTests.Codeunit.al | 9 +- .../src/ReplicationMgtPageTests.Codeunit.al | 339 +- .../src/codeunits/HybridGPWizard.codeunit.al | 5 +- .../Accounts/SLAccountMigrator.Codeunit.al | 7 +- .../Migration/Accounts/SLAcctHist.Table.al | 2 +- .../Customers/SLCustomerMigrator.Codeunit.al | 13 +- .../Migration/History/SLAPDocBuffer.Table.al | 2 +- .../Migration/History/SLARDocBuffer.Table.al | 2 +- .../src/Migration/History/SLBatch.Table.al | 2 +- .../History/SLPopulateHistTables.Codeunit.al | 39 +- .../Projects/SLProjectMigrator.Codeunit.al | 11 +- .../SLPopulateAccountHistory.Codeunit.al | 7 +- .../Support/SLHelperFunctions.Codeunit.al | 4 +- .../Migration/Vendors/SLAPBalances.Table.al | 2 +- .../Vendors/SLVendorMigrator.Codeunit.al | 11 +- .../src/codeunits/SLHybridWizard.Codeunit.al | 6 +- Apps/W1/HybridSL/test/app.json | 2 +- .../test/src/SLAPDocBufferData.XmlPort.al | 2 +- .../test/src/SLARDocBufferData.XmlPort.al | 2 +- .../test/src/SLAcctHistData.XmlPort.al | 2 +- .../HybridSL/test/src/SLBatchData.XmlPort.al | 2 +- .../src/SLCustomerMigratorTests.CodeUnit.al | 1 - .../test/src/SLGLSetupData.XmlPort.al | 2 +- .../src/SLTestHelperFunctions.CodeUnit.al | 1 - .../src/SLVendorMigratorTests.CodeUnit.al | 2 - .../app/AppResources/DataExchDefMap.xml | 2 +- .../IntrastatReportLine.Table.al | 4 + .../IntrastatReportGetLines.Report.al | 3 + .../IntrastatReportManagement.Codeunit.al | 14 +- .../test/src/IntrastatReportTest.Codeunit.al | 55 + .../app/NoTransactionsSubscriber.Codeunit.al | 2 + .../TestSuites/SLS-AccuracyTests.xml | Bin 2312 -> 2460 bytes .../SLS-AttachmentAccuracyTests.xml | Bin 1216 -> 1512 bytes Apps/W1/SalesOrderAgent/app/app.json | 24 +- .../src/Integration/SOAAnnotation.Codeunit.al | 6 +- .../src/Integration/SOAEmailMessage.Page.al | 16 +- .../src/Validation/SOAFiltersImpl.Codeunit.al | 23 + .../SustAssemblySubscriber.Codeunit.al | 72 +- .../SustCarbonTrackingMethod.Enum.al | 19 + .../app/src/Certificate/SustItem.TableExt.al | 6 + .../src/Certificate/SustItemCard.PageExt.al | 4 + .../ExciseTax/SustExciseJnlCheck.Codeunit.al | 10 +- .../src/ExciseTax/SustExciseJnlLine.Table.al | 25 +- .../SustExciseTaxesTransLog.Table.al | 8 + .../SustainabilityExciseJournal.Page.al | 14 +- .../SustItemPostSubscriber.Codeunit.al | 56 +- .../Posting/SustainabilityPostMgt.Codeunit.al | 135 + .../Sales/SustSalesCopyDocument.Codeunit.al | 38 + .../src/Setup/SustainabilitySetup.Table.al | 7 - .../src/LibrarySustainability.Codeunit.al | 39 + .../test/src/SustCertificateTest.Codeunit.al | 1 - .../test/src/SustValueEntryTest.Codeunit.al | 429 + .../src/SustainabilityPostingTest.Codeunit.al | 103 + .../SustainabilityServiceTests.Codeunit.al | 100 + .../test/.resources/datasets/Testsuite.xml | 2 +- .../Test/src/ERMWHTGLAccount.Codeunit.al | 11 +- .../src/ERMWithholdingTaxTestsI.Codeunit.al | 35 + .../src/ERMWithholdingTaxTestsII.Codeunit.al | 24 + .../src/ERMWithholdingVATForSEA.Codeunit.al | 4 + .../src/WithholdingTaxJournals.Codeunit.al | 9 +- .../Setup/WithholdingGLSetupExt.TableExt.al | 11 + Build/Packages.json | 2 +- Build/rulesets/app.ruleset.json | 5 - Build/rulesets/base.ruleset.json | 13 +- Build/rulesets/ruleset.json | 5 - 531 files changed, 126363 insertions(+), 24930 deletions(-) create mode 100644 Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateDeferralTemplateBE.Codeunit.al create mode 100644 Apps/BE/EDocument_BE/demo data/3.Transactions/CreateDemoEDocsBE.Codeunit.al create mode 100644 Apps/BE/EDocument_BE/demo data/3.Transactions/CreateEDocSampleInvBE.Codeunit.al create mode 100644 Apps/BE/EDocument_BE/demo data/EDocDemodataBE.Codeunit.al create mode 100644 Apps/BE/EDocument_BE/demo data/ExtensionLogo.png create mode 100644 Apps/BE/EDocument_BE/demo data/app.json create mode 100644 Apps/CH/ContosoCoffeeDemoDatasetCH/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCH.Codeunit.al create mode 100644 Apps/FI/ContosoCoffeeDemoDatasetFI/app/DemoData/Finance/2.Master Data/CreateAllocationAccountFI.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/app/Permissions/D365BASICISVPaymentManagementFR.PermissionSetExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/Permissions/D365BASICPaymentManagementFR.PermissionSetExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/Permissions/D365READPaymentManagementFR.PermissionSetExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/Permissions/D365TEAMMEMBERPaymentManagementFR.PermissionSetExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/Permissions/Local.PermissionSetExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/Permissions/LocalRead.PermissionSetExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRFull.PermissionSet.al create mode 100644 Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRM.PermissionSet.al create mode 100644 Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRead.PermissionSet.al create mode 100644 Apps/FR/PaymentManagementFR/app/Permissions/PaymentMgtFRObjectsX.PermissionSet.al create mode 100644 Apps/FR/PaymentManagementFR/app/app.json create mode 100644 Apps/FR/PaymentManagementFR/app/extensionlogo.png create mode 100644 Apps/FR/PaymentManagementFR/app/src/Codeunits/FeaturePaymentMgtFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Codeunits/LocalNavigateHandlerFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentApplyFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFeatureFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentMgtSubscribersFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Codeunits/RIBKeyFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgTagPaymentManagementFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgradePaymentManagementFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Enum/PaymentStepActionTypeFR.Enum.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/EnumExtensions/FeaturePaymentMgtFR.EnumExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccPayablesCoordinatorRC.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccReceivablesAdmRC.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccountingManagerRoleCenter.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/BankAccountCard.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/BookkeeperRoleCenter.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/CashReceiptJournal.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerBankAccountCard.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerCard.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/FinanceManagerRoleCenter.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/SmallBusinessOwnerRC.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorBankAccountCard.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorCard.PageExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentAddressesFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankArchiveFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassListFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLineModificationFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesArchiveListFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesListFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentReportFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipArchiveFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListArchiveFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformArchiveFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusListFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepCardFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerListFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsListFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Pages/ViewEditPaymentLineFR.Page.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/ArchivePaymentSlipsFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/Bill.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/BillFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/Draft.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/DraftFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/Draftnotice.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/DraftnoticeFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/Draftrecapitulation.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/DraftrecapitulationFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/DuplicateparameterFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/ETEBACFilesFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/GLVendLedgerReconciliation.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/GLVendLedgerReconciliation.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/PaymentList.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/PaymentListFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/Remittance.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/RemittanceFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/SEPAISO20022FR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/SuggestCustPayments.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/SuggestVendPayments.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawnotice.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawnoticeFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawrecapitulation.rdlc create mode 100644 Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawrecapitulationFR.Report.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/TableExtensions/BankAccount.TableExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/TableExtensions/Customer.TableExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/TableExtensions/CustomerBankAccount.TableExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/TableExtensions/GeneralLedgerSetup.TableExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/TableExtensions/Vendor.TableExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/TableExtensions/VendorBankAccount.TableExt.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/BankAccountBufferFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/PaymentAddressFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/PaymentClassFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/PaymentHeaderArchiveFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/PaymentHeaderFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/PaymentLineArchiveFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/PaymentLineFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/PaymentPostBufferFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStatusFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStepFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStepLedgerFR.Table.al create mode 100644 Apps/FR/PaymentManagementFR/app/src/XmlPorts/ImportExportParametersFR.XmlPort.al create mode 100644 Apps/FR/PaymentManagementFR/test/app.json create mode 100644 Apps/FR/PaymentManagementFR/test/extensionlogo.png create mode 100644 Apps/FR/PaymentManagementFR/test/src/Dimension/ERMDimensionSubscriberFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/NewObjectTests-Internal/CloudMigCountryTables.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMBankAccountFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMFRFeatureBugs.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentManagement.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentManagementII.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentSlip.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentToleranceFR.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMSEPA.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA02DDFunctionalTest.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA03CTFunctionalTest.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA03CTUnitTest.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA08DDFunctionalTest.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA09CTFunctionalTest.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/UTArchiveTableValidation.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/UTBANKACC.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/UTREPPaymentManagement.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/UTREPPaymentManagementII.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/UTRemittance.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/UTSEPA.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/RegularTests/UTTABPaymentManagement.Codeunit.al create mode 100644 Apps/FR/PaymentManagementFR/test/src/TestLibraries/LibraryLocalizationFR.Codeunit.al create mode 100644 Apps/IN/INTDS/app/.resources/TDSUseCases/3EFD6FE9-72B2-427F-A254-C36E7CA61D6D.json create mode 100644 Apps/IN/INTDS/app/.resources/TDSUseCases/430D7BC2-7F79-4B77-A16C-63C758DA1FD0.json create mode 100644 Apps/IN/INTDS/app/.resources/TDSUseCases/5F2E69B7-0288-468A-83C8-D6A2AF993782.json create mode 100644 Apps/IN/INTDS/app/.resources/TDSUseCases/CC412FD1-030F-4F28-BBDC-46F25D2B7BF3.json create mode 100644 Apps/IN/INTDS/app/.resources/TDSUseCases/E3446842-7BE3-448E-A055-2BBA1A627C6E.json create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/CobrandTokenOK.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/ConsumerTokenOK.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/DuplicateSiteAccountsDetails.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Empty.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/FastlinkTokenOK.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccounts.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccountsDetails.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccountsDetailsMFA.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/StaleTokens.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status403.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status404.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status500.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/refreshdata.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/refreshdatadone.txt create mode 100644 Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/transactions.json create mode 100644 Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/Finance/2.Master Data/CreateAllocationAccountNL.Codeunit.al create mode 100644 Apps/NL/EDocument_NL/demo data/3.Transactions/CreateDemoEDocsNL.Codeunit.al create mode 100644 Apps/NL/EDocument_NL/demo data/3.Transactions/CreateEDocSampleInvNL.Codeunit.al create mode 100644 Apps/NL/EDocument_NL/demo data/EDocDemodataNL.Codeunit.al create mode 100644 Apps/NL/EDocument_NL/demo data/ExtensionLogo.png create mode 100644 Apps/NL/EDocument_NL/demo data/app.json create mode 100644 Apps/NO/EDocument_NO/demo data/3.Transactions/CreateDemoEDocsNO.Codeunit.al create mode 100644 Apps/NO/EDocument_NO/demo data/3.Transactions/CreateEDocSampleInvNO.Codeunit.al create mode 100644 Apps/NO/EDocument_NO/demo data/EDocDemodataNO.Codeunit.al create mode 100644 Apps/NO/EDocument_NO/demo data/ExtensionLogo.png create mode 100644 Apps/NO/EDocument_NO/demo data/app.json create mode 100644 Apps/SE/EDocument_SE/demo data/3.Transactions/CreateDemoEDocsSE.Codeunit.al create mode 100644 Apps/SE/EDocument_SE/demo data/3.Transactions/CreateEDocSampleInvSE.Codeunit.al create mode 100644 Apps/SE/EDocument_SE/demo data/EDocDemodataSE.Codeunit.al create mode 100644 Apps/SE/EDocument_SE/demo data/ExtensionLogo.png create mode 100644 Apps/SE/EDocument_SE/demo data/app.json rename Apps/US/HybridSL_US/app/Permissions/{SLD365TeamMemberHSLUS.PermissionSetExt.al => SLD365TeamMemberExtHSLUS.PermissionSetExt.al} (100%) rename Apps/US/HybridSL_US/app/Permissions/{SLIntelligentCloudHSLUS.PermissionSetExt.al => SLIntelligentCloudExtHSLUS.PermissionSetExt.al} (100%) rename Apps/US/HybridSL_US/app/src/Pages/{SL1099MigrationLog.Page.al => SL1099MigrationLogList.Page.al} (100%) create mode 100644 Apps/US/IRSForms/app/src/Interface/IRS1099IRISConfiguration.Interface.al create mode 100644 Apps/US/IRSForms/test library/src/IRSFormsImplTest.EnumExt.al create mode 100644 Apps/US/IRSForms/test library/src/LibraryIRS1099IRIS.Codeunit.al create mode 100644 Apps/US/IRSForms/test library/src/MockKeyVaultClientIRIS.Codeunit.al create mode 100644 Apps/US/IRSForms/test/src/IRS1099IRISTests.Codeunit.al delete mode 100644 Apps/W1/APIV2/app/src/codeunits/APIV2WorkflowEventHandler.Codeunit.al delete mode 100644 Apps/W1/APIV2/app/src/pages/APIV2RequisitionWkshName.Page.al create mode 100644 Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateAllocationAccount.Codeunit.al create mode 100644 Apps/W1/ExciseTaxes/app/ExtensionLogo.png create mode 100644 Apps/W1/ExciseTaxes/app/app.json create mode 100644 Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesAdmin.permissionset.al create mode 100644 Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesEdit.permissionset.al create mode 100644 Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesObjects.permissionset.al create mode 100644 Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesRead.permissionset.al create mode 100644 Apps/W1/ExciseTaxes/app/src/Permissions/d365BasicExciseTaxes.PermissionsetExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/Permissions/d365BusFullAccessExciseTaxes.PermissionsetExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/Permissions/d365ReadExciseTaxes.PermissionsetExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/Permissions/d365TeamMemberExciseTaxes.PermissionsetExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/codeunit/ExciseTaxCalculation.Codeunit.al create mode 100644 Apps/W1/ExciseTaxes/app/src/codeunit/ExciseTaxTransSubscriber.Codeunit.al create mode 100644 Apps/W1/ExciseTaxes/app/src/enum/ExciseEntryType.Enum.al create mode 100644 Apps/W1/ExciseTaxes/app/src/enum/ExciseSourceType.Enum.al create mode 100644 Apps/W1/ExciseTaxes/app/src/enum/ExciseTaxBasis.Enum.al create mode 100644 Apps/W1/ExciseTaxes/app/src/page/ExciseTaxEntryPermissions.Page.al create mode 100644 Apps/W1/ExciseTaxes/app/src/page/ExciseTaxItemFARates.Page.al create mode 100644 Apps/W1/ExciseTaxes/app/src/page/ExciseTaxTypeCard.Page.al create mode 100644 Apps/W1/ExciseTaxes/app/src/page/ExciseTaxTypes.Page.al create mode 100644 Apps/W1/ExciseTaxes/app/src/pageextension/ExciseFixedAssetCardExt.PageExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/pageextension/ExciseItemCardExt.PageExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/pageextension/ExciseItemLedgerEntriesExt.PageExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/pageextension/ExciseJournalBatchExt.PageExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/pageextension/ExciseJournalLineExt.PageExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/pageextension/ExciseTaxTransLogExt.PageExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/report/CreateExciseTaxJnlEntries.Report.al create mode 100644 Apps/W1/ExciseTaxes/app/src/table/ExciseTaxEntryPermission.Table.al create mode 100644 Apps/W1/ExciseTaxes/app/src/table/ExciseTaxItemFARate.Table.al create mode 100644 Apps/W1/ExciseTaxes/app/src/table/ExciseTaxType.Table.al create mode 100644 Apps/W1/ExciseTaxes/app/src/tableextension/ExciseFALedgerEntryExt.TableExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/tableextension/ExciseFixedAssetExt.TableExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/tableextension/ExciseItemExt.TableExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/tableextension/ExciseItemLedgerEntryExt.TableExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/tableextension/ExciseJournalLineExt.TableExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/tableextension/ExciseTaxesTransLogExt.TableExt.al create mode 100644 Apps/W1/ExciseTaxes/app/src/tableextension/SustainabilityBatchExcise.TableExt.al create mode 100644 Apps/W1/ExciseTaxes/test/ExtensionLogo.png create mode 100644 Apps/W1/ExciseTaxes/test/app.json create mode 100644 Apps/W1/ExciseTaxes/test/src/ExciseTaxCalculationTests.Codeunit.al create mode 100644 Apps/W1/ExciseTaxes/test/src/LibraryExciseTax.Codeunit.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/CustomMigration/CustomMigrationProvider.Codeunit.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationProvider.Enum.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationProvider.Interface.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationTableMapping.Interface.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/CustomMigration/OnPremMigrationHandler.Codeunit.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/AddCustomMigrationMapping.Page.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/CustomMigrationMappingList.Page.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/CustomMigrationTableBuffer.Table.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/MigrationSetupTableMapping.Table.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/ReplicationTableMapping.Table.al create mode 100644 Apps/W1/HybridBaseDeployment/app/src/enums/MigrationMappingType.Enum.al create mode 100644 Apps/W1/Sustainability/app/src/Certificate/SustCarbonTrackingMethod.Enum.al diff --git a/.github/AL-Go-Settings.json b/.github/AL-Go-Settings.json index 2532f32177..293252e5ff 100644 --- a/.github/AL-Go-Settings.json +++ b/.github/AL-Go-Settings.json @@ -6,7 +6,7 @@ "runs-on": "windows-latest", "cacheImageName": "", "UsePsSession": false, - "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/28.0.44491.0/base", + "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/28.0.45539.0/base", "country": "base", "useProjectDependencies": true, "repoVersion": "28.0", diff --git a/Apps/AT/IntrastatAT/app/AppResources/AT_DataExchDefMap.xml b/Apps/AT/IntrastatAT/app/AppResources/AT_DataExchDefMap.xml index 64560cae49..eb1df24bea 100644 --- a/Apps/AT/IntrastatAT/app/AppResources/AT_DataExchDefMap.xml +++ b/Apps/AT/IntrastatAT/app/AppResources/AT_DataExchDefMap.xml @@ -33,7 +33,7 @@ - + diff --git a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/AUContosoLocalization.Codeunit.al b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/AUContosoLocalization.Codeunit.al index e810f58034..177db861e4 100644 --- a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/AUContosoLocalization.Codeunit.al +++ b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/AUContosoLocalization.Codeunit.al @@ -153,10 +153,7 @@ codeunit 17131 "AU Contoso Localization" Codeunit.Run(Codeunit::"Create VAT Setup Post.Grp. AU"); end; Enum::"Contoso Demo Data Level"::"Master Data": - begin - Codeunit.Run(Codeunit::"Create Currency Ex. Rate AU"); - Codeunit.Run(Codeunit::"Create Allocation Account AU"); - end; + Codeunit.Run(Codeunit::"Create Currency Ex. Rate AU"); end; end; diff --git a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAllocationAccountAU.Codeunit.al b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAllocationAccountAU.Codeunit.al index b83b8ae3dd..1b64c48ccb 100644 --- a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAllocationAccountAU.Codeunit.al +++ b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAllocationAccountAU.Codeunit.al @@ -1,3 +1,4 @@ +#if not CLEAN28 // ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,6 +13,9 @@ codeunit 17180 "Create Allocation Account AU" { InherentEntitlements = X; InherentPermissions = X; + ObsoleteState = Pending; + ObsoleteReason = 'Replaced by Create Allocation Account Codeunit in ContosoCoffeeDemoDataset'; + ObsoleteTag = '28.0'; trigger OnRun() var @@ -45,4 +49,5 @@ codeunit 17180 "Create Allocation Account AU" var LicensesTok: Label 'LICENSES', MaxLength = 20; YearlyLicenseFeeTok: Label 'Yearly license fee', MaxLength = 100; -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateDemoEDocsAU.Codeunit.al b/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateDemoEDocsAU.Codeunit.al index 742746c292..808770ac28 100644 --- a/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateDemoEDocsAU.Codeunit.al +++ b/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateDemoEDocsAU.Codeunit.al @@ -28,7 +28,7 @@ codeunit 17213 "Create Demo EDocs AU" procedure GetShipmentDHLInvoiceDescription(): Text[100] var - ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100; + ShipmentDHLLbl: Label 'Shipment', MaxLength = 100; begin exit(ShipmentDHLLbl); end; @@ -40,7 +40,7 @@ codeunit 17213 "Create Demo EDocs AU" CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateEDocumentMasterData: Codeunit "Create E-Document Master Data"; CreateJobItem: Codeunit "Create Job Item"; - CreateAllocationAccountAU: Codeunit "Create Allocation Account AU"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; CreateDeferralTemplate: Codeunit "Create Deferral Template"; CreateGLAccount: Codeunit "Create G/L Account"; EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice"; @@ -49,44 +49,48 @@ codeunit 17213 "Create Demo EDocs AU" ITServicesMarchLbl: Label 'IT Services Support period: March', MaxLength = 100; ITServicesAprilLbl: Label 'IT Services Support period: April', MaxLength = 100; ITServicesMayLbl: Label 'IT Services Support period: May', MaxLength = 100; + SavedWorkDate, SampleInvoiceDate : Date; begin - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245'); + SavedWorkDate := WorkDate(); + SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(); + WorkDate(SampleInvoiceDate); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245'); ContosoInboundEDocument.AddEDocPurchaseLine( - Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountAU.Licenses(), '', + Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), '', 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419'); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419'); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(), ITServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425'); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425'); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(), ITServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437'); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437'); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(), ITServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456'); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456'); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(), ITServicesAprilLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479'); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479'); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(), ITServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938'); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938'); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 5, '', CreateCommonUnitOfMeasure.Piece()); @@ -98,7 +102,7 @@ codeunit 17213 "Create Demo EDocs AU" GetShipmentDHLInvoiceDescription(), 1, 60, '', ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982'); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982'); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece()); @@ -106,6 +110,7 @@ codeunit 17213 "Create Demo EDocs AU" Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece()); ContosoInboundEDocument.Generate(); + WorkDate(SavedWorkDate); end; } diff --git a/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateEDocSampleInvAU.Codeunit.al b/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateEDocSampleInvAU.Codeunit.al index b641f94b22..4a18fc0581 100644 --- a/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateEDocSampleInvAU.Codeunit.al +++ b/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateEDocSampleInvAU.Codeunit.al @@ -25,7 +25,7 @@ codeunit 17214 "Create E-Doc Sample Inv. AU" CreateJobItem: Codeunit "Create Job Item"; CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateDemoEDocsAU: Codeunit "Create Demo EDocs AU"; - CreateAllocationAccountAU: Codeunit "Create Allocation Account AU"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; trigger OnRun() var @@ -51,7 +51,7 @@ codeunit 17214 "Create E-Doc Sample Inv. AU" EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108244', YearlyLicenstCostLbl); EDocSamplePurchaseInvoice.AddLine( - Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountAU.LicensesDescription(), 6, 500, '', CreateCommonUnitOfMeasure.Piece()); + Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 6, 500, '', CreateCommonUnitOfMeasure.Piece()); EDocSamplePurchaseInvoice.Generate(); end; } diff --git a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateDeferralTemplateBE.Codeunit.al b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateDeferralTemplateBE.Codeunit.al new file mode 100644 index 0000000000..78687d1ffd --- /dev/null +++ b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateDeferralTemplateBE.Codeunit.al @@ -0,0 +1,22 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.DemoData.Finance; + +codeunit 11455 "Create Deferral Template BE" +{ + Access = Internal; + InherentEntitlements = X; + InherentPermissions = X; + + trigger OnRun() + var + FinanceModuleSetup: Record "Finance Module Setup"; + CreateGLAccountBE: Codeunit "Create GL Account BE"; + begin + FinanceModuleSetup.Get(); + FinanceModuleSetup."Deferral Account No." := CreateGLAccountBE.Transfers(); + FinanceModuleSetup.Modify(); + end; +} \ No newline at end of file diff --git a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateGLAccountBE.Codeunit.al b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateGLAccountBE.Codeunit.al index 67966fd3bd..335a1d1554 100644 --- a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateGLAccountBE.Codeunit.al +++ b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateGLAccountBE.Codeunit.al @@ -412,6 +412,8 @@ codeunit 11357 "Create GL Account BE" UpdateGLAccountVatSetup(PostAccount(), '', '', false, 0); UpdateGLAccountVatSetup(CreateGLAccount.Cash(), '', '', false, 0); GLAccountIndent.Indent(); + + Codeunit.Run(Codeunit::"Create Deferral Template BE"); end; local procedure UpdateGLAccountVatSetup(GLAccountNo: Code[20]; VATBusPostingGroup: Code[20]; VATProdPostingGroup: Code[20]; PrintDetails: Boolean; NonDeductibleVAT: Decimal) diff --git a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreatePostingGroupBE.Codeunit.al b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreatePostingGroupBE.Codeunit.al index 33ce36cdd0..0d88c7b649 100644 --- a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreatePostingGroupBE.Codeunit.al +++ b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreatePostingGroupBE.Codeunit.al @@ -69,16 +69,20 @@ codeunit 11364 "Create Posting Group BE" ContosoGenPostingSetup.InsertGeneralPostingSetup('', NoVATPostingGroup(), '', '', CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', '', '', '', '', CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); ContosoGenPostingSetup.InsertGeneralPostingSetup('', CreatePostingGroup.RetailPostingGroup(), '', '', CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', '', '', '', '', CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); ContosoGenPostingSetup.InsertGeneralPostingSetup('', CreatePostingGroup.ServicesPostingGroup(), '', '', CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', '', '', '', '', CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); + ContosoGenPostingSetup.InsertGeneralPostingSetup('', CreatePostingGroup.MiscPostingGroup(), '', '', CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', '', '', '', '', CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), NoVATPostingGroup(), CreateGLAccount.SalesRetailDom(), CreateBEGLAccount.PurchasesRetailDom(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateGLAccount.SalesRetailDom(), CreateBEGLAccount.PurchasesRetailDom(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateGLAccount.SalesResourcesDom(), CreateBEGLAccount.PurchasesRetailDom(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateBEGLAccount.InventAdjRetailInt()); + ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.MiscPostingGroup(), CreateGLAccount.SalesRetailDom(), CreateBEGLAccount.PurchasesRetailDom(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateGLAccount.SalesRetailEU(), CreateBEGLAccount.PurchasesRetailEu(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); + ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.MiscPostingGroup(), CreateGLAccount.SalesRetailEU(), CreateBEGLAccount.PurchasesRetailEu(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), NoVATPostingGroup(), CreateGLAccount.SalesRetailExport(), CreateBEGLAccount.PurchasesRetailExport(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateGLAccount.SalesRetailExport(), CreateBEGLAccount.PurchasesRetailExport(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateGLAccount.SalesResourcesExport(), CreateBEGLAccount.PurchasesRetailExport(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateBEGLAccount.InventAdjRetailInt()); + ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.MiscPostingGroup(), CreateGLAccount.SalesRetailExport(), CreateBEGLAccount.PurchasesRetailExport(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable()); ContosoGenPostingSetup.SetOverwriteData(false); UpdatePmtDiscAccounts(CreatePostingGroup.DomesticPostingGroup(), NoVATPostingGroup(), CreateGLAccount.SalesRetailDom(), CreateBEGLAccount.PurchasesRetailDom()); diff --git a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json index ea231d7dd9..c84fb879a8 100644 --- a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json +++ b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json @@ -25,7 +25,7 @@ "idRanges": [ { "from": 11345, - "to": 11450 + "to": 11455 } ], "resourceExposurePolicy": { diff --git a/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateDemoEDocsBE.Codeunit.al b/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateDemoEDocsBE.Codeunit.al new file mode 100644 index 0000000000..96c2964c55 --- /dev/null +++ b/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateDemoEDocsBE.Codeunit.al @@ -0,0 +1,115 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.DemoData.Localization; + +using Microsoft.DemoData.Common; +using Microsoft.DemoData.Finance; +using Microsoft.DemoData.Jobs; +using Microsoft.DemoData.Purchases; +using Microsoft.eServices.EDocument.DemoData; +using Microsoft.eServices.EDocument.Processing.Import.Purchase; +using Microsoft.Purchases.Document; + +codeunit 11451 "Create Demo EDocs BE" +{ + Access = Internal; + InherentEntitlements = X; + InherentPermissions = X; + + var + ContosoInboundEDocument: Codeunit "Contoso Inbound E-Document"; + + trigger OnRun() + begin + GenerateContosoInboundEDocuments(); + end; + + procedure GetShipmentDHLInvoiceDescription(): Text[100] + var + ShipmentDHLLbl: Label 'Shipment', MaxLength = 100; + begin + exit(ShipmentDHLLbl); + end; + + local procedure GenerateContosoInboundEDocuments() + var + CreateVendor: Codeunit "Create Vendor"; + CreateGLAccountBE: Codeunit "Create GL Account BE"; + CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; + CreateEDocumentMasterData: Codeunit "Create E-Document Master Data"; + CreateJobItem: Codeunit "Create Job Item"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; + CreateDeferralTemplate: Codeunit "Create Deferral Template"; + EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice"; + AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100; + AccountingServicesFebruaryLbl: Label 'Accounting support period: February', MaxLength = 100; + AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100; + AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100; + AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100; + SavedWorkDate, SampleInvoiceDate : Date; + begin + SavedWorkDate := WorkDate(); + SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(); + WorkDate(SampleInvoiceDate); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 0); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), + CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); + ContosoInboundEDocument.Generate(); + + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 252); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.LawyersAndAccountants(), + AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour()); + ContosoInboundEDocument.Generate(); + + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 798); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.LawyersAndAccountants(), + AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour()); + ContosoInboundEDocument.Generate(); + + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 84); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.LawyersAndAccountants(), + AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour()); + ContosoInboundEDocument.Generate(); + + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 672); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.LawyersAndAccountants(), + AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour()); + ContosoInboundEDocument.Generate(); + + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 294); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.LawyersAndAccountants(), + AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour()); + ContosoInboundEDocument.Generate(); + + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 0); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), + '', 50, 5, '', CreateCommonUnitOfMeasure.Piece()); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::Item, CreateJobItem.ItemConsumable(), + '', 50, 65, '', CreateCommonUnitOfMeasure.Piece()); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.TranspCostsPurchRetail(), + GetShipmentDHLInvoiceDescription(), 1, 60, '', ''); + ContosoInboundEDocument.Generate(); + + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 8368.5); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), + '', 100, 299, '', CreateCommonUnitOfMeasure.Piece()); + ContosoInboundEDocument.AddEDocPurchaseLine( + Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), + '', 50, 199, '', CreateCommonUnitOfMeasure.Piece()); + ContosoInboundEDocument.Generate(); + WorkDate(SavedWorkDate); + end; + +} diff --git a/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateEDocSampleInvBE.Codeunit.al b/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateEDocSampleInvBE.Codeunit.al new file mode 100644 index 0000000000..56277cab38 --- /dev/null +++ b/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateEDocSampleInvBE.Codeunit.al @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.DemoData.Localization; + +using Microsoft.DemoData.Common; +using Microsoft.DemoData.Finance; +using Microsoft.DemoData.Jobs; +using Microsoft.DemoData.Purchases; +using Microsoft.eServices.EDocument.DemoData; +using Microsoft.eServices.EDocument.Processing.Import.Purchase; +using Microsoft.Purchases.Document; + +codeunit 11452 "Create E-Doc Sample Inv. BE" +{ + Access = Internal; + InherentEntitlements = X; + InherentPermissions = X; + + var + EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice"; + CreateVendor: Codeunit "Create Vendor"; + CreateEDocumentMasterData: Codeunit "Create E-Document Master Data"; + CreateJobItem: Codeunit "Create Job Item"; + CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; + CreateDemoEDocsBE: Codeunit "Create Demo EDocs BE"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; + + trigger OnRun() + var + YearlyLicenstCostLbl: Label 'Yearly license cost mapped to a G/L account'; + BasicCoffeeEquipmentLbl: Label 'Basic coffee equipment mapped to vendor''s Item References'; + CoffeeBeansAndPartsLbl: Label 'Coffee beans and parts with shipping cost that needs human intervention'; + begin + EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.ExportFabrikam(), '108239', CoffeeBeansAndPartsLbl); + EDocSamplePurchaseInvoice.AddLine( + Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 180, '', CreateCommonUnitOfMeasure.Piece()); + EDocSamplePurchaseInvoice.AddLine( + Enum::"Purchase Line Type"::Item, CreateJobItem.ItemConsumable(), '', 50, 65, '', CreateCommonUnitOfMeasure.Piece()); + EDocSamplePurchaseInvoice.AddLine( + Enum::"Purchase Line Type"::" ", '', CreateDemoEDocsBE.GetShipmentDHLInvoiceDescription(), 1, 60, '', CreateCommonUnitOfMeasure.Piece()); + EDocSamplePurchaseInvoice.Generate(); + + EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.DomesticWorldImporter(), '108240', BasicCoffeeEquipmentLbl, 8368.5); + EDocSamplePurchaseInvoice.AddLine( + Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece()); + EDocSamplePurchaseInvoice.AddLine( + Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece()); + EDocSamplePurchaseInvoice.Generate(); + + EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl); + EDocSamplePurchaseInvoice.AddLine( + Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece()); + EDocSamplePurchaseInvoice.Generate(); + end; +} diff --git a/Apps/BE/EDocument_BE/demo data/EDocDemodataBE.Codeunit.al b/Apps/BE/EDocument_BE/demo data/EDocDemodataBE.Codeunit.al new file mode 100644 index 0000000000..d5aa4779f0 --- /dev/null +++ b/Apps/BE/EDocument_BE/demo data/EDocDemodataBE.Codeunit.al @@ -0,0 +1,34 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ + +namespace Microsoft.DemoData.Localization; + +using Microsoft.DemoTool; + +codeunit 11454 "E-Doc. Demodata BE" +{ + Access = Internal; + InherentEntitlements = X; + InherentPermissions = X; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Contoso Demo Tool", 'OnAfterGeneratingDemoData', '', false, false)] + local procedure LocalizationContosoDemoData(Module: Enum "Contoso Demo Data Module"; ContosoDemoDataLevel: Enum "Contoso Demo Data Level") + begin + if Module <> Enum::"Contoso Demo Data Module"::"E-Document Contoso Module" then + exit; + EDocumentModule(ContosoDemoDataLevel); + end; + + local procedure EDocumentModule(ContosoDemoDataLevel: Enum "Contoso Demo Data Level") + begin + case ContosoDemoDataLevel of + Enum::"Contoso Demo Data Level"::"Transactional Data": + begin + Codeunit.Run(Codeunit::"Create Demo EDocs BE"); + Codeunit.Run(Codeunit::"Create E-Doc Sample Inv. BE"); + end; + end; + end; +} diff --git a/Apps/BE/EDocument_BE/demo data/ExtensionLogo.png b/Apps/BE/EDocument_BE/demo data/ExtensionLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..79a3aa399db233b8b47b0fdecdd36a0e1f684835 GIT binary patch literal 5201 zcmcgw=QkS;)E1;h5Iah3HEOS4RBMazGis$`hoVTuuC2D%t2NuAD2{r01rmprBwhG|;uUs{8*1?X|0{ z4&ThVDs;XEHUShAAlCl^@O2^T4+RA~m7%VdRmk(57d>d68IF(jao(}){wxBUgu5{< z_mJrP&+}q(4hs}?0+s)IavS(ypAWCHNi9?=&QvJR&|oHR!kAeM+N0xYE@Xltf)j;c z{_D@fd-ydC*1amfk46N1Ry+9<`fF_jqEFj6Bpb3o+Xw<0W1Pj2+6+1XHWx1X0_Hw5 zd^}eor6@s;T~08uESgT9;r|-4xW7Ep7yfttc5n>UUMhHO@vv_c)$Md29%MZ&p$wvl zkkq4X$*ljrC~K#>oDd*G8+zRd4qqs^n|)meAlVzv-_H#UulvbNY?wHy$71v7Gv0WJ zFEPa=@Gf!ahQI3@pI6;LBRTd6)~%W6#cki;81Y?RxFk8T0oCG4JCo;TrQU-sK)*?Z6nq z!4g)G0-}CS3zo876V?Rq)3ps*H|TACdY|YqP^pVfaO0b5oB1A*=BF;cN>v&S)}=kc zuIp9y&+KNK4bo@>_@hsvCIsf0)%g5AohaM6P_iGel|`3ab)$J?f}T|&<}BLm@V227 z0;@GxtSFWVA8E8ioQ1Nx0zaIb!8bg(8aU{O@V#QKc(QK+1$ zplin@qZvLkI%rPBFMo6EMYQxr7y>>iRSXW(6<@lB42la6F8o7K#>v$7CTsf29Y0pr z9=y9pN#Ay@E$}UY73WLk_hOC`!GDjnRTZ%U$d>|};ps@{4O5XNofmajtoa6wwLlwR zxob@Zk;)8DArla?+{5bgZR-}rR7jpkY&^wsX<&X4Wt4BB*brkcZM8z@$%=?5i~UyA z5O{hSm{yUN>^sioeBb!fF@2}RaTtd*a`i_Pv(G}WbomIb;97piV31#%s_MSkF!(x@ z^Al)H&V$8a-gc2}Kn2UvY=X;!HTJCqO&oHu-0VJOngkz0)suATD%_w2-k>#?Whj{4 zCv>UEh{b97!%M~)SQ$zv+xV;a^CH(wpMasZk$>@+e?G%9e!jwDBa<9+84Q;N1@V(3 z&fyYJh;1G<$z_yAkjaG3`t*_k9Cqj`j0{9$`cF}u;cRrf2{H4I!-Cb%5Qbs3FE*S#%$RuHym_i*QOOVaEV@~YYGkhPEQ7x&cgFJcImgG^6;vvGx+Xn?`ZazmQK70T<2x1+{SfeO2qaY?7Z_@EK4=6>H zzhbtG=@E46W0D?PaP0Qf%UiL64Kk44u0_!;2~iVv3D>;~`{(=th8m(kd$u5T?6!R_ zv(TBiy}2S(Z7PBchsyU1p6MvpHNUBDh66^b)`Q@1eUQB}23iA{7^LBwLaaZsU^o#Z zucK?Qv%#tLilaCE@i_z@pLFpfc|&3c5y9i8I41QoTe$xy-QbaLhye$Ui&*RF{04%j z81EvQ*EwV=fBQRl`8<64B}xyHM8LylxR zUv;Hv*mYPE`!YK$roygB$!U2YT;&Bk=OGrSw&>hXBundgdjI^qU~5)&Nei zH1{uqY@m7VWDzcgtbkHRDccJAtY%9~D!UYo7>RGUG^$7ijQIN{%g-|luu6&GqV zbkvsxvfoVpk{dYe?UIhmPGfzStG(#TlzhqUnb2p8*tzTp0|;+w>b{#keZ)jm& z7`x2t{E;8T$+(;$_4RMJ@O#YLWbxSo*hhC7Mv?m}dKGY6XAoywZOdLcK83`eIS9>= z*-}S)@W^c6k`QxMjK1Kq^DT#ixHzE2eAY$&R*j^t7}$ILwwCeAbVJsvYL2{{$(~vo z{b2&%Z-nhVh!Ajn$f&fQf@;M(xeWw{+_)pCyKq_>>T>4=?c7%Lh;E3H&RN4$tSvw| zhx@$c%6u3#dkAnN!(0Ao>=Mwb5jF2 z{7ch?Z<278YBk9HO*0-L_OT@iyTl;@Y8!17{B!#q>tyLgNiZFQ{q=Th3Xf4A>2g9B-vv}|W;;X6e0GY26j2H12c-0=gX>DR$c`^(tdBV^ z>%4i}g}<^{DUvP9qt}L<_it%LU9YRrVi^fHPv@!i_IY;GS5EIEAmthuR0 z#3l5e1zveDh^72X=z+%kA5NGtK%;lPLhjrPs@)VBVWZ-BVrK1aN*EkYVO)aa;wEXi z&U=bK^YHR#+$5#sU&o~&!V7B+gBg&dRb)j1FjNEOjQe-kYLq?eNg<-j^v z$qSUqa=3-qcVwv`ml{~8n<^8u1V@Oe!+PIRdW@? zp=tegD-dYxqM$uZ-)>d(1joX$`INmu!R+~8VEwyW{_d|Jg&!wi>D2~R7176nR3hFm z6&ge5NMt=tiXcH{S|G;nz(v*3}Pucf%t`5`dQF~qBw_Zu!)OoQOb4@2P7bC^=jFi`QHIPVI>lSP|CnGn~BBRQft(iREOo!3Eb2OX4rx$~Kt zUZ`6#fse{=V^g>8tZ`>4!8>dwCECt|Fp)pd_xw9%xJ;9$Z zhHjrol1WyEaqTi$l&?XxwR2q@v(ve-hAr8lxtpm(&nEmW`yUm300)nonw|VPMGsz z_t<>=7j@U5ce|dKZ=g=;6HU~?JaU4{vQrreRzYtDkuD7@qwhG7Ya=oSwsxfH73%C9F>5T*DRvOiLyH6s{dF@ zxrENI4oQg}#?x5tD|rz{w#rL%K=w33&`I+c{nYp0X1Wj=`k8ZEy>u5wE{6@lBK(V+8l1w!6LY7%3+{m)g8LKu zl^V9-(}=d)G!324nQbzU-dR;-d9nLel<3Cap#juQ3uF0xP7}Mf6$QP-S_6=cy!Mj= zd=>|9_%puGNPMRHl``k`0L2j$fP>R`J9E*22Fo8juf}anz`_=c{@hmy=DSW8zDN2pTXhuZGSX zIyJofIz-BFHDesf!9dWee)D9?D@K^gMm?VgbEGhfqLM%=>%kl>@61m$BD-2XuE#6I zl)Bmfp7%PyG{1ZH>`i!OeqHvi`KJ1ve#$&C&xW-PT2HF>G|Oj@ItzSYc`_%nN7`I0 zcK%^ighHJ0^58#NunFOO->nWGuU(KD+gW=Yvw_MlQn3NPO(#WIxK{*5kAS@;R8Al@uhV4*xN)t zwl7>Ge)A~lQaT6d6=%&dNvSuC#0^CH#a|t3IaLvnA44s8%=AcH#$m%7qDx4p**lqcVk;ym>qW1V~ zUbvWi(9?LoRW9p9iZNkJl;*yaFRI~%F*&WDsoyFbO#w8ft+qMG`pCOJ*6umEO#Rps zfPD#18k=e#rjVFMfeJ&L@$seb?1pZXB;)1Pa~h?+Yn)a~&>rm=%X#p=_WV*kT?VUX z?I_7rdCTb9r)FX$P!tx2f5wh`!*unwO7OOOAC23NkfiKA4%iBHi+fN;x`UaS(rH9a z9{n-OT%nk4DakZFP99Y=e1(;0ZxB=eZ_yF`O>Lf}@%0NjUK`ii`ZcVgEz*MBU^+xn z{cz0x@($2A1@KI-$>FPVVq5V|5Trx&H+R)q>r3<88zVxd(yP%59HadmS7Uv4_PD>@ zc1cCz$&6qAknfHBvh$l$4i&bLKmW~3~fYJ1}kY! z-^w~2)F>U2z_|>?OEN9DTyU+w4Zh{>M0B@y?>15ICV-c-7Cm<4&e)sS8^Q}Z_H8;R zZ4>W(Y8>r<2ipecT4)i@a!*gcQJrJo2-`upwaQWC`}xu?Yhl~{c_qU7lwjY@O;<5T zYdkkXFY3w6%=Ih=5t2ne005w#f?AVt-Eq7Q&HG3H>D zyVq3Hk~_3#hwJVwh`MDyI2%-3T8T|M4ksI>veZi=86#40JdB}(#HruXo-~`;7MI7v)al4|*+O;|A-r~5%plCQK!qaySon+;hZ+ZcLG`uc`CNiq_vbRMzg%W`-J1;^ z55`+(`lYqd{c3n+Idhs{kMom5baZ?4$x)2ba^_S*qbsiA9_g>Qf4W;x0gY9wJ~%K% zG?RWEPh3$(k>H9a4$04Jw;4x;#@o*gqt_Z;Q;iej-?*jv5(i&C_%M)hMYE}CA^RkI zGRwl+MQQZV&HYgXRWEh%()jR|^AYa<1{r%&W*qwSz0Zb-bM7fwq^#`FL4P5H<`e9W4vSW{ zb2#tw!|0~f+S1D_Hp2=u thJgy0w;P0M{+|r5|J7NmQQ5cz+oh)Y#Yu`+U3r8QhA>mzI&Ea^{{VKLuO|Qi literal 0 HcmV?d00001 diff --git a/Apps/BE/EDocument_BE/demo data/app.json b/Apps/BE/EDocument_BE/demo data/app.json new file mode 100644 index 0000000000..0dd5f096c4 --- /dev/null +++ b/Apps/BE/EDocument_BE/demo data/app.json @@ -0,0 +1,58 @@ +{ + "id": "c9d5e8f0-6a78-5c34-0d9e-5f9a7b3e1c4d", + "name": "E-Document Core Demo Data (BE)", + "publisher": "Microsoft", + "brief": "The Dynamics 365 Business Central E-Documents module enables different models of electronic invoicing, available for additional localizations.", + "description": "Business Central's E-Documents module is the foundation layer for all e-invoicing standards covering most common processes, but it can be used for other electronic documents. The module is easily extendable with the country-based e-invoicing apps. The E-Documents apps covers both sales and purchase processes and can have different lifecycles from standard invoices in Business Central.", + "version": "28.0.0.0", + "privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009", + "EULA": "https://go.microsoft.com/fwlink/?linkid=2009120", + "help": "https://go.microsoft.com/fwlink/?linkid=2204541", + "url": "https://go.microsoft.com/fwlink/?LinkId=724011", + "logo": "ExtensionLogo.png", + "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2206603", + "dependencies": [ + { + "id": "e1d97edc-c239-46b4-8d84-6368bdf67c8b", + "name": "E-Document Core", + "publisher": "Microsoft", + "version": "28.0.0.0" + }, + { + "id": "de0dddf3-9917-430d-8d20-6e7679a08500", + "name": "E-Document Core Demo Data", + "publisher": "Microsoft", + "version": "28.0.0.0" + }, + { + "id": "5a0b41e9-7a42-4123-d521-2265186cfb31", + "name": "Contoso Coffee Demo Dataset", + "publisher": "Microsoft", + "version": "28.0.0.0" + }, + { + "id": "5b0b41a1-7b42-4123-a521-2265186cfb33", + "name": "Contoso Coffee Demo Dataset (BE)", + "publisher": "Microsoft", + "version": "28.0.0.0" + } + ], + "screenshots": [], + "platform": "28.0.0.0", + "idRanges": [ + { + "from": 11451, + "to": 11456 + } + ], + "resourceExposurePolicy": { + "allowDebugging": true, + "allowDownloadingSource": true, + "includeSourceInSymbolFile": true + }, + "application": "28.0.0.0", + "target": "OnPrem", + "features": [ + "TranslationFile" + ] +} diff --git a/Apps/BE/IntrastatBE/app/AppResources/BE_DataExchDefMapRcptE.xml b/Apps/BE/IntrastatBE/app/AppResources/BE_DataExchDefMapRcptE.xml index 2b05c0758d..9ea4127180 100644 --- a/Apps/BE/IntrastatBE/app/AppResources/BE_DataExchDefMapRcptE.xml +++ b/Apps/BE/IntrastatBE/app/AppResources/BE_DataExchDefMapRcptE.xml @@ -39,7 +39,7 @@ - + diff --git a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/CAContosoLocalization.Codeunit.al b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/CAContosoLocalization.Codeunit.al index 23c4988bcc..82ea0e6d3c 100644 --- a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/CAContosoLocalization.Codeunit.al +++ b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/CAContosoLocalization.Codeunit.al @@ -97,7 +97,6 @@ codeunit 27054 "CA Contoso Localization" Codeunit.Run(Codeunit::"Create CA Column Layout"); CreateCATaxArea.UpdateTaxAreaOnCompanyInformation(); CreateCAGeneralLedgerSetup.UpdateMaxVATDifferenceAllowedOnGeneralLedgerSetup(); - Codeunit.Run(Codeunit::"Create Allocation Account CA"); end; end; end; @@ -204,6 +203,8 @@ codeunit 27054 "CA Contoso Localization" BindSubscription(CreateCANoSeriesLine); Enum::"Contoso Demo Data Module"::Finance: begin + if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then + Codeunit.Run(Codeunit::"Create Allocation Account CA"); BindSubscription(CreateCAGenJournalTemplate); BindSubscription(CreateCACurrency); BindSubscription(CreateCACurrExchRate); diff --git a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/1.Setup Data/CreateCAGLAccounts.Codeunit.al b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/1.Setup Data/CreateCAGLAccounts.Codeunit.al index 5fab51273a..41fb154fdc 100644 --- a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/1.Setup Data/CreateCAGLAccounts.Codeunit.al +++ b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/1.Setup Data/CreateCAGLAccounts.Codeunit.al @@ -302,7 +302,6 @@ codeunit 27009 "Create CA GL Accounts" //BlankGL ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.BALANCESHEETName(), ''); ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.AccumDepreciationBuildingsName(), ''); - ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.EmployeesPayableName(), ''); ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.IncreasesduringtheYearBuildingsName(), ''); ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.DecreasesduringtheYearBuildingsName(), ''); ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.IncreasesduringtheYearOperEquipName(), ''); @@ -2450,7 +2449,7 @@ codeunit 27009 "Create CA GL Accounts" PaymentDiscountsGrantedCOGSTok: Label 'Payment Discounts Granted, COGS', MaxLength = 100; RepairsandMaintenanceExpensesTok: Label 'Repairs and Maintenance, Expenses', MaxLength = 100; AccumDepreciationBuildingsTok: Label 'Accum. Depreciation, Building', MaxLength = 100; - EmployeesPayableTok: Label 'Employee Payable', MaxLength = 100; + EmployeesPayableTok: Label 'Employees Payable', MaxLength = 100; CostofGoodsSoldTok: Label 'Cost of Goods Sold', MaxLength = 80; MiscellaneousTok: Label 'Miscellaneous.', MaxLength = 100; } diff --git a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCA.Codeunit.al b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCA.Codeunit.al index 71979fd990..89474845ad 100644 --- a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCA.Codeunit.al +++ b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCA.Codeunit.al @@ -5,9 +5,6 @@ namespace Microsoft.DemoData.Finance; -using Microsoft.DemoTool.Helpers; -using Microsoft.Finance.AllocationAccount; - codeunit 27095 "Create Allocation Account CA" { InherentEntitlements = X; @@ -15,21 +12,12 @@ codeunit 27095 "Create Allocation Account CA" trigger OnRun() var - AllocationAccount: Record "Allocation Account"; - AllocAccountDistribution: Record "Alloc. Account Distribution"; - ContosoAllocationAccount: Codeunit "Contoso Allocation Account"; - CreateDimensionValue: Codeunit "Create Dimension Value"; + FinanceModuleSetup: Record "Finance Module Setup"; CreateGLAccount: Codeunit "Create G/L Account"; begin - ContosoAllocationAccount.InsertAllocationAccount( - Licenses(), LicensesDescription(), - AllocationAccount."Account Type"::Fixed, AllocationAccount."Document Lines Split"::"Split Amount"); - ContosoAllocationAccount.InsertAllocationAccountDistribution( - Licenses(), 10000, AllocAccountDistribution."Account Type"::Fixed, 1, 50, - AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(), CreateDimensionValue.AdministrationDepartment(), ''); - ContosoAllocationAccount.InsertAllocationAccountDistribution( - Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50, - AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(), CreateDimensionValue.SalesDepartment(), ''); + FinanceModuleSetup.Get(); + FinanceModuleSetup."Yearly License All. GLAcc No." := CreateGLAccount.OtherComputerExpenses(); + FinanceModuleSetup.Modify(); end; procedure Licenses(): Code[20] diff --git a/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateDemoEDocsCA.Codeunit.al b/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateDemoEDocsCA.Codeunit.al index 6245a390e4..9bb23589ae 100644 --- a/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateDemoEDocsCA.Codeunit.al +++ b/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateDemoEDocsCA.Codeunit.al @@ -28,7 +28,7 @@ codeunit 11506 "Create Demo EDocs CA" procedure GetShipmentDHLInvoiceDescription(): Text[100] var - ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100; + ShipmentDHLLbl: Label 'Shipment', MaxLength = 100; begin exit(ShipmentDHLLbl); end; @@ -40,7 +40,7 @@ codeunit 11506 "Create Demo EDocs CA" CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateEDocumentMasterData: Codeunit "Create E-Document Master Data"; CreateJobItem: Codeunit "Create Job Item"; - CreateAllocationAccountCA: Codeunit "Create Allocation Account CA"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; CreateDeferralTemplate: Codeunit "Create Deferral Template"; EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice"; ITServicesJanuaryLbl: Label 'IT Services Support period: January', MaxLength = 100; @@ -48,44 +48,48 @@ codeunit 11506 "Create Demo EDocs CA" ITServicesMarchLbl: Label 'IT Services Support period: March', MaxLength = 100; ITServicesAprilLbl: Label 'IT Services Support period: April', MaxLength = 100; ITServicesMayLbl: Label 'IT Services Support period: May', MaxLength = 100; + SavedWorkDate, SampleInvoiceDate : Date; begin - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245', 390); + SavedWorkDate := WorkDate(); + SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(); + WorkDate(SampleInvoiceDate); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 390); ContosoInboundEDocument.AddEDocPurchaseLine( - Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountCA.Licenses(), + Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), '', 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 156); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 156); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(), ITServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 494); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 494); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(), ITServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 52); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 52); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(), ITServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 182); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 182); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(), ITServicesAprilLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 416); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 416); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(), ITServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938', 7.8); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 7.8); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 5, '', CreateCommonUnitOfMeasure.Piece()); @@ -97,7 +101,7 @@ codeunit 11506 "Create Demo EDocs CA" GetShipmentDHLInvoiceDescription(), 1, 60, '', ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982'); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982'); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece()); @@ -105,6 +109,7 @@ codeunit 11506 "Create Demo EDocs CA" Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece()); ContosoInboundEDocument.Generate(); + WorkDate(SavedWorkDate); end; } diff --git a/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateEDocSampleInvCA.Codeunit.al b/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateEDocSampleInvCA.Codeunit.al index 1e653167cd..b457d5461d 100644 --- a/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateEDocSampleInvCA.Codeunit.al +++ b/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateEDocSampleInvCA.Codeunit.al @@ -25,7 +25,7 @@ codeunit 11507 "Create E-Doc Sample Inv. CA" CreateJobItem: Codeunit "Create Job Item"; CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateDemoEDocsCA: Codeunit "Create Demo EDocs CA"; - CreateAllocationAccountCA: Codeunit "Create Allocation Account CA"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; trigger OnRun() var @@ -51,7 +51,7 @@ codeunit 11507 "Create E-Doc Sample Inv. CA" EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108427', YearlyLicenstCostLbl, 390); EDocSamplePurchaseInvoice.AddLine( - Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountCA.LicensesDescription(), 6, 500, '', CreateCommonUnitOfMeasure.Piece()); + Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 6, 500, '', CreateCommonUnitOfMeasure.Piece()); EDocSamplePurchaseInvoice.Generate(); end; } diff --git a/Apps/CH/ContosoCoffeeDemoDatasetCH/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCH.Codeunit.al b/Apps/CH/ContosoCoffeeDemoDatasetCH/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCH.Codeunit.al new file mode 100644 index 0000000000..2e3249ff6c --- /dev/null +++ b/Apps/CH/ContosoCoffeeDemoDatasetCH/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCH.Codeunit.al @@ -0,0 +1,22 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ + +namespace Microsoft.DemoData.Finance; + +codeunit 11636 "Create Allocation Account CH" +{ + InherentEntitlements = X; + InherentPermissions = X; + + trigger OnRun() + var + FinanceModuleSetup: Record "Finance Module Setup"; + CreateCHGLAccounts: Codeunit "Create CH GL Accounts"; + begin + FinanceModuleSetup.Get(); + FinanceModuleSetup."Yearly License All. GLAcc No." := CreateCHGLAccounts.ItHardwareAndSoftware(); + FinanceModuleSetup.Modify(); + end; +} diff --git a/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/DemoData/Finance/1. Setup Data/CreateGLAccountCZ.Codeunit.al b/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/DemoData/Finance/1. Setup Data/CreateGLAccountCZ.Codeunit.al index 2ac775568b..24eaeb21e2 100644 --- a/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/DemoData/Finance/1. Setup Data/CreateGLAccountCZ.Codeunit.al +++ b/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/DemoData/Finance/1. Setup Data/CreateGLAccountCZ.Codeunit.al @@ -49,7 +49,7 @@ codeunit 31182 "Create G/L Account CZ" SubCategory := Format(GLAccountCategoryMgtCZL.GetBI1IntangibleResultsofResearchandDevelopment(), 80); ContosoGLAccount.InsertGLAccount(Intangibleresultsofresearchanddevelopment(), IntangibleresultsofresearchanddevelopmentName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Assets, SubCategory, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false); SubCategory := Format(GLAccountCategoryMgtCZL.GetBI21Software(), 80); - ContosoGLAccount.InsertGLAccount(CreateGLAccount.Software(), CreateGLAccount.SoftwareName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Assets, SubCategory, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false); + ContosoGLAccount.InsertGLAccount(CreateGLAccount.Software(), CreateGLAccount.SoftwareName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Assets, SubCategory, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false); SubCategory := Format(GLAccountCategoryMgtCZL.GetBI22OtherValuableRights(), 80); ContosoGLAccount.InsertGLAccount(Valuablerights(), ValuablerightsName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Assets, SubCategory, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false); SubCategory := Format(GLAccountCategoryMgtCZL.GetBI3Goodwill(), 80); diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/UserSetupCZL.PageExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/UserSetupCZL.PageExt.al index f2970e286e..6bc47fc55c 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/UserSetupCZL.PageExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/UserSetupCZL.PageExt.al @@ -17,6 +17,11 @@ pageextension 11721 "User Setup CZL" extends "User Setup" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the connectivity between User ID and employee number.'; } + field("User Name CZL"; Rec."User Name CZL") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the short name for the user.'; + } } addlast(Control1) { @@ -80,11 +85,6 @@ pageextension 11721 "User Setup CZL" extends "User Setup" ToolTip = 'Specifies the possibillity to allow or not allow complete job.'; Visible = IsUserChecksAllowed; } - field("User Name CZL"; Rec."User Name CZL") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the short name for the user.'; - } field("Check Location Code CZL"; Rec."Check Location Code CZL") { ApplicationArea = Basic, Suite; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/UserSetupCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/UserSetupCZL.TableExt.al index f2b22af493..5ad4d71105 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/UserSetupCZL.TableExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/UserSetupCZL.TableExt.al @@ -79,6 +79,20 @@ tableextension 11717 "User Setup CZL" extends "User Setup" Caption = 'Employee No.'; TableRelation = Employee; DataClassification = CustomerContent; + + trigger OnValidate() + var + Employee: Record Employee; + begin + if ("Employee No. CZL" = '') or ("Employee No. CZL" = xRec."Employee No. CZL") then + exit; + + if Employee.Get("Employee No. CZL") then begin + "User Name CZL" := Employee.FullName(); + "Phone No." := Employee."Phone No."; + "E-Mail" := Employee."Company E-Mail"; + end; + end; } field(11782; "User Name CZL"; Text[100]) { @@ -147,6 +161,7 @@ tableextension 11717 "User Setup CZL" extends "User Setup" UserSetup.Init(); UserSetup := Rec; + UserSetup."Salespers./Purch. Code" := OldUserSetup."Salespers./Purch. Code"; UserSetup."Employee No. CZL" := OldUserSetup."Employee No. CZL"; UserSetup."Phone No." := OldUserSetup."Phone No."; UserSetup."E-Mail" := OldUserSetup."E-Mail"; diff --git a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/DEContosoLocalization.Codeunit.al b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/DEContosoLocalization.Codeunit.al index a6ece8e24f..10d1c0860d 100644 --- a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/DEContosoLocalization.Codeunit.al +++ b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/DEContosoLocalization.Codeunit.al @@ -97,10 +97,7 @@ codeunit 11113 "DE Contoso Localization" Codeunit.Run(Codeunit::"Create DE Data Export Record"); end; Enum::"Contoso Demo Data Level"::"Master Data": - begin - Codeunit.Run(Codeunit::"Create DE Currency Ex. Rate"); - Codeunit.Run(Codeunit::"Create Allocation Account DE"); - end; + Codeunit.Run(Codeunit::"Create DE Currency Ex. Rate"); end; end; @@ -140,6 +137,8 @@ codeunit 11113 "DE Contoso Localization" FinanceModuleSetup.InitRecord(); CreateDEVatPostingGroup.InsertVATProductPostingGroup(); end; + if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then + Codeunit.Run(Codeunit::"Create Allocation Account DE"); BindSubscription(CreateDEAccScheduleLine); BindSubscription(CreateDEAnalysisView); BindSubscription(CreateDECurrencyExRate); diff --git a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateAllocationAccountDE.Codeunit.al b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateAllocationAccountDE.Codeunit.al index 9888ed80a2..1de0c4716b 100644 --- a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateAllocationAccountDE.Codeunit.al +++ b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateAllocationAccountDE.Codeunit.al @@ -5,9 +5,6 @@ namespace Microsoft.DemoData.Finance; -using Microsoft.DemoTool.Helpers; -using Microsoft.Finance.AllocationAccount; - codeunit 11386 "Create Allocation Account DE" { InherentEntitlements = X; @@ -15,21 +12,12 @@ codeunit 11386 "Create Allocation Account DE" trigger OnRun() var - AllocationAccount: Record "Allocation Account"; - AllocAccountDistribution: Record "Alloc. Account Distribution"; - ContosoAllocationAccount: Codeunit "Contoso Allocation Account"; - CreateDimensionValue: Codeunit "Create Dimension Value"; + FinanceModuleSetup: Record "Finance Module Setup"; CreateGLAccDE: Codeunit "Create DE GL Acc."; begin - ContosoAllocationAccount.InsertAllocationAccount( - Licenses(), LicensesDescription(), - AllocationAccount."Account Type"::Fixed, AllocationAccount."Document Lines Split"::"Split Amount"); - ContosoAllocationAccount.InsertAllocationAccountDistribution( - Licenses(), 10000, AllocAccountDistribution."Account Type"::Fixed, 1, 50, - AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccDE.Softwareandsubscriptionfees(), CreateDimensionValue.AdministrationDepartment(), ''); - ContosoAllocationAccount.InsertAllocationAccountDistribution( - Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50, - AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccDE.Softwareandsubscriptionfees(), CreateDimensionValue.SalesDepartment(), ''); + FinanceModuleSetup.Get(); + FinanceModuleSetup."Yearly License All. GLAcc No." := CreateGLAccDE.Softwareandsubscriptionfees(); + FinanceModuleSetup.Modify(); end; procedure Licenses(): Code[20] diff --git a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al index 2500cf84c3..54c911b064 100644 --- a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al +++ b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al @@ -101,13 +101,12 @@ codeunit 13917 "Export ZUGFeRD Document" local procedure AddXMLAttachmentToRenderingPayload(var XmlAttachmentTempBlob: Codeunit "Temp Blob"; var RenderingPayload: JsonObject) var + PDFDocument: Codeunit "PDF Document"; + DataType: Enum "PDF Attach. Data Relationship"; XmlInStream: InStream; - XmlOutStream: OutStream; Name: Text; MimeType: Text; Description: Text; - DataType: Enum "PDF Attach. Data Relationship"; - PDFDocument: Codeunit "PDF Document"; begin PDFDocument.Initialize(); Name := 'factur-x.xml'; diff --git a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/PostedSalesInvoice.ReportExt.al b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/PostedSalesInvoice.ReportExt.al index 378df13cf3..a2a27eaef7 100644 --- a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/PostedSalesInvoice.ReportExt.al +++ b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/PostedSalesInvoice.ReportExt.al @@ -5,8 +5,6 @@ namespace Microsoft.eServices.EDocument.Formats; using Microsoft.Sales.History; -using System.IO; -using System.Utilities; reportextension 13918 "Posted Sales Invoice" extends "Standard Sales - Invoice" { diff --git a/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateDemoEDocsDE.Codeunit.al b/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateDemoEDocsDE.Codeunit.al index d6a2f76754..f168eea383 100644 --- a/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateDemoEDocsDE.Codeunit.al +++ b/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateDemoEDocsDE.Codeunit.al @@ -28,7 +28,7 @@ codeunit 11370 "Create Demo EDocs DE" procedure GetShipmentDHLInvoiceDescription(): Text[100] var - ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100; + ShipmentDHLLbl: Label 'Shipment', MaxLength = 100; begin exit(ShipmentDHLLbl); end; @@ -40,7 +40,7 @@ codeunit 11370 "Create Demo EDocs DE" CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateEDocumentMasterData: Codeunit "Create E-Document Master Data"; CreateJobItem: Codeunit "Create Job Item"; - CreateAllocationAccountDE: Codeunit "Create Allocation Account DE"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; CreateDeferralTemplate: Codeunit "Create Deferral Template"; EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice"; AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100; @@ -48,44 +48,48 @@ codeunit 11370 "Create Demo EDocs DE" AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100; AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100; AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100; + SavedWorkDate, SampleInvoiceDate : Date; begin - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245', 0); + SavedWorkDate := WorkDate(); + SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(); + WorkDate(SampleInvoiceDate); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 0); ContosoInboundEDocument.AddEDocPurchaseLine( - Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountDE.Licenses(), - CreateAllocationAccountDE.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); + Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), + CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 84); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 84); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDE.LegalFeesandAttorneyServices(), AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 266); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 266); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDE.LegalFeesandAttorneyServices(), AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 28); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 28); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDE.LegalFeesandAttorneyServices(), AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 224); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 224); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDE.LegalFeesandAttorneyServices(), AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 98); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 98); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDE.LegalFeesandAttorneyServices(), AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938', 0); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 0); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 5, '', CreateCommonUnitOfMeasure.Piece()); @@ -97,7 +101,7 @@ codeunit 11370 "Create Demo EDocs DE" GetShipmentDHLInvoiceDescription(), 1, 60, '', ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982', 7571.5); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 7571.5); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece()); @@ -105,6 +109,7 @@ codeunit 11370 "Create Demo EDocs DE" Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece()); ContosoInboundEDocument.Generate(); + WorkDate(SavedWorkDate); end; } diff --git a/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateEDocSampleInvDE.Codeunit.al b/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateEDocSampleInvDE.Codeunit.al index cc9f38b94b..2a4fc75f47 100644 --- a/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateEDocSampleInvDE.Codeunit.al +++ b/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateEDocSampleInvDE.Codeunit.al @@ -25,7 +25,7 @@ codeunit 11371 "Create E-Doc Sample Inv. DE" CreateJobItem: Codeunit "Create Job Item"; CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateDemoEDocsDE: Codeunit "Create Demo EDocs DE"; - CreateAllocationAccountDE: Codeunit "Create Allocation Account DE"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; trigger OnRun() var @@ -51,7 +51,7 @@ codeunit 11371 "Create E-Doc Sample Inv. DE" EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl); EDocSamplePurchaseInvoice.AddLine( - Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountDE.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece()); + Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece()); EDocSamplePurchaseInvoice.Generate(); end; } diff --git a/Apps/DE/EDocumentDE/test/src/ZUGFeRDCustomSalesInvoice.Report.al b/Apps/DE/EDocumentDE/test/src/ZUGFeRDCustomSalesInvoice.Report.al index bd95edcc5e..0f0b2b77e2 100644 --- a/Apps/DE/EDocumentDE/test/src/ZUGFeRDCustomSalesInvoice.Report.al +++ b/Apps/DE/EDocumentDE/test/src/ZUGFeRDCustomSalesInvoice.Report.al @@ -53,5 +53,4 @@ report 13918 "ZUGFeRD Custom Sales Invoice" ExportZUGFeRDDocument.CreateAndAddXMLAttachmentToRenderingPayload(Header, RenderingPayload); end; - } \ No newline at end of file diff --git a/Apps/DE/IntrastatDE/app/AppResources/DE_DataExchDefMap.xml b/Apps/DE/IntrastatDE/app/AppResources/DE_DataExchDefMap.xml index 03e0c8fd82..163643202a 100644 --- a/Apps/DE/IntrastatDE/app/AppResources/DE_DataExchDefMap.xml +++ b/Apps/DE/IntrastatDE/app/AppResources/DE_DataExchDefMap.xml @@ -140,7 +140,7 @@ - + diff --git a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/DKContosoLocalization.Codeunit.al b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/DKContosoLocalization.Codeunit.al index b1e76137f4..4463b1b7f0 100644 --- a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/DKContosoLocalization.Codeunit.al +++ b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/DKContosoLocalization.Codeunit.al @@ -86,10 +86,7 @@ codeunit 13750 "DK Contoso Localization" Codeunit.Run(Codeunit::"Create VAT Setup Post.Grp. DK"); end; Enum::"Contoso Demo Data Level"::"Master Data": - begin - Codeunit.Run(Codeunit::"Create Currency Ex. Rate DK"); - Codeunit.Run(Codeunit::"Create Allocation Account DK"); - end; + Codeunit.Run(Codeunit::"Create Currency Ex. Rate DK"); end; end; @@ -177,6 +174,8 @@ codeunit 13750 "DK Contoso Localization" Codeunit.Run(Codeunit::"Create Vat Posting Groups DK"); CreatePostingGroupsDK.InsertGenPostingGroup(); end; + if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then + Codeunit.Run(Codeunit::"Create Allocation Account DK"); BindSubscription(CreatePostingGroupsDK); BindSubscription(CreateAnalysisViewDK); BindSubscription(CreateAccScheduleLineDK); diff --git a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateDK.Codeunit.al b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateDK.Codeunit.al index 03e4791f0d..65adf174ea 100644 --- a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateDK.Codeunit.al +++ b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateDK.Codeunit.al @@ -10,11 +10,13 @@ codeunit 13735 "Create Deferral Template DK" InherentEntitlements = X; InherentPermissions = X; - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Deferral Template", OnDefineDeferralAccountNo, '', false, false)] - local procedure OnDefineDeferralAccountNo(var DeferralAccountNo: Code[20]) + trigger OnRun() var + FinanceModuleSetup: Record "Finance Module Setup"; CreateGLAccDK: Codeunit "Create GL Acc. DK"; begin - DeferralAccountNo := CreateGLAccDK.Deferrals(); + FinanceModuleSetup.Get(); + FinanceModuleSetup."Deferral Account No." := CreateGLAccDK.Deferrals(); + FinanceModuleSetup.Modify(); end; } \ No newline at end of file diff --git a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateGLAccDK.Codeunit.al b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateGLAccDK.Codeunit.al index 855cbdcfbb..82a84d2621 100644 --- a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateGLAccDK.Codeunit.al +++ b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateGLAccDK.Codeunit.al @@ -385,6 +385,8 @@ codeunit 13721 "Create GL Acc. DK" ContosoGLAccount.InsertGLAccount(Resultbeforetax(), ResultbeforetaxName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::" ", Enum::"G/L Account Type"::Total, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false); ContosoGLAccount.InsertGLAccount(Periodearnings(), PeriodearningsName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::" ", Enum::"G/L Account Type"::Total, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false); ContosoGLAccount.InsertGLAccount(Balance(), BalanceName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::" ", Enum::"G/L Account Type"::Heading, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false); + + Codeunit.Run(Codeunit::"Create Deferral Template DK"); end; [EventSubscriber(ObjectType::Codeunit, Codeunit::"Create G/L Account", 'OnAfterAddGLAccountsForLocalization', '', false, false)] diff --git a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/2.Master Data/CreateAllocationAccountDK.Codeunit.al b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/2.Master Data/CreateAllocationAccountDK.Codeunit.al index 41a5f128bb..de3dd469ed 100644 --- a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/2.Master Data/CreateAllocationAccountDK.Codeunit.al +++ b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/2.Master Data/CreateAllocationAccountDK.Codeunit.al @@ -5,9 +5,6 @@ namespace Microsoft.DemoData.Finance; -using Microsoft.DemoTool.Helpers; -using Microsoft.Finance.AllocationAccount; - codeunit 13805 "Create Allocation Account DK" { InherentEntitlements = X; @@ -15,21 +12,12 @@ codeunit 13805 "Create Allocation Account DK" trigger OnRun() var - AllocationAccount: Record "Allocation Account"; - AllocAccountDistribution: Record "Alloc. Account Distribution"; - ContosoAllocationAccount: Codeunit "Contoso Allocation Account"; - CreateDimensionValue: Codeunit "Create Dimension Value"; + FinanceModuleSetup: Record "Finance Module Setup"; CreateGLAccDK: Codeunit "Create GL Acc. DK"; begin - ContosoAllocationAccount.InsertAllocationAccount( - Licenses(), LicensesDescription(), - AllocationAccount."Account Type"::Fixed, AllocationAccount."Document Lines Split"::"Split Amount"); - ContosoAllocationAccount.InsertAllocationAccountDistribution( - Licenses(), 10000, AllocAccountDistribution."Account Type"::Fixed, 1, 50, - AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccDK.Itexpenses(), CreateDimensionValue.AdministrationDepartment(), ''); - ContosoAllocationAccount.InsertAllocationAccountDistribution( - Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50, - AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccDK.Itexpenses(), CreateDimensionValue.SalesDepartment(), ''); + FinanceModuleSetup.Get(); + FinanceModuleSetup."Yearly License All. GLAcc No." := CreateGLAccDK.Itexpenses(); + FinanceModuleSetup.Modify(); end; procedure Licenses(): Code[20] diff --git a/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateDemoEDocsDK.Codeunit.al b/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateDemoEDocsDK.Codeunit.al index 25bf527685..f1d4316a16 100644 --- a/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateDemoEDocsDK.Codeunit.al +++ b/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateDemoEDocsDK.Codeunit.al @@ -28,7 +28,7 @@ codeunit 13670 "Create Demo EDocs DK" procedure GetShipmentDHLInvoiceDescription(): Text[100] var - ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100; + ShipmentDHLLbl: Label 'Shipment', MaxLength = 100; begin exit(ShipmentDHLLbl); end; @@ -40,7 +40,7 @@ codeunit 13670 "Create Demo EDocs DK" CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateEDocumentMasterData: Codeunit "Create E-Document Master Data"; CreateJobItem: Codeunit "Create Job Item"; - CreateAllocationAccountDK: Codeunit "Create Allocation Account DK"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; CreateDeferralTemplate: Codeunit "Create Deferral Template"; EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice"; AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100; @@ -48,44 +48,48 @@ codeunit 13670 "Create Demo EDocs DK" AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100; AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100; AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100; + SavedWorkDate, SampleInvoiceDate : Date; begin - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245', 750); + SavedWorkDate := WorkDate(); + SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(); + WorkDate(SampleInvoiceDate); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 750); ContosoInboundEDocument.AddEDocPurchaseLine( - Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountDK.Licenses(), - CreateAllocationAccountDK.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); + Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), + CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 300); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 300); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDK.Auditingaccountingassistance(), AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 950); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 950); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDK.Auditingaccountingassistance(), AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 100); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 100); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDK.Auditingaccountingassistance(), AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 800); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 800); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDK.Auditingaccountingassistance(), AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 350); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 350); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDK.Auditingaccountingassistance(), AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938', 890); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 890); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 5, '', CreateCommonUnitOfMeasure.Piece()); @@ -97,7 +101,7 @@ codeunit 13670 "Create Demo EDocs DK" GetShipmentDHLInvoiceDescription(), 1, 60, '', ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982', 0); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 0); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece()); @@ -105,6 +109,7 @@ codeunit 13670 "Create Demo EDocs DK" Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece()); ContosoInboundEDocument.Generate(); + WorkDate(SavedWorkDate); end; } diff --git a/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateEDocSampleInvDK.Codeunit.al b/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateEDocSampleInvDK.Codeunit.al index 75c98cf654..71e28b1a8a 100644 --- a/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateEDocSampleInvDK.Codeunit.al +++ b/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateEDocSampleInvDK.Codeunit.al @@ -25,7 +25,7 @@ codeunit 13671 "Create E-Doc Sample Inv. DK" CreateJobItem: Codeunit "Create Job Item"; CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateDemoEDocsDK: Codeunit "Create Demo EDocs DK"; - CreateAllocationAccountDK: Codeunit "Create Allocation Account DK"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; trigger OnRun() var @@ -51,7 +51,7 @@ codeunit 13671 "Create E-Doc Sample Inv. DK" EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl, 1250); EDocSamplePurchaseInvoice.AddLine( - Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountDK.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece()); + Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece()); EDocSamplePurchaseInvoice.Generate(); end; } diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/ESContosoLocalization.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/ESContosoLocalization.Codeunit.al index de6e9eccc6..e7bb4896af 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/ESContosoLocalization.Codeunit.al +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/ESContosoLocalization.Codeunit.al @@ -142,7 +142,6 @@ codeunit 10824 "ES Contoso Localization" begin Codeunit.Run(Codeunit::"Create ES Column Layout"); Codeunit.Run(Codeunit::"Create ES Currency Exch"); - Codeunit.Run(Codeunit::"Create Allocation Account ES"); end; end; end; @@ -186,6 +185,8 @@ codeunit 10824 "ES Contoso Localization" FinanceModuleSetup.InitRecord(); Codeunit.Run(Codeunit::"Create ES VAT Posting Groups"); end; + if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then + Codeunit.Run(Codeunit::"Create Allocation Account ES"); BindSubscription(CreateESResource); BindSubscription(CreateESAnalysisView); BindSubscription(CreateESAccScheduleLine); diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateES.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateES.Codeunit.al index a1a5060198..b6d21198ec 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateES.Codeunit.al +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateES.Codeunit.al @@ -10,11 +10,13 @@ codeunit 10885 "Create Deferral Template ES" InherentEntitlements = X; InherentPermissions = X; - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Deferral Template", OnDefineDeferralAccountNo, '', false, false)] - local procedure OnDefineDeferralAccountNo(var DeferralAccountNo: Code[20]) + trigger OnRun() var + FinanceModuleSetup: Record "Finance Module Setup"; CreateESGLAccounts: Codeunit "Create ES GL Accounts"; begin - DeferralAccountNo := CreateESGLAccounts.OtherCreditors(); + FinanceModuleSetup.Get(); + FinanceModuleSetup."Deferral Account No." := CreateESGLAccounts.OtherCreditors(); + FinanceModuleSetup.Modify(); end; } \ No newline at end of file diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESGLAccounts.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESGLAccounts.Codeunit.al index 8c388bb1c6..58cee10578 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESGLAccounts.Codeunit.al +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESGLAccounts.Codeunit.al @@ -2642,6 +2642,8 @@ codeunit 10780 "Create ES GL Accounts" ContosoGLAccount.SetOverwriteData(false); UpdateIncomeStatmentBalanceAccount(); UpdateAPIAccountTypeToGLAccount(); + + Codeunit.Run(Codeunit::"Create Deferral Template ES"); end; local procedure UpdateIncomeStatmentBalanceAccount() diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateAllocationAccountES.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateAllocationAccountES.Codeunit.al index 724beb7d15..7a47953251 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateAllocationAccountES.Codeunit.al +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateAllocationAccountES.Codeunit.al @@ -5,9 +5,6 @@ namespace Microsoft.DemoData.Finance; -using Microsoft.DemoTool.Helpers; -using Microsoft.Finance.AllocationAccount; - codeunit 10884 "Create Allocation Account ES" { InherentEntitlements = X; @@ -15,21 +12,12 @@ codeunit 10884 "Create Allocation Account ES" trigger OnRun() var - AllocationAccount: Record "Allocation Account"; - AllocAccountDistribution: Record "Alloc. Account Distribution"; - ContosoAllocationAccount: Codeunit "Contoso Allocation Account"; - CreateDimensionValue: Codeunit "Create Dimension Value"; + FinanceModuleSetup: Record "Finance Module Setup"; CreateESGLAccounts: Codeunit "Create ES GL Accounts"; begin - ContosoAllocationAccount.InsertAllocationAccount( - Licenses(), LicensesDescription(), - AllocationAccount."Account Type"::Fixed, AllocationAccount."Document Lines Split"::"Split Amount"); - ContosoAllocationAccount.InsertAllocationAccountDistribution( - Licenses(), 10000, AllocAccountDistribution."Account Type"::Fixed, 1, 50, - AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateESGLAccounts.OtherServices(), CreateDimensionValue.AdministrationDepartment(), ''); - ContosoAllocationAccount.InsertAllocationAccountDistribution( - Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50, - AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateESGLAccounts.OtherServices(), CreateDimensionValue.SalesDepartment(), ''); + FinanceModuleSetup.Get(); + FinanceModuleSetup."Yearly License All. GLAcc No." := CreateESGLAccounts.OtherServices(); + FinanceModuleSetup.Modify(); end; procedure Licenses(): Code[20] diff --git a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/VerifactuExport.Codeunit.al b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/VerifactuExport.Codeunit.al index 34feb2ed7b..d5694080d3 100644 --- a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/VerifactuExport.Codeunit.al +++ b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/VerifactuExport.Codeunit.al @@ -23,7 +23,13 @@ codeunit 10778 "Verifactu Export" InherentPermissions = X; Permissions = tabledata "E-Document" = rimd, tabledata "E-Document Log" = rimd, - tabledata "E-Doc. Data Storage" = rimd; + tabledata "E-Doc. Data Storage" = rimd, + tabledata "Sales Invoice Header" = rm, + tabledata "Sales Invoice Line" = rm, + tabledata "Sales Cr.Memo Header" = rm, + tabledata "Sales Cr.Memo Line" = rm, + tabledata "Service Invoice Header" = rm, + tabledata "Service Invoice Line" = rm; var CompanyInformation: Record "Company Information"; diff --git a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al index d0fa0474e7..939c993f24 100644 --- a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al +++ b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al @@ -5,6 +5,7 @@ namespace Microsoft.EServices.EDocument.Verifactu; using Microsoft.EServices.EDocument; +using System.Environment; using System.Privacy; using System.Security.Encryption; using System.Utilities; @@ -108,6 +109,7 @@ table 10777 "Verifactu Setup" var UrlHelper: Codeunit "Url Helper"; + EnvironmentInformation: Codeunit "Environment Information"; CannotEnableWithoutCertificateErr: Label 'The setup cannot be enabled without a valid certificate.'; DisableSIIQst: Label 'SII setup will be disabled. Do you want to proceed?'; DocumentSubmissionEndpointUrlTxt: Label 'https://www1.agenciatributaria.gob.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP', Locked = true; @@ -125,7 +127,7 @@ table 10777 "Verifactu Setup" internal procedure GetQRCodeValidationEndpointUrl(): Text begin - if UrlHelper.IsPPE() then + if UrlHelper.IsPPE() or EnvironmentInformation.IsSandbox() then exit(QRCodeValidationSandboxEndpointUrlTxt); exit(QRCodeValidationEndpointUrlTxt); @@ -133,7 +135,7 @@ table 10777 "Verifactu Setup" internal procedure GetDocumentSubmissionEndpointUrl(): Text begin - if UrlHelper.IsPPE() then + if UrlHelper.IsPPE() or EnvironmentInformation.IsSandbox() then exit(DocumentSubmissionSandboxEndpointUrlTxt); exit(DocumentSubmissionEndpointUrlTxt); diff --git a/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateDemoEDocsES.Codeunit.al b/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateDemoEDocsES.Codeunit.al index a20af0db72..ed87c31c3d 100644 --- a/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateDemoEDocsES.Codeunit.al +++ b/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateDemoEDocsES.Codeunit.al @@ -28,7 +28,7 @@ codeunit 10886 "Create Demo EDocs ES" procedure GetShipmentDHLInvoiceDescription(): Text[100] var - ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100; + ShipmentDHLLbl: Label 'Shipment', MaxLength = 100; begin exit(ShipmentDHLLbl); end; @@ -40,7 +40,7 @@ codeunit 10886 "Create Demo EDocs ES" CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateEDocumentMasterData: Codeunit "Create E-Document Master Data"; CreateJobItem: Codeunit "Create Job Item"; - CreateAllocationAccountES: Codeunit "Create Allocation Account ES"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; CreateDeferralTemplate: Codeunit "Create Deferral Template"; EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice"; AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100; @@ -48,44 +48,48 @@ codeunit 10886 "Create Demo EDocs ES" AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100; AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100; AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100; + SavedWorkDate, SampleInvoiceDate : Date; begin - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245'); + SavedWorkDate := WorkDate(); + SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(); + WorkDate(SampleInvoiceDate); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245'); ContosoInboundEDocument.AddEDocPurchaseLine( - Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountES.Licenses(), - CreateAllocationAccountES.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); + Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), + CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 252); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 252); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateESGLAccounts.ProfessionalAdvisoryServices(), AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 798); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 798); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateESGLAccounts.ProfessionalAdvisoryServices(), AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 84); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 84); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateESGLAccounts.ProfessionalAdvisoryServices(), AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 672); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 672); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateESGLAccounts.ProfessionalAdvisoryServices(), AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 294); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 294); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateESGLAccounts.ProfessionalAdvisoryServices(), AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938'); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938'); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 5, '', CreateCommonUnitOfMeasure.Piece()); @@ -97,7 +101,7 @@ codeunit 10886 "Create Demo EDocs ES" GetShipmentDHLInvoiceDescription(), 1, 60, '', ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982', 8368.5); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 8368.5); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece()); @@ -105,6 +109,7 @@ codeunit 10886 "Create Demo EDocs ES" Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece()); ContosoInboundEDocument.Generate(); + WorkDate(SavedWorkDate); end; } diff --git a/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateEDocSampleInvES.Codeunit.al b/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateEDocSampleInvES.Codeunit.al index 1223aaccf6..c4f73e9289 100644 --- a/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateEDocSampleInvES.Codeunit.al +++ b/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateEDocSampleInvES.Codeunit.al @@ -25,7 +25,7 @@ codeunit 10887 "Create E-Doc Sample Inv. ES" CreateJobItem: Codeunit "Create Job Item"; CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateDemoEDocsES: Codeunit "Create Demo EDocs ES"; - CreateAllocationAccountES: Codeunit "Create Allocation Account ES"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; trigger OnRun() var @@ -51,7 +51,7 @@ codeunit 10887 "Create E-Doc Sample Inv. ES" EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl); EDocSamplePurchaseInvoice.AddLine( - Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountES.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece()); + Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece()); EDocSamplePurchaseInvoice.Generate(); end; } diff --git a/Apps/ES/IntrastatES/app/AppResources/ES_DataExchDefMap.xml b/Apps/ES/IntrastatES/app/AppResources/ES_DataExchDefMap.xml index 8ef32911ba..5693464b7b 100644 --- a/Apps/ES/IntrastatES/app/AppResources/ES_DataExchDefMap.xml +++ b/Apps/ES/IntrastatES/app/AppResources/ES_DataExchDefMap.xml @@ -37,7 +37,7 @@ - + diff --git a/Apps/FI/ContosoCoffeeDemoDatasetFI/app/DemoData/Finance/2.Master Data/CreateAllocationAccountFI.Codeunit.al b/Apps/FI/ContosoCoffeeDemoDatasetFI/app/DemoData/Finance/2.Master Data/CreateAllocationAccountFI.Codeunit.al new file mode 100644 index 0000000000..8d9d3c8170 --- /dev/null +++ b/Apps/FI/ContosoCoffeeDemoDatasetFI/app/DemoData/Finance/2.Master Data/CreateAllocationAccountFI.Codeunit.al @@ -0,0 +1,22 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ + +namespace Microsoft.DemoData.Finance; + +codeunit 13457 "Create Allocation Account FI" +{ + InherentEntitlements = X; + InherentPermissions = X; + + trigger OnRun() + var + FinanceModuleSetup: Record "Finance Module Setup"; + CreateFIGLAccounts: Codeunit "Create FI GL Accounts"; + begin + FinanceModuleSetup.Get(); + FinanceModuleSetup."Yearly License All. GLAcc No." := CreateFIGLAccounts.ITservices(); + FinanceModuleSetup.Modify(); + end; +} diff --git a/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapRcpt.xml b/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapRcpt.xml index fe2f09184e..7b88ec20ec 100644 --- a/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapRcpt.xml +++ b/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapRcpt.xml @@ -20,7 +20,7 @@ - + TRIMALL diff --git a/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapShpt.xml b/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapShpt.xml index a093af55cf..63417a693e 100644 --- a/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapShpt.xml +++ b/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapShpt.xml @@ -20,7 +20,7 @@ - + TRIMALL diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Bank/2. Master Data/CreateBankAccountFR.Codeunit.al b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Bank/2. Master Data/CreateBankAccountFR.Codeunit.al index 52225cad14..d034cead08 100644 --- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Bank/2. Master Data/CreateBankAccountFR.Codeunit.al +++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Bank/2. Master Data/CreateBankAccountFR.Codeunit.al @@ -24,27 +24,43 @@ codeunit 10874 "Create Bank Account FR" ContosoCoffeDemoDataSetup.Get(); case Rec."No." of CreateBankAccount.Checking(): +#if not CLEAN28 ValidateBankAccount(Rec, '98765432105', CityParisLbl, PostcodeParisLbl, CheckingBankBranchNoLbl, -1447200, AgencyCodeLbl, 72, true); +#else + ValidateBankAccount(Rec, '98765432105', CityParisLbl, PostcodeParisLbl, CheckingBankBranchNoLbl, -1447200); +#endif CreateBankAccount.Savings(): +#if not CLEAN28 ValidateBankAccount(Rec, '98765432105', CityParisLbl, PostcodeParisLbl, CheckingBankBranchNoLbl, 0, AgencyCodeLbl, 72, true); +#else + ValidateBankAccount(Rec, '98765432105', CityParisLbl, PostcodeParisLbl, CheckingBankBranchNoLbl, 0); +#endif end; end; +#if not CLEAN28 local procedure ValidateBankAccount(var BankAccount: Record "Bank Account"; BankAccountNo: Text[30]; BankAccCity: Text[30]; PostCode: Code[20]; BankBranchNo: Text[30]; MinBalance: Decimal; AgencyCode: Text[5]; RibKey: Integer; RibChecked: Boolean) +#else + local procedure ValidateBankAccount(var BankAccount: Record "Bank Account"; BankAccountNo: Text[30]; BankAccCity: Text[30]; PostCode: Code[20]; BankBranchNo: Text[30]; MinBalance: Decimal) +#endif begin BankAccount.Validate(City, BankAccCity); BankAccount.Validate("Post Code", PostCode); BankAccount.Validate("Bank Branch No.", BankBranchNo); BankAccount.Validate("Bank Account No.", BankAccountNo); BankAccount.Validate("Min. Balance", MinBalance); +#if not CLEAN28 BankAccount.Validate("Agency Code", AgencyCode); BankAccount.Validate("RIB Key", RibKey); BankAccount.Validate("RIB Checked", RibChecked); +#endif end; var CityParisLbl: Label 'Paris', MaxLength = 30; PostcodeParisLbl: Label '75015', MaxLength = 20; CheckingBankBranchNoLbl: Label '00987', MaxLength = 20; +#if not CLEAN28 AgencyCodeLbl: Label '12356', MaxLength = 5; +#endif } diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/ContosoFRLocalization.Codeunit.al b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/ContosoFRLocalization.Codeunit.al index 0fea8b4efa..a037931047 100644 --- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/ContosoFRLocalization.Codeunit.al +++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/ContosoFRLocalization.Codeunit.al @@ -88,7 +88,6 @@ codeunit 10864 "Contoso FR Localization" begin Codeunit.Run(Codeunit::"Create Currency Exc. Rate FR"); Codeunit.Run(Codeunit::"Create Column Layout FR"); - Codeunit.Run(Codeunit::"Create Allocation Account FR"); end; end; end; diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Finance/2. Master Data/CreateAllocationAccountFR.Codeunit.al b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Finance/2. Master Data/CreateAllocationAccountFR.Codeunit.al index 0c1334eb4d..9800f5a914 100644 --- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Finance/2. Master Data/CreateAllocationAccountFR.Codeunit.al +++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Finance/2. Master Data/CreateAllocationAccountFR.Codeunit.al @@ -1,3 +1,4 @@ +#if not CLEAN28 // ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,6 +13,9 @@ codeunit 10950 "Create Allocation Account FR" { InherentEntitlements = X; InherentPermissions = X; + ObsoleteState = Pending; + ObsoleteReason = 'Replaced by Create Allocation Account Codeunit in ContosoCoffeeDemoDataset'; + ObsoleteTag = '28.0'; trigger OnRun() var @@ -46,3 +50,4 @@ codeunit 10950 "Create Allocation Account FR" LicensesTok: Label 'LICENSES', MaxLength = 20; YearlyLicenseFeeTok: Label 'Yearly license fee, design software', MaxLength = 100; } +#endif diff --git a/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateDemoEDocsFR.Codeunit.al b/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateDemoEDocsFR.Codeunit.al index 70a60bcda6..9a6aa6c7ff 100644 --- a/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateDemoEDocsFR.Codeunit.al +++ b/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateDemoEDocsFR.Codeunit.al @@ -28,7 +28,7 @@ codeunit 10911 "Create Demo EDocs FR" procedure GetShipmentDHLInvoiceDescription(): Text[100] var - ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100; + ShipmentDHLLbl: Label 'Shipment', MaxLength = 100; begin exit(ShipmentDHLLbl); end; @@ -41,7 +41,7 @@ codeunit 10911 "Create Demo EDocs FR" CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateEDocumentMasterData: Codeunit "Create E-Document Master Data"; CreateJobItem: Codeunit "Create Job Item"; - CreateAllocationAccountFR: Codeunit "Create Allocation Account FR"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; CreateDeferralTemplate: Codeunit "Create Deferral Template"; EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice"; AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100; @@ -49,44 +49,48 @@ codeunit 10911 "Create Demo EDocs FR" AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100; AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100; AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100; + SavedWorkDate, SampleInvoiceDate : Date; begin - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245', 0); + SavedWorkDate := WorkDate(); + SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(); + WorkDate(SampleInvoiceDate); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 0); ContosoInboundEDocument.AddEDocPurchaseLine( - Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountFR.Licenses(), - CreateAllocationAccountFR.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); + Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), + CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 240); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 240); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.LegalAndAccountingServices(), AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 760); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 760); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.LegalAndAccountingServices(), AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 80); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 80); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.LegalAndAccountingServices(), AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 640); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 640); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.LegalAndAccountingServices(), AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 280); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 280); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.LegalAndAccountingServices(), AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour()); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938', 0); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 0); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 5, '', CreateCommonUnitOfMeasure.Piece()); @@ -98,7 +102,7 @@ codeunit 10911 "Create Demo EDocs FR" GetShipmentDHLInvoiceDescription(), 1, 60, '', ''); ContosoInboundEDocument.Generate(); - ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982', 7970); + ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 7970); ContosoInboundEDocument.AddEDocPurchaseLine( Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece()); @@ -106,6 +110,7 @@ codeunit 10911 "Create Demo EDocs FR" Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece()); ContosoInboundEDocument.Generate(); + WorkDate(SavedWorkDate); end; } diff --git a/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateEDocSampleInvFR.Codeunit.al b/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateEDocSampleInvFR.Codeunit.al index ce4421299e..dd40a81d97 100644 --- a/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateEDocSampleInvFR.Codeunit.al +++ b/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateEDocSampleInvFR.Codeunit.al @@ -25,7 +25,7 @@ codeunit 10912 "Create E-Doc Sample Inv. FR" CreateJobItem: Codeunit "Create Job Item"; CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure"; CreateDemoEDocsFR: Codeunit "Create Demo EDocs FR"; - CreateAllocationAccountFR: Codeunit "Create Allocation Account FR"; + CreateAllocationAccount: Codeunit "Create Allocation Account"; trigger OnRun() var @@ -51,7 +51,7 @@ codeunit 10912 "Create E-Doc Sample Inv. FR" EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl); EDocSamplePurchaseInvoice.AddLine( - Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountFR.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece()); + Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece()); EDocSamplePurchaseInvoice.Generate(); end; } diff --git a/Apps/FR/FECAuditFile/app/src/ExportEngine/GenerateFileFEC.Codeunit.al b/Apps/FR/FECAuditFile/app/src/ExportEngine/GenerateFileFEC.Codeunit.al index b666da8fdd..e5dfd0d1dd 100644 --- a/Apps/FR/FECAuditFile/app/src/ExportEngine/GenerateFileFEC.Codeunit.al +++ b/Apps/FR/FECAuditFile/app/src/ExportEngine/GenerateFileFEC.Codeunit.al @@ -6,7 +6,6 @@ namespace Microsoft.Finance.AuditFileExport; using Microsoft.Bank.BankAccount; using Microsoft.Bank.Ledger; -using Microsoft.Finance.Currency; using Microsoft.Finance.GeneralLedger.Account; using Microsoft.Finance.GeneralLedger.Journal; using Microsoft.Finance.GeneralLedger.Ledger; @@ -827,32 +826,11 @@ codeunit 10826 "Generate File FEC" TextLine: Text; BlobOutStream: OutStream; begin - TempBlob.CreateOutStream(BlobOutStream); + TempBlob.CreateOutStream(BlobOutStream, TextEncoding::UTF8); foreach TextLine in LinesList do BlobOutStream.WriteText(TextLine); end; - local procedure GetCustomerReceivablesAccount(CustomerNo: Code[20]): Code[20] - var - DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; - CustomerPostingGroup: Record "Customer Posting Group"; - begin - DetailedCustLedgEntry.SetRange("Customer No.", CustomerNo); - DetailedCustLedgEntry.FindFirst(); - CustomerPostingGroup.Get(DetailedCustLedgEntry."Posting Group"); - exit(CustomerPostingGroup."Receivables Account"); - end; - - local procedure GetVendorPayablesAccount(VendorNo: Code[20]): Code[20] - var - Vendor: Record Vendor; - VendorPostingGroup: Record "Vendor Posting Group"; - begin - Vendor.Get(VendorNo); - VendorPostingGroup.Get(Vendor."Vendor Posting Group"); - exit(VendorPostingGroup."Payables Account"); - end; - local procedure AllowMultiplePosting(var PartyNo: Code[20]; var PartyName: Text[100]; GLEntry: Record "G/L Entry"; Customer: Record Customer) var AltCustPostGroup: Record "Alt. Customer Posting Group"; @@ -877,16 +855,4 @@ codeunit 10826 "Generate File FEC" end; until AltCustPostGroup.Next() = 0; end; - - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Exch. Rate Adjmt. Process", 'OnAfterInitDtldCustLedgerEntry', '', false, false)] - local procedure UpdateDtldCustLedgerEntryCurrAdjmtAccNo(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry") - begin - DetailedCustLedgEntry."Curr. Adjmt. G/L Account No." := GetCustomerReceivablesAccount(DetailedCustLedgEntry."Customer No."); - end; - - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Exch. Rate Adjmt. Process", 'OnAfterInitDtldVendLedgerEntry', '', false, false)] - local procedure UpdateDtldVendLedgerEntryCurrAdjmtAccNo(var DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry") - begin - DetailedVendorLedgEntry."Curr. Adjmt. G/L Account No." := GetVendorPayablesAccount(DetailedVendorLedgEntry."Vendor No."); - end; } diff --git a/Apps/FR/FECAuditFile/test/src/FECAuditFileExportTests.Codeunit.al b/Apps/FR/FECAuditFile/test/src/FECAuditFileExportTests.Codeunit.al index e92a0ff2eb..20e6fc74a6 100644 --- a/Apps/FR/FECAuditFile/test/src/FECAuditFileExportTests.Codeunit.al +++ b/Apps/FR/FECAuditFile/test/src/FECAuditFileExportTests.Codeunit.al @@ -2321,6 +2321,30 @@ codeunit 148017 "FEC Audit File Export Tests" VerifyDateLetFieldReport(GLRegister, AuditFile, VendorPostingGroup."Payables Account", InvoiceDocNo, "Gen. Journal Document Type"::Payment, Today); end; + [Test] + [HandlerFunctions('ConfirmHandlerYes')] + procedure VerifyAccentedCharactersFromTestExportGLEntries() + var + BankAccount: Record "Bank Account"; + GLRegister: Record "G/L Register"; + AuditFile: Record "Audit File"; + StartingDate: Date; + begin + // [SCENARIO 617634] Using the audit file export some accented characters are replaced by other characters which makes the file unreadable in French localisation. + Initialize(); + + // [GIVEN] Gen. Journal Line is posted for Bank Account. + StartingDate := GetStartingDate(); + CreateAndPostBankGenJnlLineFAC(BankAccount, "Gen. Journal Account Type"::"Bank Account", StartingDate); + + // [WHEN] Export Tax Audit report. + RunFECExport(AuditFile, '', StartingDate, StartingDate, false); + + // [THEN] Verify Accented characters are correctly exported. + GLRegister.FindLast(); + VerifyExportGLEntriesReport(GLRegister, AuditFile, '', BankAccount."No.", BankAccount.Name); + end; + local procedure Initialize() begin LibrarySetupStorage.Restore(); @@ -2360,7 +2384,7 @@ codeunit 148017 "FEC Audit File Export Tests" local procedure CreateReadStream(var FileInStream: InStream; var AuditFile: Record "Audit File") begin AuditFile.CalcFields("File Content"); - AuditFile."File Content".CreateInStream(FileInStream); + AuditFile."File Content".CreateInStream(FileInStream, TextEncoding::UTF8); end; local procedure RunFECExport(var AuditFile: Record "Audit File"; GLAccountNoFilter: Text; StartDate: Date; EndDate: Date; IncludeOpeningBalances: Boolean) @@ -3636,6 +3660,15 @@ codeunit 148017 "FEC Audit File Export Tests" until GLEntry.Next() = 0; end; + local procedure CreateAndPostBankGenJnlLineFAC(var BankAccount: Record "Bank Account"; DocumentType: Enum "Gen. Journal Document Type"; PostingDate: Date) + begin + CreateBankAccount(BankAccount); + BankAccount.Validate(Name, 'Banque Société GénéraleàÂ'); + BankAccount.Modify(true); + CreateAndPostGenJnlLine( + "Gen. Journal Account Type"::"Bank Account", BankAccount."No.", DocumentType, PostingDate, -LibraryRandom.RandDecInRange(100, 200, 2)); + end; + [ConfirmHandler] procedure ConfirmHandlerYes(Question: Text[1024]; var Reply: Boolean) begin diff --git a/Apps/FR/Onprem Permissions FR/app/Permissions/frpms.permissionset.al b/Apps/FR/Onprem Permissions FR/app/Permissions/frpms.permissionset.al index b7079a76a4..09dade31e0 100644 --- a/Apps/FR/Onprem Permissions FR/app/Permissions/frpms.permissionset.al +++ b/Apps/FR/Onprem Permissions FR/app/Permissions/frpms.permissionset.al @@ -10,7 +10,9 @@ permissionset 10800 "FR-PMS" Assignable = true; Caption = 'FR Payment Management System'; - Permissions = tabledata "Bank Account Buffer" = RIMD, + Permissions = +#if not CLEAN28 + tabledata "Bank Account Buffer" = RIMD, tabledata "Payment Address" = RIMD, tabledata "Payment Class" = RIMD, tabledata "Payment Header" = RIMD, @@ -21,5 +23,6 @@ permissionset 10800 "FR-PMS" tabledata "Payment Status" = RIMD, tabledata "Payment Step" = RIMD, tabledata "Payment Step Ledger" = RIMD, +#endif tabledata "Unreal. CV Ledg. Entry Buffer" = RIMD; } diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICISVPaymentManagementFR.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICISVPaymentManagementFR.PermissionSetExt.al new file mode 100644 index 0000000000..fd22d05e17 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICISVPaymentManagementFR.PermissionSetExt.al @@ -0,0 +1,12 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using System.Security.AccessControl; + +permissionsetextension 10837 "D365 BASIC ISV - Payment Management FR" extends "D365 BASIC ISV" +{ + IncludedPermissionSets = "Payment Management FR - Full"; +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICPaymentManagementFR.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICPaymentManagementFR.PermissionSetExt.al new file mode 100644 index 0000000000..4c6fc8d3b9 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICPaymentManagementFR.PermissionSetExt.al @@ -0,0 +1,12 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using System.Security.AccessControl; + +permissionsetextension 10838 "D365 BASIC - Payment Management FR" extends "D365 BASIC" +{ + IncludedPermissionSets = "Payment Management FR - Full"; +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/D365READPaymentManagementFR.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/D365READPaymentManagementFR.PermissionSetExt.al new file mode 100644 index 0000000000..de0d639581 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/Permissions/D365READPaymentManagementFR.PermissionSetExt.al @@ -0,0 +1,13 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using System.Security.AccessControl; + +permissionsetextension 10833 "D365 READ - Payment Management FR" extends "D365 READ" +{ + IncludedPermissionSets = "Payment Management FR - Read", + "Payment Mgt FR - Objects X"; +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/D365TEAMMEMBERPaymentManagementFR.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/D365TEAMMEMBERPaymentManagementFR.PermissionSetExt.al new file mode 100644 index 0000000000..8cf07cc9ae --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/Permissions/D365TEAMMEMBERPaymentManagementFR.PermissionSetExt.al @@ -0,0 +1,13 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using System.Security.AccessControl; + +permissionsetextension 10834 "D365 TEAM MEMBER - Payment Management FR" extends "D365 TEAM MEMBER" +{ + IncludedPermissionSets = "Payment Management FR - RM", + "Payment Mgt FR - Objects X"; +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/Local.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/Local.PermissionSetExt.al new file mode 100644 index 0000000000..31f34083a7 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/Permissions/Local.PermissionSetExt.al @@ -0,0 +1,22 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using System.Security.AccessControl; + +permissionsetextension 10835 LOCAL extends LOCAL +{ + Permissions = tabledata "Bank Account Buffer FR" = RIMD, + tabledata "Payment Address FR" = RIMD, + tabledata "Payment Class FR" = RIMD, + tabledata "Payment Header FR" = RIMD, + tabledata "Payment Header Archive FR" = RIMD, + tabledata "Payment Line FR" = RIMD, + tabledata "Payment Line Archive FR" = RIMD, + tabledata "Payment Post. Buffer FR" = RIMD, + tabledata "Payment Status FR" = RIMD, + tabledata "Payment Step FR" = RIMD, + tabledata "Payment Step Ledger FR" = RIMD; +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/LocalRead.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/LocalRead.PermissionSetExt.al new file mode 100644 index 0000000000..ca97fe4ded --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/Permissions/LocalRead.PermissionSetExt.al @@ -0,0 +1,22 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using System.Security.AccessControl; + +permissionsetextension 10836 "LOCAL READ" extends "LOCAL READ" +{ + Permissions = tabledata "Bank Account Buffer FR" = R, + tabledata "Payment Address FR" = RIMD, + tabledata "Payment Class FR" = R, + tabledata "Payment Header FR" = R, + tabledata "Payment Header Archive FR" = R, + tabledata "Payment Line FR" = R, + tabledata "Payment Line Archive FR" = R, + tabledata "Payment Post. Buffer FR" = R, + tabledata "Payment Status FR" = R, + tabledata "Payment Step FR" = R, + tabledata "Payment Step Ledger FR" = R; +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRFull.PermissionSet.al b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRFull.PermissionSet.al new file mode 100644 index 0000000000..90c24cbc19 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRFull.PermissionSet.al @@ -0,0 +1,25 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +permissionset 10837 "Payment Management FR - Full" +{ + Access = Internal; + Assignable = false; + + IncludedPermissionSets = "Payment Management FR - RM"; + + Permissions = tabledata "Bank Account Buffer FR" = ID, + tabledata "Payment Address FR" = ID, + tabledata "Payment Class FR" = ID, + tabledata "Payment Header Archive FR" = ID, + tabledata "Payment Header FR" = ID, + tabledata "Payment Line Archive FR" = ID, + tabledata "Payment Line FR" = ID, + tabledata "Payment Post. Buffer FR" = ID, + tabledata "Payment Status FR" = ID, + tabledata "Payment Step FR" = ID, + tabledata "Payment Step Ledger FR" = ID; +} diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRM.PermissionSet.al b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRM.PermissionSet.al new file mode 100644 index 0000000000..9bce088261 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRM.PermissionSet.al @@ -0,0 +1,25 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +permissionset 10840 "Payment Management FR - RM" +{ + Access = Internal; + Assignable = false; + + IncludedPermissionSets = "Payment Management FR - Read"; + + Permissions = tabledata "Bank Account Buffer FR" = RM, + tabledata "Payment Address FR" = RM, + tabledata "Payment Class FR" = RM, + tabledata "Payment Header Archive FR" = RM, + tabledata "Payment Header FR" = RM, + tabledata "Payment Line Archive FR" = RM, + tabledata "Payment Line FR" = RM, + tabledata "Payment Post. Buffer FR" = RM, + tabledata "Payment Status FR" = RM, + tabledata "Payment Step FR" = RM, + tabledata "Payment Step Ledger FR" = RM; +} diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRead.PermissionSet.al b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRead.PermissionSet.al new file mode 100644 index 0000000000..06c76d849b --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRead.PermissionSet.al @@ -0,0 +1,23 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +permissionset 10839 "Payment Management FR - Read" +{ + Access = Internal; + Assignable = false; + + Permissions = tabledata "Bank Account Buffer FR" = R, + tabledata "Payment Address FR" = R, + tabledata "Payment Class FR" = R, + tabledata "Payment Header Archive FR" = R, + tabledata "Payment Header FR" = R, + tabledata "Payment Line Archive FR" = R, + tabledata "Payment Line FR" = R, + tabledata "Payment Post. Buffer FR" = R, + tabledata "Payment Status FR" = R, + tabledata "Payment Step FR" = R, + tabledata "Payment Step Ledger FR" = R; +} diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/PaymentMgtFRObjectsX.PermissionSet.al b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentMgtFRObjectsX.PermissionSet.al new file mode 100644 index 0000000000..84e13777c0 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentMgtFRObjectsX.PermissionSet.al @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Foundation.Navigate; + +permissionset 10838 "Payment Mgt FR - Objects X" +{ + Access = Internal; + Assignable = false; + Permissions = codeunit "Local Navigate Handler FR" = X, + codeunit "Payment Management FR" = X, + codeunit "Payment-Apply FR" = X, + codeunit "RIB Key FR" = X, + page "Payment Addresses FR" = X, + page "Payment Bank FR" = X, + page "Payment Bank Archive FR" = X, + page "Payment Class FR" = X, + page "Payment Class List FR" = X, + page "Payment Line Modification FR" = X, + page "Payment Lines Archive List FR" = X, + page "Payment Lines List FR" = X, + page "Payment Report FR" = X, + page "Payment Slip FR" = X, + page "Payment Slip Archive FR" = X, + page "Payment Slip List FR" = X, + page "Payment Slip List Archive FR" = X, + page "Payment Slip Subform FR" = X, + page "Payment Slip Subform ArchiveFR" = X, + page "Payment Status FR" = X, + page "Payment Status List FR" = X, + page "Payment Step Card FR" = X, + page "Payment Step Ledger FR" = X, + page "Payment Step Ledger List FR" = X, + page "Payment Steps FR" = X, + page "Payment Steps List FR" = X, + page "View/Edit Payment Line FR" = X, + xmlport "Import/Export Parameters FR" = X, + report "Archive Payment Slips FR" = X, + report "Bill FR" = X, + report "Draft FR" = X, + report "Draft notice FR" = X, + report "Draft recapitulation FR" = X, + report "Duplicate parameter FR" = X, + report "GL/Cust Ledger Reconciliation" = X, + report "GL/Vend Ledger Reconciliation" = X, + report "ETEBAC Files FR" = X, + report "Payment List FR" = X, + report "Remittance FR" = X, + report "SEPA ISO20022 FR" = X, + report "Suggest Cust. Payments" = X, + report "Suggest Vend. Payments" = X, + report "Withdraw FR" = X, + report "Withdraw notice FR" = X, + report "Withdraw recapitulation FR" = X, + report "Recapitulation Form FR" = X; +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/app.json b/Apps/FR/PaymentManagementFR/app/app.json new file mode 100644 index 0000000000..6908e00dbc --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/app.json @@ -0,0 +1,41 @@ +{ + "id": "24f54185-e697-4e03-bae0-f134f2d69673", + "name": "Payment Management FR", + "publisher": "Microsoft", + "version": "28.0.0.0", + "brief": "First-party app for FR localization that provides French payment functionality in Business Central.", + "description": "Implements payment functionality for Business Central under the France localization, including support for domestic payment methods, SEPA formats, and other France-specific financial processes.", + "privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009", + "EULA": "https://go.microsoft.com/fwlink/?linkid=2009120", + "help": "https://learn.microsoft.com/en-us/dynamics365/business-central/localfunctionality/france/how-to-export-general-ledger-entries-for-tax-audits", + "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2204541", + "url": "https://go.microsoft.com/fwlink/?LinkId=724011", + "logo": "ExtensionLogo.png", + "application": "28.0.0.0", + "dependencies": [], + "internalsVisibleTo": [ + { + "id": "ed0f7522-50bb-4838-a1ed-a9f4d1b3d9d7", + "name": "Payment Management FR-Tests", + "publisher": "Microsoft" + } + ], + "screenshots": [], + "platform": "28.0.0.0", + "target": "OnPrem", + "idRanges": [ + { + "from": 10831, + "to": 10857 + } + ], + "resourceExposurePolicy": { + "allowDebugging": true, + "allowDownloadingSource": true, + "includeSourceInSymbolFile": true + }, + "features": [ + "NoImplicitWith", + "TranslationFile" + ] +} diff --git a/Apps/FR/PaymentManagementFR/app/extensionlogo.png b/Apps/FR/PaymentManagementFR/app/extensionlogo.png new file mode 100644 index 0000000000000000000000000000000000000000..79a3aa399db233b8b47b0fdecdd36a0e1f684835 GIT binary patch literal 5201 zcmcgw=QkS;)E1;h5Iah3HEOS4RBMazGis$`hoVTuuC2D%t2NuAD2{r01rmprBwhG|;uUs{8*1?X|0{ z4&ThVDs;XEHUShAAlCl^@O2^T4+RA~m7%VdRmk(57d>d68IF(jao(}){wxBUgu5{< z_mJrP&+}q(4hs}?0+s)IavS(ypAWCHNi9?=&QvJR&|oHR!kAeM+N0xYE@Xltf)j;c z{_D@fd-ydC*1amfk46N1Ry+9<`fF_jqEFj6Bpb3o+Xw<0W1Pj2+6+1XHWx1X0_Hw5 zd^}eor6@s;T~08uESgT9;r|-4xW7Ep7yfttc5n>UUMhHO@vv_c)$Md29%MZ&p$wvl zkkq4X$*ljrC~K#>oDd*G8+zRd4qqs^n|)meAlVzv-_H#UulvbNY?wHy$71v7Gv0WJ zFEPa=@Gf!ahQI3@pI6;LBRTd6)~%W6#cki;81Y?RxFk8T0oCG4JCo;TrQU-sK)*?Z6nq z!4g)G0-}CS3zo876V?Rq)3ps*H|TACdY|YqP^pVfaO0b5oB1A*=BF;cN>v&S)}=kc zuIp9y&+KNK4bo@>_@hsvCIsf0)%g5AohaM6P_iGel|`3ab)$J?f}T|&<}BLm@V227 z0;@GxtSFWVA8E8ioQ1Nx0zaIb!8bg(8aU{O@V#QKc(QK+1$ zplin@qZvLkI%rPBFMo6EMYQxr7y>>iRSXW(6<@lB42la6F8o7K#>v$7CTsf29Y0pr z9=y9pN#Ay@E$}UY73WLk_hOC`!GDjnRTZ%U$d>|};ps@{4O5XNofmajtoa6wwLlwR zxob@Zk;)8DArla?+{5bgZR-}rR7jpkY&^wsX<&X4Wt4BB*brkcZM8z@$%=?5i~UyA z5O{hSm{yUN>^sioeBb!fF@2}RaTtd*a`i_Pv(G}WbomIb;97piV31#%s_MSkF!(x@ z^Al)H&V$8a-gc2}Kn2UvY=X;!HTJCqO&oHu-0VJOngkz0)suATD%_w2-k>#?Whj{4 zCv>UEh{b97!%M~)SQ$zv+xV;a^CH(wpMasZk$>@+e?G%9e!jwDBa<9+84Q;N1@V(3 z&fyYJh;1G<$z_yAkjaG3`t*_k9Cqj`j0{9$`cF}u;cRrf2{H4I!-Cb%5Qbs3FE*S#%$RuHym_i*QOOVaEV@~YYGkhPEQ7x&cgFJcImgG^6;vvGx+Xn?`ZazmQK70T<2x1+{SfeO2qaY?7Z_@EK4=6>H zzhbtG=@E46W0D?PaP0Qf%UiL64Kk44u0_!;2~iVv3D>;~`{(=th8m(kd$u5T?6!R_ zv(TBiy}2S(Z7PBchsyU1p6MvpHNUBDh66^b)`Q@1eUQB}23iA{7^LBwLaaZsU^o#Z zucK?Qv%#tLilaCE@i_z@pLFpfc|&3c5y9i8I41QoTe$xy-QbaLhye$Ui&*RF{04%j z81EvQ*EwV=fBQRl`8<64B}xyHM8LylxR zUv;Hv*mYPE`!YK$roygB$!U2YT;&Bk=OGrSw&>hXBundgdjI^qU~5)&Nei zH1{uqY@m7VWDzcgtbkHRDccJAtY%9~D!UYo7>RGUG^$7ijQIN{%g-|luu6&GqV zbkvsxvfoVpk{dYe?UIhmPGfzStG(#TlzhqUnb2p8*tzTp0|;+w>b{#keZ)jm& z7`x2t{E;8T$+(;$_4RMJ@O#YLWbxSo*hhC7Mv?m}dKGY6XAoywZOdLcK83`eIS9>= z*-}S)@W^c6k`QxMjK1Kq^DT#ixHzE2eAY$&R*j^t7}$ILwwCeAbVJsvYL2{{$(~vo z{b2&%Z-nhVh!Ajn$f&fQf@;M(xeWw{+_)pCyKq_>>T>4=?c7%Lh;E3H&RN4$tSvw| zhx@$c%6u3#dkAnN!(0Ao>=Mwb5jF2 z{7ch?Z<278YBk9HO*0-L_OT@iyTl;@Y8!17{B!#q>tyLgNiZFQ{q=Th3Xf4A>2g9B-vv}|W;;X6e0GY26j2H12c-0=gX>DR$c`^(tdBV^ z>%4i}g}<^{DUvP9qt}L<_it%LU9YRrVi^fHPv@!i_IY;GS5EIEAmthuR0 z#3l5e1zveDh^72X=z+%kA5NGtK%;lPLhjrPs@)VBVWZ-BVrK1aN*EkYVO)aa;wEXi z&U=bK^YHR#+$5#sU&o~&!V7B+gBg&dRb)j1FjNEOjQe-kYLq?eNg<-j^v z$qSUqa=3-qcVwv`ml{~8n<^8u1V@Oe!+PIRdW@? zp=tegD-dYxqM$uZ-)>d(1joX$`INmu!R+~8VEwyW{_d|Jg&!wi>D2~R7176nR3hFm z6&ge5NMt=tiXcH{S|G;nz(v*3}Pucf%t`5`dQF~qBw_Zu!)OoQOb4@2P7bC^=jFi`QHIPVI>lSP|CnGn~BBRQft(iREOo!3Eb2OX4rx$~Kt zUZ`6#fse{=V^g>8tZ`>4!8>dwCECt|Fp)pd_xw9%xJ;9$Z zhHjrol1WyEaqTi$l&?XxwR2q@v(ve-hAr8lxtpm(&nEmW`yUm300)nonw|VPMGsz z_t<>=7j@U5ce|dKZ=g=;6HU~?JaU4{vQrreRzYtDkuD7@qwhG7Ya=oSwsxfH73%C9F>5T*DRvOiLyH6s{dF@ zxrENI4oQg}#?x5tD|rz{w#rL%K=w33&`I+c{nYp0X1Wj=`k8ZEy>u5wE{6@lBK(V+8l1w!6LY7%3+{m)g8LKu zl^V9-(}=d)G!324nQbzU-dR;-d9nLel<3Cap#juQ3uF0xP7}Mf6$QP-S_6=cy!Mj= zd=>|9_%puGNPMRHl``k`0L2j$fP>R`J9E*22Fo8juf}anz`_=c{@hmy=DSW8zDN2pTXhuZGSX zIyJofIz-BFHDesf!9dWee)D9?D@K^gMm?VgbEGhfqLM%=>%kl>@61m$BD-2XuE#6I zl)Bmfp7%PyG{1ZH>`i!OeqHvi`KJ1ve#$&C&xW-PT2HF>G|Oj@ItzSYc`_%nN7`I0 zcK%^ighHJ0^58#NunFOO->nWGuU(KD+gW=Yvw_MlQn3NPO(#WIxK{*5kAS@;R8Al@uhV4*xN)t zwl7>Ge)A~lQaT6d6=%&dNvSuC#0^CH#a|t3IaLvnA44s8%=AcH#$m%7qDx4p**lqcVk;ym>qW1V~ zUbvWi(9?LoRW9p9iZNkJl;*yaFRI~%F*&WDsoyFbO#w8ft+qMG`pCOJ*6umEO#Rps zfPD#18k=e#rjVFMfeJ&L@$seb?1pZXB;)1Pa~h?+Yn)a~&>rm=%X#p=_WV*kT?VUX z?I_7rdCTb9r)FX$P!tx2f5wh`!*unwO7OOOAC23NkfiKA4%iBHi+fN;x`UaS(rH9a z9{n-OT%nk4DakZFP99Y=e1(;0ZxB=eZ_yF`O>Lf}@%0NjUK`ii`ZcVgEz*MBU^+xn z{cz0x@($2A1@KI-$>FPVVq5V|5Trx&H+R)q>r3<88zVxd(yP%59HadmS7Uv4_PD>@ zc1cCz$&6qAknfHBvh$l$4i&bLKmW~3~fYJ1}kY! z-^w~2)F>U2z_|>?OEN9DTyU+w4Zh{>M0B@y?>15ICV-c-7Cm<4&e)sS8^Q}Z_H8;R zZ4>W(Y8>r<2ipecT4)i@a!*gcQJrJo2-`upwaQWC`}xu?Yhl~{c_qU7lwjY@O;<5T zYdkkXFY3w6%=Ih=5t2ne005w#f?AVt-Eq7Q&HG3H>D zyVq3Hk~_3#hwJVwh`MDyI2%-3T8T|M4ksI>veZi=86#40JdB}(#HruXo-~`;7MI7v)al4|*+O;|A-r~5%plCQK!qaySon+;hZ+ZcLG`uc`CNiq_vbRMzg%W`-J1;^ z55`+(`lYqd{c3n+Idhs{kMom5baZ?4$x)2ba^_S*qbsiA9_g>Qf4W;x0gY9wJ~%K% zG?RWEPh3$(k>H9a4$04Jw;4x;#@o*gqt_Z;Q;iej-?*jv5(i&C_%M)hMYE}CA^RkI zGRwl+MQQZV&HYgXRWEh%()jR|^AYa<1{r%&W*qwSz0Zb-bM7fwq^#`FL4P5H<`e9W4vSW{ zb2#tw!|0~f+S1D_Hp2=u thJgy0w;P0M{+|r5|J7NmQQ5cz+oh)Y#Yu`+U3r8QhA>mzI&Ea^{{VKLuO|Qi literal 0 HcmV?d00001 diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/FeaturePaymentMgtFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/FeaturePaymentMgtFR.Codeunit.al new file mode 100644 index 0000000000..6c8f3529a8 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/FeaturePaymentMgtFR.Codeunit.al @@ -0,0 +1,301 @@ +#if not CLEAN28 +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Bank.BankAccount; +using Microsoft.Foundation.Navigate; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using System.Environment.Configuration; +using System.Upgrade; + +codeunit 10831 "Feature - PaymentMgt FR" implements "Feature Data Update" +{ + Access = Internal; + Permissions = TableData "Feature Data Update Status" = rm; + InherentEntitlements = X; + InherentPermissions = X; + ObsoleteReason = 'Feature Payment Management will be enabled by default in version 28.0.'; + ObsoleteState = Pending; + ObsoleteTag = '28.0'; + + var + TempDocumentEntry: Record "Document Entry" temporary; + DescriptionTxt: Label 'Existing records in GB BaseApp fields will be copied to Payment App fields'; + + procedure IsDataUpdateRequired(): Boolean; + begin + CountRecords(); + if TempDocumentEntry.IsEmpty() then begin + SetUpgradeTag(false); + exit(false); + end; + exit(true); + end; + + procedure ReviewData(); + var + DataUpgradeOverview: Page "Data Upgrade Overview"; + begin + Commit(); + Clear(DataUpgradeOverview); + DataUpgradeOverview.Set(TempDocumentEntry); + DataUpgradeOverview.RunModal(); + end; + + procedure AfterUpdate(FeatureDataUpdateStatus: Record "Feature Data Update Status") + var + UpdateFeatureDataUpdateStatus: Record "Feature Data Update Status"; + begin + UpdateFeatureDataUpdateStatus.SetRange("Feature Key", FeatureDataUpdateStatus."Feature Key"); + UpdateFeatureDataUpdateStatus.SetFilter("Company Name", '<>%1', FeatureDataUpdateStatus."Company Name"); + UpdateFeatureDataUpdateStatus.ModifyAll("Feature Status", FeatureDataUpdateStatus."Feature Status"); + + SetUpgradeTag(true); + end; + + procedure UpdateData(FeatureDataUpdateStatus: Record "Feature Data Update Status"); + var + FeatureDataUpdateMgt: Codeunit "Feature Data Update Mgt."; + StartDateTime: DateTime; + EndDateTime: DateTime; + begin + StartDateTime := CurrentDateTime; + FeatureDataUpdateMgt.LogTask(FeatureDataUpdateStatus, 'Upgrade Payment', StartDateTime); + UpgradePayment(); + EndDateTime := CurrentDateTime; + FeatureDataUpdateMgt.LogTask(FeatureDataUpdateStatus, 'Upgrade Payment', EndDateTime); + end; + + procedure GetTaskDescription() TaskDescription: Text; + begin + TaskDescription := DescriptionTxt; + end; + + local procedure CountRecords() + var + BankAccount: Record "Bank Account"; + VendorBankAccount: Record "Vendor Bank Account"; + CustomerBankAccount: Record "Customer Bank Account"; + begin + TempDocumentEntry.Reset(); + TempDocumentEntry.DeleteAll(); + + InsertDocumentEntry(Database::"Bank Account", BankAccount.TableCaption, BankAccount.Count()); + InsertDocumentEntry(Database::"Vendor Bank Account", VendorBankAccount.TableCaption, VendorBankAccount.Count()); + InsertDocumentEntry(Database::"Customer Bank Account", CustomerBankAccount.TableCaption, CustomerBankAccount.Count()); + end; + + local procedure InsertDocumentEntry(TableID: Integer; TableName: Text; RecordCount: Integer) + begin + if RecordCount = 0 then + exit; + + TempDocumentEntry.Init(); + TempDocumentEntry."Entry No." += 1; + TempDocumentEntry."Table ID" := TableID; + TempDocumentEntry."Table Name" := CopyStr(TableName, 1, MaxStrLen(TempDocumentEntry."Table Name")); + TempDocumentEntry."No. of Records" := RecordCount; + TempDocumentEntry.Insert(); + end; + + local procedure UpgradeBankAccountBuffer() + var + BankAccountBufferFR: Record "Bank Account Buffer FR"; + BankAccountBuffer: Record "Bank Account Buffer"; + begin + if BankAccountBuffer.FindSet() then + repeat + BankAccountBufferFR.TransferFields(BankAccountBuffer); + BankAccountBufferFR.Insert(); + until BankAccountBuffer.Next() = 0; + end; + + local procedure UpgradePaymentClass() + var + PaymentClassFR: Record "Payment Class FR"; + PaymentClass: Record "Payment Class"; + begin + if PaymentClass.FindSet() then + repeat + PaymentClassFR.TransferFields(PaymentClass); + PaymentClassFR.Insert(); + until PaymentClass.Next() = 0; + end; + + local procedure UpgradePaymentHeader() + var + PaymentHeaderFR: Record "Payment Header FR"; + PaymentHeader: Record "Payment Header"; + begin + if PaymentHeader.FindSet() then + repeat + PaymentHeaderFR.TransferFields(PaymentHeader); + PaymentHeaderFR.Insert(); + until PaymentHeader.Next() = 0; + end; + + local procedure UpgradePaymentLine() + var + PaymentLineFR: Record "Payment Line FR"; + PaymentLine: Record "Payment Line"; + begin + if PaymentLine.FindSet() then + repeat + PaymentLineFR.TransferFields(PaymentLine); + PaymentLineFR.Insert(); + until PaymentLine.Next() = 0; + end; + + local procedure UpgradePaymentHeaderArchive() + var + PaymentHeaderArchiveFR: Record "Payment Header Archive FR"; + PaymentHeaderArchive: Record "Payment Header Archive"; + begin + if PaymentHeaderArchive.FindSet() then + repeat + PaymentHeaderArchiveFR.TransferFields(PaymentHeaderArchive); + PaymentHeaderArchiveFR.Insert(); + until PaymentHeaderArchive.Next() = 0; + end; + + local procedure UpgradePaymentLineArchive() + var + PaymentLineArchiveFR: Record "Payment Line Archive FR"; + PaymentLineArchive: Record "Payment Line Archive"; + begin + if PaymentLineArchive.FindSet() then + repeat + PaymentLineArchiveFR.TransferFields(PaymentLineArchive); + PaymentLineArchiveFR.Insert(); + until PaymentLineArchive.Next() = 0; + end; + + local procedure UpgradePaymentPostBuffer() + var + PaymentPostBufferFR: Record "Payment Post. Buffer FR"; + PaymentPostBuffer: Record "Payment Post. Buffer"; + begin + if PaymentPostBuffer.FindSet() then + repeat + PaymentPostBufferFR.TransferFields(PaymentPostBuffer); + PaymentPostBufferFR.Insert(); + until PaymentPostBuffer.Next() = 0; + end; + + local procedure UpgradePaymentStatus() + var + PaymentStatusFR: Record "Payment Status FR"; + PaymentStatus: Record "Payment Status"; + begin + if PaymentStatus.FindSet() then + repeat + PaymentStatusFR.TransferFields(PaymentStatus); + PaymentStatusFR.Insert(); + until PaymentStatus.Next() = 0; + end; + + local procedure UpgradePaymentStep() + var + PaymentStepFR: Record "Payment Step FR"; + PaymentStep: Record "Payment Step"; + begin + if PaymentStep.FindSet() then + repeat + PaymentStepFR.TransferFields(PaymentStep); + PaymentStepFR.Insert(); + until PaymentStep.Next() = 0; + end; + + local procedure UpgradePaymentStepLedger() + var + PaymentStepLedgerFR: Record "Payment Step Ledger FR"; + PaymentStepLedger: Record "Payment Step Ledger"; + begin + if PaymentStepLedger.FindSet() then + repeat + PaymentStepLedgerFR.TransferFields(PaymentStepLedger); + PaymentStepLedgerFR.Insert(); + until PaymentStepLedger.Next() = 0; + end; + + local procedure UpgradePaymentAddress() + var + PaymentAddressFR: Record "Payment Address FR"; + PaymentAddress: Record "Payment Address"; + begin + if PaymentAddress.FindSet() then + repeat + PaymentAddressFR.TransferFields(PaymentAddress); + PaymentAddressFR.Insert(); + until PaymentAddress.Next() = 0; + end; + + local procedure UpgradePayment() + var + BankAccount: Record "Bank Account"; + VendorBankAccount: Record "Vendor Bank Account"; + CustomerBankAccount: Record "Customer Bank Account"; + begin + UpgradeBankAccountBuffer(); + UpgradePaymentClass(); + UpgradePaymentHeader(); + UpgradePaymentHeaderArchive(); + UpgradePaymentLine(); + UpgradePaymentLineArchive(); + UpgradePaymentPostBuffer(); + UpgradePaymentStatus(); + UpgradePaymentStep(); + UpgradePaymentStepLedger(); + UpgradePaymentAddress(); + + if BankAccount.FindSet() then + repeat +#pragma warning disable AL0432 + BankAccount."Agency Code FR" := BankAccount."Agency Code"; + BankAccount."RIB Key FR" := BankAccount."RIB Key"; + BankAccount."RIB Checked FR" := BankAccount."RIB Checked"; +#pragma warning restore AL0432 + BankAccount.Modify(); + until BankAccount.Next() = 0; + + if VendorBankAccount.FindSet() then + repeat +#pragma warning disable AL0432 + VendorBankAccount."Agency Code FR" := VendorBankAccount."Agency Code"; + VendorBankAccount."RIB Key FR" := VendorBankAccount."RIB Key"; + VendorBankAccount."RIB Checked FR" := VendorBankAccount."RIB Checked"; +#pragma warning restore AL0432 + VendorBankAccount.Modify(); + until VendorBankAccount.Next() = 0; + + if CustomerBankAccount.FindSet() then + repeat +#pragma warning disable AL0432 + CustomerBankAccount."Agency Code FR" := CustomerBankAccount."Agency Code"; + CustomerBankAccount."RIB Key FR" := CustomerBankAccount."RIB Key"; + CustomerBankAccount."RIB Checked FR" := CustomerBankAccount."RIB Checked"; +#pragma warning restore AL0432 + CustomerBankAccount.Modify(); + until CustomerBankAccount.Next() = 0; + end; + + local procedure SetUpgradeTag(DataUpgradeExecuted: Boolean) + var + UpgradeTag: Codeunit "Upgrade Tag"; + UpgTagPayment: Codeunit "Upg. Tag Payment Management FR"; + begin + // Set the upgrade tag to indicate that the data update is executed/skipped and the feature is enabled. + // This is needed when the feature is enabled by default in a future version, to skip the data upgrade. + if UpgradeTag.HasUpgradeTag(UpgTagPayment.GetPaymentUpgradeTag()) then + exit; + + UpgradeTag.SetUpgradeTag(UpgTagPayment.GetPaymentUpgradeTag()); + if not DataUpgradeExecuted then + UpgradeTag.SetSkippedUpgrade(UpgTagPayment.GetPaymentUpgradeTag(), true); + end; +} +#endif \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/LocalNavigateHandlerFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/LocalNavigateHandlerFR.Codeunit.al new file mode 100644 index 0000000000..c38e7813bd --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/LocalNavigateHandlerFR.Codeunit.al @@ -0,0 +1,100 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Foundation.Navigate; + +using Microsoft.Bank.Payment; + +codeunit 10833 "Local Navigate Handler FR" +{ + var + [SecurityFiltering(SecurityFilter::Filtered)] + PaymentHeader: Record "Payment Header FR"; + [SecurityFiltering(SecurityFilter::Filtered)] + PaymentHeaderArchive: Record "Payment Header Archive FR"; + [SecurityFiltering(SecurityFilter::Filtered)] + PaymentLine: Record "Payment Line FR"; + [SecurityFiltering(SecurityFilter::Filtered)] + PaymentLineArchive: Record "Payment Line Archive FR"; + + [EventSubscriber(ObjectType::Page, Page::Navigate, 'OnAfterNavigateFindRecords', '', false, false)] + local procedure OnAfterNavigateFindRecords(var DocumentEntry: Record "Document Entry"; DocNoFilter: Text; PostingDateFilter: Text) + begin + if PaymentHeader.ReadPermission then begin + SetPaymentHeaderFilters(DocNoFilter, PostingDateFilter); + DocumentEntry.InsertIntoDocEntry(DATABASE::"Payment Header FR", PaymentHeader.TableCaption(), PaymentHeader.Count); + end; + if PaymentLine.ReadPermission then begin + SetPaymentLineFilters(DocNoFilter, PostingDateFilter); + DocumentEntry.InsertIntoDocEntry(DATABASE::"Payment Line FR", PaymentLine.TableCaption(), PaymentLine.Count); + end; + if PaymentHeaderArchive.ReadPermission then begin + SetPaymentHeaderArchiveFilters(DocNoFilter, PostingDateFilter); + DocumentEntry.InsertIntoDocEntry(DATABASE::"Payment Header Archive FR", PaymentHeaderArchive.TableCaption(), PaymentHeaderArchive.Count); + end; + if PaymentLineArchive.ReadPermission then begin + SetPaymentLineArchiveFilters(DocNoFilter, PostingDateFilter); + DocumentEntry.InsertIntoDocEntry(DATABASE::"Payment Line Archive FR", PaymentLineArchive.TableCaption(), PaymentLineArchive.Count); + end; + end; + + [EventSubscriber(ObjectType::Page, Page::Navigate, 'OnBeforeShowRecords', '', false, false)] + local procedure OnBeforeShowRecords(var TempDocumentEntry: Record "Document Entry"; DocNoFilter: Text; PostingDateFilter: Text; var IsHandled: Boolean; ContactNo: Code[250]) + begin + case TempDocumentEntry."Table ID" of + DATABASE::"Payment Header FR": + begin + SetPaymentHeaderFilters(DocNoFilter, PostingDateFilter); + PAGE.Run(0, PaymentHeader); + end; + DATABASE::"Payment Line FR": + begin + SetPaymentLineFilters(DocNoFilter, PostingDateFilter); + PAGE.Run(0, PaymentLine); + end; + DATABASE::"Payment Header Archive FR": + begin + SetPaymentHeaderArchiveFilters(DocNoFilter, PostingDateFilter); + PAGE.Run(0, PaymentHeaderArchive); + end; + DATABASE::"Payment Line Archive FR": + begin + SetPaymentLineArchiveFilters(DocNoFilter, PostingDateFilter); + PAGE.Run(0, PaymentLineArchive) + end; + end; + end; + + local procedure SetPaymentHeaderFilters(DocNoFilter: Text; PostingDateFilter: Text) + begin + PaymentHeader.Reset(); + PaymentHeader.SetCurrentKey("Posting Date"); + PaymentHeader.SetFilter("No.", DocNoFilter); + PaymentHeader.SetFilter("Posting Date", PostingDateFilter); + end; + + local procedure SetPaymentLineFilters(DocNoFilter: Text; PostingDateFilter: Text) + begin + PaymentLine.Reset(); + PaymentLine.SetCurrentKey("Posting Date"); + PaymentLine.SetFilter("Document No.", DocNoFilter); + PaymentLine.SetFilter("Posting Date", PostingDateFilter); + end; + + local procedure SetPaymentHeaderArchiveFilters(DocNoFilter: Text; PostingDateFilter: Text) + begin + PaymentHeaderArchive.Reset(); + PaymentHeaderArchive.SetCurrentKey("Posting Date"); + PaymentHeaderArchive.SetFilter("No.", DocNoFilter); + PaymentHeaderArchive.SetFilter("Posting Date", PostingDateFilter); + end; + + local procedure SetPaymentLineArchiveFilters(DocNoFilter: Text; PostingDateFilter: Text) + begin + PaymentLineArchive.Reset(); + PaymentLineArchive.SetCurrentKey("Posting Date"); + PaymentLineArchive.SetFilter("No.", DocNoFilter); + PaymentLineArchive.SetFilter("Posting Date", PostingDateFilter); + end; +} diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentApplyFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentApplyFR.Codeunit.al new file mode 100644 index 0000000000..2151358a2f --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentApplyFR.Codeunit.al @@ -0,0 +1,450 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Setup; +using Microsoft.Sales.Receivables; +using Microsoft.Sales.Setup; + +codeunit 10834 "Payment-Apply FR" +{ + Permissions = TableData "Cust. Ledger Entry" = rm, + TableData "Vendor Ledger Entry" = rm; + TableNo = "Payment Line FR"; + + trigger OnRun() + begin + Apply(Rec); + end; + + local procedure Apply(var PaymentLine: Record "Payment Line FR") + var + PaymentHeader: Record "Payment Header FR"; + PaymentToleranceMgt: Codeunit "Payment Tolerance Management"; + IsHandled: Boolean; + begin + PaymentHeader.Get(PaymentLine."No."); + + GenJnlLine."Account Type" := PaymentLine."Account Type"; + GenJnlLine."Account No." := PaymentLine."Account No."; + GenJnlLine.Amount := PaymentLine.Amount; + GenJnlLine."Amount (LCY)" := PaymentLine."Amount (LCY)"; + GenJnlLine."Currency Code" := PaymentLine."Currency Code"; + GenJnlLine."Posting Date" := PaymentHeader."Posting Date"; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Applies-to ID" := PaymentLine."Applies-to ID"; + GenJnlLine."Applies-to Doc. No." := PaymentLine."Applies-to Doc. No."; + GenJnlLine."Applies-to Doc. Type" := PaymentLine."Applies-to Doc. Type"; + + PaymentLine.GetCurrency(); + AccType := GenJnlLine."Account Type"; + AccNo := GenJnlLine."Account No."; + case AccType of + AccType::Customer: + begin + OnApplyOnBeforeApplyCustomer(PaymentLine, GenJnlLine); + if ApplyCustomer(PaymentLine) then + exit; + if PaymentLine.Amount <> 0 then + if not PaymentToleranceMgt.PmtTolGenJnl(GenJnlLine) then + exit; + end; + AccType::Vendor: + begin + OnApplyOnBeforeApplyVendor(PaymentLine, GenJnlLine); + if ApplyVendor(PaymentLine) then + exit; + if PaymentLine.Amount <> 0 then + if not PaymentToleranceMgt.PmtTolGenJnl(GenJnlLine) then + exit; + end; + else begin + IsHandled := false; + OnApplyOnElseCase(PaymentLine, GenJnlLine, IsHandled); + if not IsHandled then + Error( + Text005Lbl, + GenJnlLine.FieldCaption("Account Type"), GenJnlLine.FieldCaption("Bal. Account Type")); + end; + end; + + PaymentLine."Applies-to Doc. Type" := GenJnlLine."Applies-to Doc. Type"; + PaymentLine."Applies-to Doc. No." := GenJnlLine."Applies-to Doc. No."; + PaymentLine."Applies-to ID" := GenJnlLine."Applies-to ID"; + PaymentLine."Due Date" := GenJnlLine."Due Date"; + PaymentLine.Amount := GenJnlLine.Amount; + PaymentLine."Amount (LCY)" := GenJnlLine."Amount (LCY)"; + PaymentLine.Validate(Amount); + PaymentLine.Validate("Amount (LCY)"); + if (PaymentLine."Direct Debit Mandate ID" = '') and (GenJnlLine."Direct Debit Mandate ID" <> '') then + PaymentLine.Validate("Direct Debit Mandate ID", GenJnlLine."Direct Debit Mandate ID"); + + OnAfterApply(GenJnlLine); + end; + + var + GenJnlLine: Record "Gen. Journal Line"; + CustLedgEntry: Record "Cust. Ledger Entry"; + VendLedgEntry: Record "Vendor Ledger Entry"; + GLSetup: Record "General Ledger Setup"; + Currency: Record Currency; + CurrExchRate: Record "Currency Exchange Rate"; + ApplyCustEntries: Page "Apply Customer Entries"; + ApplyVendEntries: Page "Apply Vendor Entries"; + AccType: Enum "Gen. Journal Account Type"; + AccNo: Code[20]; + CurrencyCode2: Code[10]; + OK: Boolean; + Text001Lbl: Label 'The %1 in the %2 will be changed from %3 to %4.\', Comment = '%1 = Currency Code, %2 = Gen. Journal Line, %3 = Currency Code, %4 = Currency Code in Cust. Ledger Entry'; + Text002Lbl: Label 'Do you wish to continue?'; + Text003Lbl: Label 'The update has been interrupted to respect the warning.'; + Text005Lbl: Label 'The %1 or %2 must be Customer or Vendor.', Comment = '%1 = Account Type, %2 = Bal. Account Type'; + Text006Lbl: Label 'All entries in one application must be in the same currency.'; + Text007Lbl: Label 'All entries in one application must be in the same currency or one or more of the EMU currencies.'; + + + local procedure ApplyCustomer(PaymentLine: Record "Payment Line FR"): Boolean + begin + CustLedgEntry.SetCurrentKey("Customer No.", Open, Positive); + CustLedgEntry.SetRange("Customer No.", AccNo); + CustLedgEntry.SetRange(Open, true); + GenJnlLine."Applies-to ID" := GetAppliesToID(GenJnlLine."Applies-to ID", PaymentLine); + ApplyCustEntries.SetGenJnlLine(GenJnlLine, GenJnlLine.FieldNo("Applies-to ID")); + ApplyCustEntries.SetRecord(CustLedgEntry); + ApplyCustEntries.SetTableView(CustLedgEntry); + ApplyCustEntries.LookupMode(true); + OK := ApplyCustEntries.RunModal() = ACTION::LookupOK; + Clear(ApplyCustEntries); + if not OK then + exit(true); + CustLedgEntry.Reset(); + CustLedgEntry.SetCurrentKey("Customer No.", Open, Positive); + CustLedgEntry.SetRange("Customer No.", AccNo); + CustLedgEntry.SetRange(Open, true); + CustLedgEntry.SetRange("Applies-to ID", GenJnlLine."Applies-to ID"); + if CustLedgEntry.Find('-') then begin + CurrencyCode2 := CustLedgEntry."Currency Code"; + if GenJnlLine.Amount = 0 then begin + repeat + CheckAgainstApplnCurrency(CurrencyCode2, CustLedgEntry."Currency Code", "Gen. Journal Account Type"::Customer.AsInteger(), true); + CustLedgEntry.CalcFields("Remaining Amount"); + CustLedgEntry."Remaining Amount" := + CurrExchRate.ExchangeAmount( + CustLedgEntry."Remaining Amount", + CustLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date"); + CustLedgEntry."Remaining Amount" := + Round(CustLedgEntry."Remaining Amount", Currency."Amount Rounding Precision"); + CustLedgEntry."Remaining Pmt. Disc. Possible" := + CurrExchRate.ExchangeAmount( + CustLedgEntry."Remaining Pmt. Disc. Possible", + CustLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date"); + CustLedgEntry."Remaining Pmt. Disc. Possible" := + Round(CustLedgEntry."Remaining Pmt. Disc. Possible", Currency."Amount Rounding Precision"); + CustLedgEntry."Amount to Apply" := + CurrExchRate.ExchangeAmount( + CustLedgEntry."Amount to Apply", + CustLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date"); + CustLedgEntry."Amount to Apply" := + Round(CustLedgEntry."Amount to Apply", Currency."Amount Rounding Precision"); + if ((CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::"Credit Memo") and + (CustLedgEntry."Remaining Pmt. Disc. Possible" <> 0) or + (CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Invoice)) and + (GenJnlLine."Posting Date" <= CustLedgEntry."Pmt. Discount Date") + then + GenJnlLine.Amount := GenJnlLine.Amount - (CustLedgEntry."Amount to Apply" - CustLedgEntry."Remaining Pmt. Disc. Possible") + else + GenJnlLine.Amount := GenJnlLine.Amount - CustLedgEntry."Amount to Apply"; + until CustLedgEntry.Next() = 0; + GenJnlLine."Amount (LCY)" := GenJnlLine.Amount; + GenJnlLine."Currency Factor" := 1; + if (GenJnlLine."Bal. Account Type" = GenJnlLine."Bal. Account Type"::Customer) or + (GenJnlLine."Bal. Account Type" = GenJnlLine."Bal. Account Type"::Vendor) + then begin + GenJnlLine.Amount := -GenJnlLine.Amount; + GenJnlLine."Amount (LCY)" := -GenJnlLine."Amount (LCY)"; + end; + GenJnlLine.Validate(Amount); + GenJnlLine.Validate("Amount (LCY)"); + end else + repeat + CheckAgainstApplnCurrency(CurrencyCode2, CustLedgEntry."Currency Code", "Gen. Journal Account Type"::Customer.AsInteger(), true); + until CustLedgEntry.Next() = 0; + ConfirmAndCheckApplnCurrency(GenJnlLine, Text001Lbl + Text002Lbl, CustLedgEntry."Currency Code", "Gen. Journal Account Type"::Customer.AsInteger()); + end else + GenJnlLine."Applies-to ID" := ''; + GenJnlLine."Due Date" := CustLedgEntry."Due Date"; + GenJnlLine."Direct Debit Mandate ID" := CustLedgEntry."Direct Debit Mandate ID"; + + OnAfterApplyCustomer(CustLedgEntry, GenJnlLine); + end; + + local procedure ApplyVendor(PaymentLine: Record "Payment Line FR"): Boolean + begin + VendLedgEntry.SetCurrentKey("Vendor No.", Open, Positive); + VendLedgEntry.SetRange("Vendor No.", AccNo); + VendLedgEntry.SetRange(Open, true); + GenJnlLine."Applies-to ID" := GetAppliesToID(GenJnlLine."Applies-to ID", PaymentLine); + ApplyVendEntries.SetGenJnlLine(GenJnlLine, GenJnlLine.FieldNo("Applies-to ID")); + ApplyVendEntries.SetRecord(VendLedgEntry); + ApplyVendEntries.SetTableView(VendLedgEntry); + ApplyVendEntries.LookupMode(true); + OK := ApplyVendEntries.RunModal() = ACTION::LookupOK; + Clear(ApplyVendEntries); + if not OK then + exit(true); + VendLedgEntry.Reset(); + VendLedgEntry.SetCurrentKey("Vendor No.", Open, Positive); + VendLedgEntry.SetRange("Vendor No.", AccNo); + VendLedgEntry.SetRange(Open, true); + VendLedgEntry.SetRange("Applies-to ID", GenJnlLine."Applies-to ID"); + if VendLedgEntry.Find('+') then begin + CurrencyCode2 := VendLedgEntry."Currency Code"; + if GenJnlLine.Amount = 0 then begin + repeat + CheckAgainstApplnCurrency(CurrencyCode2, VendLedgEntry."Currency Code", "Gen. Journal Account Type"::Vendor.AsInteger(), true); + VendLedgEntry.CalcFields("Remaining Amount"); + VendLedgEntry."Remaining Amount" := + CurrExchRate.ExchangeAmount( + VendLedgEntry."Remaining Amount", + VendLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date"); + VendLedgEntry."Remaining Amount" := + Round(VendLedgEntry."Remaining Amount", Currency."Amount Rounding Precision"); + VendLedgEntry."Remaining Pmt. Disc. Possible" := + CurrExchRate.ExchangeAmount( + VendLedgEntry."Remaining Pmt. Disc. Possible", + VendLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date"); + VendLedgEntry."Remaining Pmt. Disc. Possible" := + Round(VendLedgEntry."Remaining Pmt. Disc. Possible", Currency."Amount Rounding Precision"); + VendLedgEntry."Amount to Apply" := + CurrExchRate.ExchangeAmount( + VendLedgEntry."Amount to Apply", + VendLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date"); + VendLedgEntry."Amount to Apply" := + Round(VendLedgEntry."Amount to Apply", Currency."Amount Rounding Precision"); + if ((VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::"Credit Memo") and + (VendLedgEntry."Remaining Pmt. Disc. Possible" <> 0) or + (VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::Invoice)) and + (GenJnlLine."Posting Date" <= VendLedgEntry."Pmt. Discount Date") + then + GenJnlLine.Amount := GenJnlLine.Amount - (VendLedgEntry."Amount to Apply" - VendLedgEntry."Remaining Pmt. Disc. Possible") + else + GenJnlLine.Amount := GenJnlLine.Amount - VendLedgEntry."Amount to Apply"; + until VendLedgEntry.Next(-1) = 0; + GenJnlLine."Amount (LCY)" := GenJnlLine.Amount; + GenJnlLine."Currency Factor" := 1; + if (GenJnlLine."Bal. Account Type" = GenJnlLine."Bal. Account Type"::Customer) or + (GenJnlLine."Bal. Account Type" = GenJnlLine."Bal. Account Type"::Vendor) + then begin + GenJnlLine.Amount := -GenJnlLine.Amount; + GenJnlLine."Amount (LCY)" := -GenJnlLine."Amount (LCY)"; + end; + GenJnlLine.Validate(Amount); + GenJnlLine.Validate("Amount (LCY)"); + end else + repeat + CheckAgainstApplnCurrency(CurrencyCode2, VendLedgEntry."Currency Code", "Gen. Journal Account Type"::Vendor.AsInteger(), true); + until VendLedgEntry.Next(-1) = 0; + ConfirmAndCheckApplnCurrency(GenJnlLine, Text001Lbl + Text002Lbl, VendLedgEntry."Currency Code", "Gen. Journal Account Type"::Vendor.AsInteger()); + end else + GenJnlLine."Applies-to ID" := ''; + GenJnlLine."Due Date" := VendLedgEntry."Due Date"; + + OnAfterApplyVendor(VendLedgEntry, GenJnlLine); + end; + + procedure CheckAgainstApplnCurrency(ApplnCurrencyCode: Code[10]; CompareCurrencyCode: Code[10]; Acc_Type: Option "G/L Account",Customer,Vendor,"Bank Account","Fixed Asset"; Message: Boolean): Boolean + var + Currency2: Record Currency; + SalesSetup: Record "Sales & Receivables Setup"; + PurchSetup: Record "Purchases & Payables Setup"; + CurrencyAppln: Option No,EMU,All; + begin + if ApplnCurrencyCode = CompareCurrencyCode then + exit(true); + + case Acc_Type of + Acc_Type::Customer: + begin + SalesSetup.Get(); + CurrencyAppln := SalesSetup."Appln. between Currencies"; + case CurrencyAppln of + CurrencyAppln::No: + begin + if ApplnCurrencyCode <> CompareCurrencyCode then + if Message then + Error(Text006Lbl); + + exit(false); + end; + CurrencyAppln::EMU: + begin + GLSetup.Get(); + if not Currency.Get(ApplnCurrencyCode) then + Currency."EMU Currency" := GLSetup."EMU Currency"; + if not Currency2.Get(CompareCurrencyCode) then + Currency2."EMU Currency" := GLSetup."EMU Currency"; + if not Currency."EMU Currency" or not Currency2."EMU Currency" then + if Message then + Error(Text007Lbl); + + exit(false); + end; + end; + end; + Acc_Type::Vendor: + begin + PurchSetup.Get(); + CurrencyAppln := PurchSetup."Appln. between Currencies"; + case CurrencyAppln of + CurrencyAppln::No: + begin + if ApplnCurrencyCode <> CompareCurrencyCode then + if Message then + Error(Text006Lbl); + + exit(false); + end; + CurrencyAppln::EMU: + begin + GLSetup.Get(); + if not Currency.Get(ApplnCurrencyCode) then + Currency."EMU Currency" := GLSetup."EMU Currency"; + if not Currency2.Get(CompareCurrencyCode) then + Currency2."EMU Currency" := GLSetup."EMU Currency"; + if not Currency."EMU Currency" or not Currency2."EMU Currency" then + if Message then + Error(Text007Lbl); + + exit(false); + end; + end; + end; + end; + + exit(true); + end; + + procedure GetCurrency() + begin + if GenJnlLine."Currency Code" = '' then + Currency.InitRoundingPrecision() + else begin + Currency.Get(GenJnlLine."Currency Code"); + Currency.TestField("Amount Rounding Precision"); + end; + end; + + procedure DeleteApply(Rec: Record "Payment Line FR") + var + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforeDeleteApply(Rec, CustLedgEntry, VendLedgEntry, IsHandled); + if IsHandled then + exit; + + if Rec."Applies-to ID" = '' then + exit; + + case Rec."Account Type" of + Rec."Account Type"::Customer: + begin + CustLedgEntry.Init(); + CustLedgEntry.SetCurrentKey("Applies-to ID"); + if Rec."Applies-to Doc. No." <> '' then begin + CustLedgEntry.SetRange("Document No.", Rec."Applies-to Doc. No."); + CustLedgEntry.SetRange("Document Type", Rec."Applies-to Doc. Type"); + end; + CustLedgEntry.SetRange("Applies-to ID", Rec."Applies-to ID"); + OnDeleteApplyOnBeforeCustLedgEntryModifyAll(Rec, CustLedgEntry); + CustLedgEntry.ModifyAll("Applies-to ID", ''); + end; + Rec."Account Type"::Vendor: + begin + VendLedgEntry.Init(); + VendLedgEntry.SetCurrentKey("Applies-to ID"); + if Rec."Applies-to Doc. No." <> '' then begin + VendLedgEntry.SetRange("Document No.", Rec."Applies-to Doc. No."); + VendLedgEntry.SetRange("Document Type", Rec."Applies-to Doc. Type"); + end; + VendLedgEntry.SetRange("Applies-to ID", Rec."Applies-to ID"); + OnDeleteApplyOnBeforeVendLedgEntryModifyAll(Rec, VendLedgEntry); + VendLedgEntry.ModifyAll("Applies-to ID", ''); + end; + end; + end; + + local procedure ConfirmAndCheckApplnCurrency(var GenJournalLine: Record "Gen. Journal Line"; Question: Text; CurrencyCode: Code[10]; AccountType: Option) + begin + if GenJournalLine."Currency Code" <> CurrencyCode2 then + if GenJournalLine.Amount = 0 then begin + if not Confirm(Question, true, GenJournalLine.FieldCaption("Currency Code"), GenJournalLine.TableCaption(), GenJournalLine."Currency Code", CurrencyCode) then + Error(Text003Lbl); + GenJournalLine."Currency Code" := CurrencyCode + end else + CheckAgainstApplnCurrency(GenJournalLine."Currency Code", CurrencyCode, AccountType, true); + end; + + local procedure GetAppliesToID(AppliesToID: Code[50]; PaymentLine: Record "Payment Line FR"): Code[50] + begin + if AppliesToID = '' then + if PaymentLine."Document No." <> '' then + AppliesToID := PaymentLine."No." + '/' + PaymentLine."Document No." + else + AppliesToID := PaymentLine."No." + '/' + Format(PaymentLine."Line No."); + exit(AppliesToID); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterApply(GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterApplyCustomer(CustLedgEntry: Record "Cust. Ledger Entry"; GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterApplyVendor(VendLedgEntry: Record "Vendor Ledger Entry"; GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeDeleteApply(Rec: Record "Payment Line FR"; CustLedgEntry: Record "Cust. Ledger Entry"; VendLedgEntry: Record "Vendor Ledger Entry"; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnDeleteApplyOnBeforeCustLedgEntryModifyAll(PaymentLine: Record "Payment Line FR"; var CustLedgEntry: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnDeleteApplyOnBeforeVendLedgEntryModifyAll(PaymentLine: Record "Payment Line FR"; var VendLedgEntry: Record "Vendor Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnApplyOnElseCase(var PaymentLine: Record "Payment Line FR"; var GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnApplyOnBeforeApplyCustomer(var PaymentLine: Record "Payment Line FR"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnApplyOnBeforeApplyVendor(var PaymentLine: Record "Payment Line FR"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFR.Codeunit.al new file mode 100644 index 0000000000..d47ccce6a4 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFR.Codeunit.al @@ -0,0 +1,1179 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Bank.BankAccount; +using Microsoft.Bank.DirectDebit; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.GeneralLedger.Account; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.FixedAssets.FixedAsset; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Foundation.NoSeries; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using Microsoft.Sales.Receivables; + +codeunit 10837 "Payment Management FR" +{ + Permissions = TableData "Cust. Ledger Entry" = rm, + TableData "Vendor Ledger Entry" = rm; + + trigger OnRun() + begin + CreatePaymentHeaders(); + end; + + var + InvPostingBuffer: array[2] of Record "Payment Post. Buffer FR" temporary; + CustomerPostingGroup: Record "Customer Posting Group"; + VendorPostingGroup: Record "Vendor Posting Group"; + Customer: Record Customer; + Vendor: Record Vendor; + CustLedgerEntry: Record "Cust. Ledger Entry"; + VendorLedgerEntry: Record "Vendor Ledger Entry"; + GenJnlLine: Record "Gen. Journal Line"; + PaymentLine: Record "Payment Line FR"; + OldPaymentLine: Record "Payment Line FR"; + StepLedger: Record "Payment Step Ledger FR"; + Step: Record "Payment Step FR"; + PaymentHeader: Record "Payment Header FR"; + PaymentClass: Record "Payment Class FR"; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + DimMgt: Codeunit DimensionManagement; + N: Integer; + Suffix: Text; + EntryTypeDebit: Enum "Gen. Journal Account Type"; + EntryNoAccountDebit: Code[20]; + EntryPostGroupDebit: Code[20]; + EntryTypeCredit: Enum "Gen. Journal Account Type"; + EntryNoAccountCredit: Code[20]; + EntryPostGroupCredit: Code[20]; + GLEntryNoTmp: Integer; + HeaderAccountUsedGlobally: Boolean; + Text002Lbl: Label 'One or more acceptation codes are No.'; + Text003Lbl: Label 'One or more lines have an incorrect RIB code.'; + Text004Lbl: Label 'There is no Payment Header to create.'; + Text005Lbl: Label 'Ledger Posting'; + Text006Lbl: Label 'One or more due dates are not specified.'; + Text007Lbl: Label 'The action has been canceled.'; + Text008Lbl: Label 'The header RIB is not correct.'; + Text009Lbl: Label 'The combination of dimensions used in Payment Header %1 is blocked. %2.', Comment = '%1 - payment header no, %2 - dimension error'; + Text010Lbl: Label 'The combination of dimensions used in Payment Header %1, line no. %2 is blocked. %3.', Comment = '%1 - payment header no, %2 - payment line no, %3 - dimension error'; + Text011Lbl: Label 'XX'; + Text012Lbl: Label 'Customer Posting Group %1 does not exist.', Comment = '%1 = Posting Group'; + Text014Lbl: Label 'You must enter a G/L account for customer posting group %1.', Comment = '%1 = Posting Group'; + Text016Lbl: Label 'A posted line cannot be deleted.'; + Text017Lbl: Label 'Source Code %1 does not exist.', Comment = '%1 = code'; + Text018Lbl: Label 'You must specify a debit account number for step %1 of payment type %2.', Comment = '%1 = Name, %2 = Class Name'; + Text019Lbl: Label 'You must specify a credit account number for step %1 of payment type %2.', Comment = '%1 = Name, %2 = Class Name'; + Text020Lbl: Label 'You must specify an account number in the payment header.'; + Text022Lbl: Label 'The status of document %1 does not authorize archiving.', Comment = '%1 = No.'; + CheckDimVauePostingLineErr: Label 'A dimension used in %1 %2 %3 has caused an error. %4', Comment = '%1=Payment Header No., %2=tablecaption, %3=Payment Line No., %4=Error text'; + CheckDimVauePostingHeaderErr: Label 'A dimension used in %1 has caused an error. %2', Comment = '%1=Payment Header No., %2=Error text'; + Text100Lbl: Label 'Rounding on %1', Comment = '%1 = Description'; + + local procedure ProcessPaymentStep(PaymentHeaderNo: Code[20]; PaymentStep: Record "Payment Step FR") + var + PaymentStatus: Record "Payment Status FR"; + ActionValidated: Boolean; + begin + OnBeforeProcessPaymentStep(PaymentHeaderNo, PaymentStep, PaymentLine); + + PaymentHeader.Get(PaymentHeaderNo); + PaymentHeader.SetRange("No.", PaymentHeader."No."); + + if PaymentStep."Verify Header RIB" and not PaymentHeader."RIB Checked" then + Error(Text008Lbl); + + PaymentLine.SetRange("No.", PaymentHeader."No."); + PaymentLine.SetRange("Copied To No.", ''); + + if PaymentStep."Acceptation Code<>No" then begin + PaymentLine.SetRange("Acceptation Code", PaymentLine."Acceptation Code"::No); + if PaymentLine.Find('-') then + Error(Text002Lbl); + PaymentLine.SetRange("Acceptation Code"); + end; + + if PaymentStep."Verify Lines RIB" then begin + PaymentLine.SetRange("RIB Checked", false); + if PaymentLine.Find('-') then + Error(Text003Lbl); + PaymentLine.SetRange("RIB Checked"); + end; + + if PaymentStep."Verify Due Date" then begin + PaymentLine.SetRange("Due Date", 0D); + if PaymentLine.Find('-') then + Error(Text006Lbl); + PaymentLine.SetRange("Due Date"); + end; + OnProcessPaymentStepOnAfterCheckPaymentStep(PaymentStep, PaymentHeader, PaymentLine); + + Step.Get(PaymentStep."Payment Class", PaymentStep.Line); + + ActionValidated := ProcessPaymentStepByActionType(); + + if ActionValidated then begin + PaymentHeader.Validate("Status No.", Step."Next Status"); + PaymentHeader.Modify(); + PaymentLine.SetRange("No.", PaymentHeader."No."); + PaymentLine.ModifyAll("Status No.", Step."Next Status"); + PaymentStatus.Get(PaymentHeader."Payment Class", Step."Next Status"); + PaymentLine.ModifyAll("Payment in Progress", PaymentStatus."Payment in Progress"); + end else + Message(Text007Lbl); + + OnAfterProcessPaymentStep(PaymentHeaderNo, PaymentStep); + end; + + local procedure ProcessPaymentStepByActionType() ActionValidated: Boolean + var + Window: Dialog; + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforeProcessPaymentStepByActionType(PaymentLine, Step, ActionValidated, IsHandled); + if IsHandled then + exit(ActionValidated); + + case Step."Action Type" of + Step."Action Type"::None: + exit(true); + Step."Action Type"::"Cancel File": + begin + PaymentHeader."File Export Completed" := false; + PaymentHeader.Modify(); + exit(true); + end; + Step."Action Type"::File: + begin + PaymentHeader."File Export Completed" := false; + PaymentHeader.Modify(); + Commit(); + + case Step."Export Type" of + Step."Export Type"::Report: + REPORT.RunModal(Step."Export No.", true, false, PaymentHeader); + Step."Export Type"::XMLport: + RunXmlPortExport(Step."Export No.", PaymentHeader); + end; + + PaymentHeader.Find(); + exit(PaymentHeader."File Export Completed"); + end; + Step."Action Type"::Report: + begin + REPORT.RunModal(Step."Report No.", true, true, PaymentLine); + exit(true); + end; + Step."Action Type"::Ledger: + begin + InvPostingBuffer[1].DeleteAll(); + CheckDim(); + Window.Open( + '#1#################################\\' + + Text005Lbl); + if PaymentLine.Find('-') then + repeat + Window.Update(1, Text005Lbl + ' ' + PaymentLine."No." + ' ' + Format(PaymentLine."Line No.")); + OldPaymentLine := PaymentLine; + HeaderAccountUsedGlobally := false; + GenerInvPostingBuffer(); + PaymentLine."Acc. Type Last Entry Debit" := EntryTypeDebit; + PaymentLine."Acc. No. Last Entry Debit" := EntryNoAccountDebit; + PaymentLine."P. Group Last Entry Debit" := EntryPostGroupDebit; + PaymentLine."Acc. Type Last Entry Credit" := EntryTypeCredit; + PaymentLine."Acc. No. Last Entry Credit" := EntryNoAccountCredit; + PaymentLine."P. Group Last Entry Credit" := EntryPostGroupCredit; + PaymentLine.Validate("Status No.", Step."Next Status"); + PaymentLine.Posted := true; + PaymentLine.Modify(); + until PaymentLine.Next() = 0; + Window.Close(); + GenerEntries(); + exit(true); + end; + else + OnProcessPaymentStepOnCaseElse(Step, PaymentLine, ActionValidated, PaymentHeader); + end; + end; + + procedure UpdtBuffer() + var + CurrExchRate: Record "Currency Exchange Rate"; + begin + InvPostingBuffer[2] := InvPostingBuffer[1]; + if InvPostingBuffer[2].Find() then begin + InvPostingBuffer[2].Validate(Amount, InvPostingBuffer[2].Amount + InvPostingBuffer[1].Amount); + InvPostingBuffer[2]."Amount (LCY)" := Round(CurrExchRate.ExchangeAmtFCYToLCY(PaymentHeader."Posting Date", + PaymentHeader."Currency Code", InvPostingBuffer[2].Amount, PaymentHeader."Currency Factor")); + InvPostingBuffer[2]."VAT Amount" := + InvPostingBuffer[2]."VAT Amount" + InvPostingBuffer[1]."VAT Amount"; + InvPostingBuffer[2]."Line Discount Amount" := + InvPostingBuffer[2]."Line Discount Amount" + InvPostingBuffer[1]."Line Discount Amount"; + if InvPostingBuffer[1]."Line Discount Account" <> '' then + InvPostingBuffer[2]."Line Discount Account" := InvPostingBuffer[1]."Line Discount Account"; + InvPostingBuffer[2]."Inv. Discount Amount" := + InvPostingBuffer[2]."Inv. Discount Amount" + InvPostingBuffer[1]."Inv. Discount Amount"; + if InvPostingBuffer[1]."Inv. Discount Account" <> '' then + InvPostingBuffer[2]."Inv. Discount Account" := InvPostingBuffer[1]."Inv. Discount Account"; + InvPostingBuffer[2]."VAT Base Amount" := + InvPostingBuffer[2]."VAT Base Amount" + InvPostingBuffer[1]."VAT Base Amount"; + InvPostingBuffer[2]."Amount (ACY)" := + InvPostingBuffer[2]."Amount (ACY)" + InvPostingBuffer[1]."Amount (ACY)"; + InvPostingBuffer[2]."VAT Amount (ACY)" := + InvPostingBuffer[2]."VAT Amount (ACY)" + InvPostingBuffer[1]."VAT Amount (ACY)"; + InvPostingBuffer[2]."VAT Difference" := + InvPostingBuffer[2]."VAT Difference" + InvPostingBuffer[1]."VAT Difference"; + InvPostingBuffer[2]."Line Discount Amt. (ACY)" := + InvPostingBuffer[2]."Line Discount Amt. (ACY)" + + InvPostingBuffer[1]."Line Discount Amt. (ACY)"; + InvPostingBuffer[2]."Inv. Discount Amt. (ACY)" := + InvPostingBuffer[2]."Inv. Discount Amt. (ACY)" + + InvPostingBuffer[1]."Inv. Discount Amt. (ACY)"; + InvPostingBuffer[2]."VAT Base Amount (ACY)" := + InvPostingBuffer[2]."VAT Base Amount (ACY)" + + InvPostingBuffer[1]."VAT Base Amount (ACY)"; + InvPostingBuffer[2].Quantity := + InvPostingBuffer[2].Quantity + InvPostingBuffer[1].Quantity; + if not InvPostingBuffer[1]."System-Created Entry" then + InvPostingBuffer[2]."System-Created Entry" := false; + InvPostingBuffer[2].Modify(); + end else begin + GLEntryNoTmp += 1; + InvPostingBuffer[1]."GL Entry No." := GLEntryNoTmp; + InvPostingBuffer[1].Insert(); + end; + end; + + procedure CopyLigBor(var FromPaymentLine: Record "Payment Line FR"; NewStep: Integer; var PayNum: Code[20]) + var + ToBord: Record "Payment Header FR"; + ToPaymentLine: Record "Payment Line FR"; + PaymentStep: Record "Payment Step FR"; + Process: Record "Payment Class FR"; + PaymentStatus: Record "Payment Status FR"; + NoSeries: Codeunit "No. Series"; + i: Integer; + begin + if FromPaymentLine.Find('-') then begin + PaymentStep.Get(FromPaymentLine."Payment Class", NewStep); + Process.Get(FromPaymentLine."Payment Class"); + if PayNum = '' then begin + i := 10000; + ToBord."No. Series" := PaymentStep."Header Nos. Series"; + ToBord."No." := NoSeries.GetNextNo(ToBord."No. Series"); + ToBord."Payment Class" := FromPaymentLine."Payment Class"; + ToBord."Status No." := PaymentStep."Next Status"; + PaymentStatus.Get(ToBord."Payment Class", ToBord."Status No."); + ToBord."Archiving Authorized" := PaymentStatus."Archiving Authorized"; + ToBord."Currency Code" := FromPaymentLine."Currency Code"; + ToBord."Currency Factor" := FromPaymentLine."Currency Factor"; + OnCopyLigBorOnBeforeInitHeader(ToBord, Process, i); + ToBord.InitHeader(); + ToBord.Insert(); + end else begin + ToBord.Get(PayNum); + ToPaymentLine.SetRange("No.", PayNum); + if ToPaymentLine.FindLast() then + i := ToPaymentLine."Line No." + 10000 + else + i := 10000; + end; + repeat + ToPaymentLine.Copy(FromPaymentLine); + ToPaymentLine."No." := ToBord."No."; + ToPaymentLine."Line No." := i; + ToPaymentLine.IsCopy := true; + ToPaymentLine."Status No." := PaymentStep."Next Status"; + ToPaymentLine."Copied To No." := ''; + ToPaymentLine."Copied To Line" := 0; + ToPaymentLine.Posted := false; + ToPaymentLine."Created from No." := FromPaymentLine."No."; + ToPaymentLine."Dimension Set ID" := FromPaymentLine."Dimension Set ID"; + OnCopyLigBorOnBeforeToPaymentLineInsert(ToPaymentLine, Process); + ToPaymentLine.Insert(true); + FromPaymentLine."Copied To No." := ToPaymentLine."No."; + FromPaymentLine."Copied To Line" := ToPaymentLine."Line No."; + FromPaymentLine.Modify(); + i += 10000; + until FromPaymentLine.Next() = 0; + PayNum := ToBord."No."; + end; + end; + + procedure DeleteLigBorCopy(var FromPaymentLine: Record "Payment Line FR") + var + ToPaymentLine: Record "Payment Line FR"; + begin + ToPaymentLine.SetCurrentKey("Copied To No.", "Copied To Line"); + + if FromPaymentLine.Find('-') then + if FromPaymentLine.Posted then + Message(Text016Lbl) + else + repeat + ToPaymentLine.SetRange("Copied To No.", FromPaymentLine."No."); + ToPaymentLine.SetRange("Copied To Line", FromPaymentLine."Line No."); + ToPaymentLine.FindFirst(); + ToPaymentLine."Copied To No." := ''; + ToPaymentLine."Copied To Line" := 0; + ToPaymentLine.Modify(); + FromPaymentLine.Delete(true); + until FromPaymentLine.Next() = 0; + end; + + procedure GenerInvPostingBuffer() + var + PaymentClassFR: Record "Payment Class FR"; + NoSeriesBatch: Codeunit "No. Series - Batch"; + Description: Text[98]; + begin + StepLedger.SetRange("Payment Class", Step."Payment Class"); + StepLedger.SetRange(Line, Step.Line); + + if StepLedger.Find('-') then begin + repeat + Clear(InvPostingBuffer[1]); + SetPostingGroup(); + SetAccountNo(); + InvPostingBuffer[1]."System-Created Entry" := true; + if StepLedger.Sign = StepLedger.Sign::Debit then begin + InvPostingBuffer[1].Validate(Amount, Abs(PaymentLine.Amount)); + InvPostingBuffer[1].Validate("Amount (LCY)", Abs(PaymentLine."Amount (LCY)")); + end else begin + InvPostingBuffer[1].Validate(Amount, Abs(PaymentLine.Amount) * -1); + InvPostingBuffer[1].Validate("Amount (LCY)", Abs(PaymentLine."Amount (LCY)") * -1); + end; + InvPostingBuffer[1]."Currency Code" := PaymentLine."Currency Code"; + InvPostingBuffer[1]."Currency Factor" := PaymentLine."Currency Factor"; + InvPostingBuffer[1].Correction := PaymentLine.Correction xor Step.Correction; + if StepLedger."Detail Level" = StepLedger."Detail Level"::Line then + InvPostingBuffer[1]."Payment Line No." := PaymentLine."Line No." + else + if StepLedger."Detail Level" = StepLedger."Detail Level"::"Due Date" then + InvPostingBuffer[1]."Due Date" := PaymentLine."Due Date"; + + InvPostingBuffer[1]."Document Type" := StepLedger."Document Type"; + if StepLedger."Document No." = StepLedger."Document No."::"Header No." then + InvPostingBuffer[1]."Document No." := PaymentHeader."No." + else begin + if (InvPostingBuffer[1].Sign = InvPostingBuffer[1].Sign::Positive) and + (PaymentLine."Entry No. Debit" = 0) and (PaymentLine."Entry No. Credit" = 0) + then + PaymentLine.TestField("Document No."); + InvPostingBuffer[1]."Document No." := PaymentLine."Document No."; + end; + InvPostingBuffer[1]."Header Document No." := PaymentHeader."No."; + if StepLedger.Sign = StepLedger.Sign::Debit then begin + EntryTypeDebit := InvPostingBuffer[1]."Account Type"; + EntryNoAccountDebit := InvPostingBuffer[1]."Account No."; + EntryPostGroupDebit := InvPostingBuffer[1]."Posting Group"; + end else begin + EntryTypeCredit := InvPostingBuffer[1]."Account Type"; + EntryNoAccountCredit := InvPostingBuffer[1]."Account No."; + EntryPostGroupCredit := InvPostingBuffer[1]."Posting Group"; + end; + InvPostingBuffer[1]."System-Created Entry" := true; + Application(); + PaymentClassFR.Get(PaymentHeader."Payment Class"); + if (PaymentClassFR."Unrealized VAT Reversal" = PaymentClassFR."Unrealized VAT Reversal"::Delayed) and + Step."Realize VAT" + then begin + InvPostingBuffer[1]."Applies-to Doc. Type" := PaymentLine."Applies-to Doc. Type"; + InvPostingBuffer[1]."Applies-to Doc. No." := PaymentLine."Applies-to Doc. No."; + if InvPostingBuffer[1]."Applies-to ID" = '' then + InvPostingBuffer[1]."Applies-to ID" := PaymentLine."Applies-to ID"; + InvPostingBuffer[1]."Created from No." := PaymentLine."Created from No."; + end; + Description := GetDescriptionForInvPostingBuffer(); + OnGenerInvPostingBufferOnAfterGetDescriptionForInvPostingBuffer(StepLedger, PaymentHeader, PaymentLine, Description); + InvPostingBuffer[1].Description := CopyStr(Description, 1, 50); + InvPostingBuffer[1]."Source Type" := PaymentLine."Account Type"; + InvPostingBuffer[1]."Source No." := PaymentLine."Account No."; + InvPostingBuffer[1]."External Document No." := PaymentLine."External Document No."; + InvPostingBuffer[1]."Dimension Set ID" := PaymentLine."Dimension Set ID"; + OnGenerInvPostingBufferOnBeforeUpdtBuffer(InvPostingBuffer, PaymentLine, StepLedger); + UpdtBuffer(); + if (InvPostingBuffer[1].Amount >= 0) xor InvPostingBuffer[1].Correction then + PaymentLine."Entry No. Debit" := InvPostingBuffer[1]."GL Entry No." + else + PaymentLine."Entry No. Credit" := InvPostingBuffer[1]."GL Entry No."; + until StepLedger.Next() = 0; + NoSeriesBatch.SaveState(); + end; + end; + + local procedure GetDescriptionForInvPostingBuffer() Description: Text[98] + begin + Description := + StrSubstNo(StepLedger.Description, PaymentLine."Due Date", PaymentLine."Account No.", PaymentLine."Document No."); + + OnAfterGetDescriptionForInvPostingBuffer(StepLedger, PaymentLine, Description); + end; + + procedure SetPostingGroup() + var + PostingGroup: Code[20]; + begin + if PaymentLine."Account Type" = PaymentLine."Account Type"::Customer then + if ((StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Payment Line Account") or + (StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Associated G/L Account") or + (StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Header Payment Account") or + ((StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Setup Account") and + (StepLedger."Account Type" = StepLedger."Account Type"::Customer))) + then begin + if PaymentLine."Posting Group" <> '' then + PostingGroup := PaymentLine."Posting Group" + else + if StepLedger."Customer Posting Group" <> '' then + PostingGroup := StepLedger."Customer Posting Group" + else begin + Customer.Get(PaymentLine."Account No."); + PostingGroup := Customer."Customer Posting Group"; + end; + OnSetPostingGroupOnBeforeCheckPostingGroup(PaymentLine, StepLedger, PostingGroup); + if not CustomerPostingGroup.Get(PostingGroup) then + Error(Text012Lbl, PostingGroup); + if CustomerPostingGroup."Receivables Account" = '' then + Error(Text014Lbl, PostingGroup); + end; + + if PaymentLine."Account Type" = PaymentLine."Account Type"::Vendor then + if ((StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Payment Line Account") or + (StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Associated G/L Account") or + (StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Header Payment Account") or + ((StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Setup Account") and + (StepLedger."Account Type" = StepLedger."Account Type"::Vendor))) + then begin + if PaymentLine."Posting Group" <> '' then + PostingGroup := PaymentLine."Posting Group" + else + if StepLedger."Vendor Posting Group" <> '' then + PostingGroup := StepLedger."Vendor Posting Group" + else begin + Vendor.Get(PaymentLine."Account No."); + PostingGroup := Vendor."Vendor Posting Group"; + end; + if not VendorPostingGroup.Get(PostingGroup) then + Error(Text012Lbl, PostingGroup); + if VendorPostingGroup."Payables Account" = '' then + Error(Text014Lbl, PostingGroup); + end; + end; + + procedure SetAccountNo() + begin + case StepLedger."Accounting Type" of + StepLedger."Accounting Type"::"Payment Line Account": + begin + InvPostingBuffer[1]."Account Type" := PaymentLine."Account Type"; + InvPostingBuffer[1]."Account No." := PaymentLine."Account No."; + if PaymentLine."Account Type" = PaymentLine."Account Type"::Customer then + InvPostingBuffer[1]."Posting Group" := CustomerPostingGroup.Code; + if PaymentLine."Account Type" = PaymentLine."Account Type"::Vendor then + InvPostingBuffer[1]."Posting Group" := VendorPostingGroup.Code; + InvPostingBuffer[1]."Line No." := PaymentLine."Line No."; + DimMgt.UpdateGlobalDimFromDimSetID(PaymentLine."Dimension Set ID", + InvPostingBuffer[1]."Global Dimension 1 Code", InvPostingBuffer[1]."Global Dimension 2 Code"); + end; + StepLedger."Accounting Type"::"Associated G/L Account": + begin + InvPostingBuffer[1]."Account Type" := InvPostingBuffer[1]."Account Type"::"G/L Account"; + if PaymentLine."Account Type" = PaymentLine."Account Type"::Customer then + InvPostingBuffer[1]."Account No." := CustomerPostingGroup."Receivables Account" + else + InvPostingBuffer[1]."Account No." := VendorPostingGroup."Payables Account"; + InvPostingBuffer[1]."Line No." := PaymentLine."Line No."; + end; + StepLedger."Accounting Type"::"Setup Account": + begin + InvPostingBuffer[1]."Account Type" := StepLedger."Account Type"; + InvPostingBuffer[1]."Account No." := StepLedger."Account No."; + if StepLedger."Account No." = '' then begin + PaymentHeader.CalcFields("Payment Class Name"); + if StepLedger.Sign = StepLedger.Sign::Debit then + Error(Text018Lbl, Step.Name, PaymentHeader."Payment Class Name"); + + Error(Text019Lbl, Step.Name, PaymentHeader."Payment Class Name"); + end; + if StepLedger."Account Type" = StepLedger."Account Type"::Customer then + InvPostingBuffer[1]."Posting Group" := StepLedger."Customer Posting Group" + else + InvPostingBuffer[1]."Posting Group" := StepLedger."Vendor Posting Group"; + InvPostingBuffer[1]."Line No." := PaymentLine."Line No."; + end; + StepLedger."Accounting Type"::"G/L Account / Month": + begin + InvPostingBuffer[1]."Account Type" := InvPostingBuffer[1]."Account Type"::"G/L Account"; + N := Date2DMY(PaymentLine."Due Date", 2); + if N < 10 then + Suffix := '0' + Format(N) + else + Suffix := Format(N); + InvPostingBuffer[1]."Account No." := CopyStr(StepLedger.Root + Suffix, 1, MaxStrLen(InvPostingBuffer[1]."Account No.")); + InvPostingBuffer[1]."Line No." := PaymentLine."Line No."; + end; + StepLedger."Accounting Type"::"G/L Account / Week": + begin + InvPostingBuffer[1]."Account Type" := InvPostingBuffer[1]."Account Type"::"G/L Account"; + N := Date2DWY(PaymentLine."Due Date", 2); + if N < 10 then + Suffix := '0' + Format(N) + else + Suffix := Format(N); + InvPostingBuffer[1]."Account No." := CopyStr(StepLedger.Root + Suffix, 1, MaxStrLen(InvPostingBuffer[1]."Account No.")); + InvPostingBuffer[1]."Line No." := PaymentLine."Line No."; + end; + StepLedger."Accounting Type"::"Bal. Account Previous Entry": + begin + if (StepLedger.Sign = StepLedger.Sign::Debit) and not (PaymentLine.Correction xor Step.Correction) then begin + InvPostingBuffer[1]."Account Type" := PaymentLine."Acc. Type Last Entry Credit"; + InvPostingBuffer[1]."Account No." := PaymentLine."Acc. No. Last Entry Credit"; + InvPostingBuffer[1]."Posting Group" := PaymentLine."P. Group Last Entry Credit"; + end else begin + InvPostingBuffer[1]."Account Type" := PaymentLine."Acc. Type Last Entry Debit"; + InvPostingBuffer[1]."Account No." := PaymentLine."Acc. No. Last Entry Debit"; + InvPostingBuffer[1]."Posting Group" := PaymentLine."P. Group Last Entry Debit"; + end; + InvPostingBuffer[1]."Line No." := PaymentLine."Line No."; + end; + StepLedger."Accounting Type"::"Header Payment Account": + begin + InvPostingBuffer[1]."Account Type" := PaymentHeader."Account Type"; + InvPostingBuffer[1]."Account No." := PaymentHeader."Account No."; + if PaymentHeader."Account No." = '' then + Error(Text020Lbl); + if StepLedger."Detail Level" = StepLedger."Detail Level"::Account then + HeaderAccountUsedGlobally := true; + InvPostingBuffer[1]."Line No." := 0; + DimMgt.UpdateGlobalDimFromDimSetID(PaymentHeader."Dimension Set ID", + InvPostingBuffer[1]."Global Dimension 1 Code", InvPostingBuffer[1]."Global Dimension 2 Code"); + end; + end; + end; + + procedure Application() + begin + if StepLedger.Application <> StepLedger.Application::None then + case StepLedger.Application of + StepLedger.Application::"Applied Entry": + begin + InvPostingBuffer[1]."Applies-to Doc. Type" := PaymentLine."Applies-to Doc. Type"; + InvPostingBuffer[1]."Applies-to Doc. No." := PaymentLine."Applies-to Doc. No."; + InvPostingBuffer[1]."Applies-to ID" := PaymentLine."Applies-to ID"; + end; + + StepLedger.Application::"Entry Previous Step": + begin + InvPostingBuffer[1]."Applies-to ID" := PaymentLine."No." + '/' + Format(PaymentLine."Line No.") + Text011Lbl; + + if InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Customer then begin + if (InvPostingBuffer[1].Amount < 0) xor InvPostingBuffer[1].Correction then + CustLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Debit") + else + CustLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Credit"); + + if CustLedgerEntry.FindFirst() then begin + CustLedgerEntry."Applies-to ID" := InvPostingBuffer[1]."Applies-to ID"; + CustLedgerEntry.CalcFields("Remaining Amount"); + CustLedgerEntry.Validate("Amount to Apply", CustLedgerEntry."Remaining Amount"); + CustLedgerEntry.Modify(); + end; + end + else + if InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Vendor then begin + if (InvPostingBuffer[1].Amount < 0) xor InvPostingBuffer[1].Correction then + VendorLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Debit") + else + VendorLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Credit"); + + if VendorLedgerEntry.FindFirst() then begin + VendorLedgerEntry."Applies-to ID" := InvPostingBuffer[1]."Applies-to ID"; + VendorLedgerEntry.CalcFields("Remaining Amount"); + VendorLedgerEntry.Validate("Amount to Apply", VendorLedgerEntry."Remaining Amount"); + VendorLedgerEntry.Modify(); + end; + end; + end; + + StepLedger.Application::"Memorized Entry": + begin + InvPostingBuffer[1]."Applies-to ID" := PaymentLine."No." + '/' + Format(PaymentLine."Line No.") + Text011Lbl; + + if InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Customer then begin + CustLedgerEntry.Reset(); + if (InvPostingBuffer[1].Amount < 0) xor InvPostingBuffer[1].Correction then + CustLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Debit Memo") + else + CustLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Credit Memo"); + + if CustLedgerEntry.FindFirst() then begin + CustLedgerEntry."Applies-to ID" := InvPostingBuffer[1]."Applies-to ID"; + CustLedgerEntry.CalcFields("Remaining Amount"); + CustLedgerEntry.Validate("Amount to Apply", CustLedgerEntry."Remaining Amount"); + CustLedgerEntry.Modify(); + end; + end + else + if InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Vendor then begin + if (InvPostingBuffer[1].Amount < 0) xor InvPostingBuffer[1].Correction then + VendorLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Debit Memo") + else + VendorLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Credit Memo"); + + if VendorLedgerEntry.FindFirst() then begin + VendorLedgerEntry."Applies-to ID" := InvPostingBuffer[1]."Applies-to ID"; + VendorLedgerEntry.CalcFields("Remaining Amount"); + VendorLedgerEntry.Validate("Amount to Apply", VendorLedgerEntry."Remaining Amount"); + VendorLedgerEntry.Modify(); + end; + end; + end; + end; + + // Detail Level logic + if StepLedger."Detail Level" = StepLedger."Detail Level"::Account then begin + if (InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Vendor) or + (InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Customer) then + InvPostingBuffer[1]."Due Date" := PaymentLine."Due Date"; + end else + InvPostingBuffer[1]."Due Date" := PaymentLine."Due Date"; + + OnAfterApplication(StepLedger, InvPostingBuffer, PaymentHeader, PaymentLine); + end; + + + procedure GenerEntries() + var + Currency: Record Currency; + Difference: Decimal; + TotalDebit: Decimal; + TotalCredit: Decimal; + LastGLEntryNo: Integer; + begin + if InvPostingBuffer[1].Find('+') then + repeat + LastGLEntryNo := PostInvPostingBuffer(); + PaymentLine.Reset(); + PaymentLine.SetRange("No.", PaymentHeader."No."); + PaymentLine.SetRange("Line No."); + if GenJnlLine.Amount >= 0 then begin + TotalDebit := TotalDebit + GenJnlLine."Amount (LCY)"; + StepLedger.Get(Step."Payment Class", Step.Line, StepLedger.Sign::Debit); + PaymentLine.SetRange("Entry No. Debit", InvPostingBuffer[1]."GL Entry No."); + if StepLedger."Memorize Entry" then + PaymentLine.ModifyAll(PaymentLine."Entry No. Debit Memo", LastGLEntryNo); + PaymentLine.ModifyAll("Entry No. Debit", LastGLEntryNo); + PaymentLine.SetRange("Entry No. Debit"); + end else begin + TotalCredit := TotalCredit + Abs(GenJnlLine."Amount (LCY)"); + StepLedger.Get(Step."Payment Class", Step.Line, StepLedger.Sign::Credit); + PaymentLine.SetRange("Entry No. Credit", InvPostingBuffer[1]."GL Entry No."); + if StepLedger."Memorize Entry" then + PaymentLine.ModifyAll(PaymentLine."Entry No. Credit Memo", LastGLEntryNo); + PaymentLine.ModifyAll("Entry No. Credit", LastGLEntryNo); + PaymentLine.SetRange("Entry No. Credit"); + end; + until InvPostingBuffer[1].Next(-1) = 0; + + if HeaderAccountUsedGlobally then begin + Difference := TotalDebit - TotalCredit; + if Difference <> 0 then begin + GenJnlLine.Init(); + GenJnlLine."Account Type" := GenJnlLine."Account Type"::"G/L Account"; + Currency.Get(PaymentHeader."Currency Code"); + if Difference < 0 then begin + GenJnlLine."Account No." := Currency."Unrealized Losses Acc."; + StepLedger.Get(Step."Payment Class", Step.Line, StepLedger.Sign::Debit); + GenJnlLine.Validate("Debit Amount", -Difference); + end else begin + GenJnlLine."Account No." := Currency."Unrealized Gains Acc."; + StepLedger.Get(Step."Payment Class", Step.Line, StepLedger.Sign::Credit); + GenJnlLine.Validate("Credit Amount", Difference); + end; + GenJnlLine."Posting Date" := PaymentHeader."Posting Date"; + GenJnlLine."Document No." := PaymentHeader."No."; + GenJnlLine.Description := StrSubstNo( + Text100Lbl, StrSubstNo(StepLedger.Description, PaymentHeader."Document Date", '', PaymentHeader."No.")); + GenJnlLine."Shortcut Dimension 1 Code" := PaymentHeader."Shortcut Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := PaymentHeader."Shortcut Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := PaymentHeader."Dimension Set ID"; + GenJnlLine."Source Code" := PaymentHeader."Source Code"; + GenJnlLine."Reason Code" := Step."Reason Code"; + GenJnlLine."Document Date" := PaymentHeader."Document Date"; + OnGenerEntriesOnBeforeGenJnlPostLineRunWithCheck(GenJnlLine, PaymentHeader, StepLedger); + GenJnlPostLine.RunWithCheck(GenJnlLine); + end; + end; + + InvPostingBuffer[1].DeleteAll(); + end; + + procedure CreatePaymentHeaders() + begin + Step.SetRange("Action Type", Step."Action Type"::"Create New Document"); + + if StepSelect('', -1, Step, true) then + ExecuteCreatePaymtHead(Step); + end; + + procedure ExecuteCreatePaymtHead(PaymtStep: Record "Payment Step FR"): Code[20] + var + Bor: Record "Payment Header FR"; + StatementForm: Page "Payment Slip FR"; + InserForm: Page "Payment Lines List FR"; + PayNum: Code[20]; + begin + PaymentLine.SetRange("Payment Class", PaymtStep."Payment Class"); + PaymentLine.SetRange("Status No.", PaymtStep."Previous Status"); + PaymentLine.SetRange("Copied To No.", ''); + PaymentLine.FilterGroup(2); + InserForm.SetSteps(PaymtStep.Line); + InserForm.SetTableView(PaymentLine); + InserForm.LookupMode(true); + InserForm.RunModal(); + PayNum := InserForm.GetNumBor(); + if Bor.Get(PayNum) then begin + StatementForm.SetRecord(Bor); + StatementForm.Run(); + end else + Error(Text004Lbl); + exit(PayNum); + end; + + procedure LinesInsert(HeaderNumber: Code[20]) + var + Header: Record "Payment Header FR"; + PaymentLineFR: Record "Payment Line FR"; + PaymentStepFR: Record "Payment Step FR"; + InserForm: Page "Payment Lines List FR"; + begin + Header.Get(HeaderNumber); + if StepSelect(Header."Payment Class", Header."Status No.", PaymentStepFR, false) then begin + PaymentLineFR.SetRange("Payment Class", Header."Payment Class"); + PaymentLineFR.SetRange("Copied To No.", ''); + PaymentLineFR.SetFilter("Status No.", Format(PaymentStepFR."Previous Status")); + PaymentLineFR.SetRange("Currency Code", Header."Currency Code"); + PaymentLineFR.FilterGroup(2); + InserForm.SetSteps(PaymentStepFR.Line); + InserForm.SetNumBor(Header."No."); + InserForm.SetTableView(PaymentLineFR); + InserForm.LookupMode(true); + InserForm.RunModal(); + end; + end; + + procedure StepSelect(Process: Text[30]; NextStatus: Integer; var PaymentStep: Record "Payment Step FR"; CreateDocumentFilter: Boolean) OK: Boolean + var + PaymentClassFR: Record "Payment Class FR"; + Options: Text; + Choice: Integer; + i: Integer; + begin + OK := false; + i := 0; + if Process = '' then begin + PaymentClassFR.SetRange(Enable, true); + if CreateDocumentFilter then + PaymentClassFR.SetRange("Is Create Document", true); + if PaymentClassFR.Find('-') then + repeat + i += 1; + if Options = '' then + Options := PaymentClassFR.Code + else + Options := Options + ',' + PaymentClassFR.Code; + until PaymentClassFR.Next() = 0; + if i > 0 then + Choice := StrMenu(Options, 1); + i := 1; + if Choice > 0 then begin + PaymentClassFR.Find('-'); + while Choice > i do begin + i += 1; + PaymentClassFR.Next(); + end; + end; + end else begin + PaymentClassFR.Get(Process); + Choice := 1; + end; + if Choice > 0 then begin + Options := ''; + PaymentStep.SetRange("Payment Class", PaymentClassFR.Code); + PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::"Create New Document"); + if NextStatus > -1 then + PaymentStep.SetRange("Next Status", NextStatus); + i := 0; + if PaymentStep.Find('-') then begin + i += 1; + repeat + if Options = '' then + Options := PaymentStep.Name + else + Options := Options + ',' + PaymentStep.Name; + until PaymentStep.Next() = 0; + if i > 0 then begin + Choice := StrMenu(Options, 1); + i := 1; + if Choice > 0 then begin + PaymentStep.Find('-'); + while Choice > i do begin + i += 1; + PaymentStep.Next(); + end; + OK := true; + end; + end; + end; + end; + end; + + local procedure CheckDimCombAndValue(PaymentLine2: Record "Payment Line FR") + var + TableID: array[10] of Integer; + No: array[10] of Code[20]; + begin + if PaymentLine."Line No." = 0 then begin + if not DimMgt.CheckDimIDComb(PaymentHeader."Dimension Set ID") then + Error( + Text009Lbl, + PaymentHeader."No.", DimMgt.GetDimCombErr()); + TableID[1] := DATABASE::"Payment Header FR"; + No[1] := PaymentHeader."No."; + if not DimMgt.CheckDimValuePosting(TableID, No, PaymentHeader."Dimension Set ID") then + ThrowPmtPostError(PaymentLine2, CheckDimVauePostingHeaderErr, DimMgt.GetDimValuePostingErr()); + end; + + if PaymentLine."Line No." <> 0 then begin + if not DimMgt.CheckDimIDComb(PaymentLine2."Dimension Set ID") then + Error( + Text010Lbl, + PaymentHeader."No.", PaymentLine2."Line No.", DimMgt.GetDimCombErr()); + TableID[1] := TypeToTableID(PaymentLine2."Account Type".AsInteger()); + No[1] := PaymentLine2."Account No."; + if not DimMgt.CheckDimValuePosting(TableID, No, PaymentLine2."Dimension Set ID") then + ThrowPmtPostError(PaymentLine2, CheckDimVauePostingLineErr, DimMgt.GetDimValuePostingErr()); + end; + end; + + local procedure CheckDim() + begin + PaymentLine."Line No." := 0; + CheckDimCombAndValue(PaymentLine); + + PaymentLine.SetRange("No.", PaymentHeader."No."); + if PaymentLine.FindSet() then + repeat + CheckDimCombAndValue(PaymentLine); + until PaymentLine.Next() = 0; + end; + + local procedure TypeToTableID(Type: Option "G/L Account",Customer,Vendor,"Bank Account","Fixed Asset"): Integer + begin + case Type of + Type::"G/L Account": + exit(DATABASE::"G/L Account"); + Type::Customer: + exit(DATABASE::Customer); + Type::Vendor: + exit(DATABASE::Vendor); + Type::"Bank Account": + exit(DATABASE::"Bank Account"); + Type::"Fixed Asset": + exit(DATABASE::"Fixed Asset"); + end; + end; + + local procedure ThrowPmtPostError(ReceivedPaymentLine: Record "Payment Line FR"; ErrorTemplate: Text; ErrorText: Text) + begin + if ReceivedPaymentLine."Line No." <> 0 then + Error( + ErrorTemplate, PaymentHeader."No.", ReceivedPaymentLine.TableCaption(), ReceivedPaymentLine."Line No.", ErrorText); + Error(ErrorTemplate, PaymentHeader."No.", ErrorText); + end; + + procedure TestSourceCode("Code": Code[10]) + var + SourceCode: Record "Source Code"; + begin + if not SourceCode.Get(Code) then + Error(Text017Lbl, Code); + end; + + procedure PaymentAddr(var AddrArray: array[8] of Text[100]; PaymentAddress: Record "Payment Address FR") + var + FormatAddress: Codeunit "Format Address"; + begin + FormatAddress.FormatAddr( + AddrArray, PaymentAddress.Name, PaymentAddress."Name 2", PaymentAddress.Contact, PaymentAddress.Address, PaymentAddress."Address 2", + PaymentAddress.City, PaymentAddress."Post Code", PaymentAddress.County, PaymentAddress."Country/Region Code"); + end; + + procedure PaymentBankAcc(var AddrArray: array[8] of Text[100]; BankAcc: Record "Payment Header FR") + var + FormatAddress: Codeunit "Format Address"; + begin + FormatAddress.FormatAddr( + AddrArray, BankAcc."Bank Name", BankAcc."Bank Name 2", BankAcc."Bank Contact", BankAcc."Bank Address", BankAcc."Bank Address 2", + BankAcc."Bank City", BankAcc."Bank Post Code", BankAcc."Bank County", BankAcc."Bank Country/Region Code"); + end; + + procedure ArchiveDocument(Document: Record "Payment Header FR") + var + ArchiveHeader: Record "Payment Header Archive FR"; + ArchiveLine: Record "Payment Line Archive FR"; + PaymentLineFR: Record "Payment Line FR"; + begin + Document.CalcFields("Archiving Authorized"); + if not Document."Archiving Authorized" then + Error(Text022Lbl, Document."No."); + ArchiveHeader.TransferFields(Document); + ArchiveHeader.Insert(); + Document.Delete(); + PaymentLineFR.SetRange("No.", Document."No."); + if PaymentLineFR.Find('-') then + repeat + ArchiveLine.TransferFields(PaymentLineFR); + ArchiveLine.Insert(); + PaymentLineFR.Delete(); + until PaymentLineFR.Next() = 0; + end; + + procedure PickPaymentStep(PaymentHeaderFR: Record "Payment Header FR"; var PaymentStep: Record "Payment Step FR"): Boolean + var + PaymentSteps: Page "Payment Steps FR"; + begin + PaymentStep.FilterGroup(2); + // Filter on "Action Type" is passed with PaymentStep + PaymentStep.SetRange("Payment Class", PaymentHeaderFR."Payment Class"); + PaymentStep.SetRange("Previous Status", PaymentHeaderFR."Status No."); + PaymentStep.FilterGroup(0); + if PaymentStep.IsEmpty() then + exit(false); + + if PaymentStep.Count = 1 then begin + PaymentStep.FindFirst(); + exit(Confirm(PaymentStep.Name, true)); + end; + + PaymentStep.FindSet(); + PaymentSteps.LookupMode(true); + PaymentSteps.SetTableView(PaymentStep); + PaymentSteps.SetRecord(PaymentStep); + PaymentSteps.Editable(false); + if PaymentSteps.RunModal() = ACTION::LookupOK then begin + PaymentSteps.GetRecord(PaymentStep); + exit(true); + end; + exit(false); + end; + + procedure ProcessPaymentSteps(PaymentHeaderFR: Record "Payment Header FR"; var PaymentStep: Record "Payment Step FR") + begin + PaymentHeaderFR.TestNbOfLines(); + if PickPaymentStep(PaymentHeaderFR, PaymentStep) then + ProcessPaymentStep(PaymentHeaderFR."No.", PaymentStep); + end; + + local procedure RunXmlPortExport(XMLPortID: Integer; var PaymentHeaderFR: Record "Payment Header FR") + begin + PaymentClass.Get(PaymentHeaderFR."Payment Class"); + case PaymentClass."SEPA Transfer Type" of + PaymentClass."SEPA Transfer Type"::"Credit Transfer": + ExportSEPACreditTransfer(XMLPortID, PaymentHeaderFR); + PaymentClass."SEPA Transfer Type"::"Direct Debit": + ExportSEPADirectDebit(PaymentHeaderFR); + else + XMLPORT.Run(XMLPortID, false, false, PaymentHeaderFR); + end; + end; + + local procedure ExportSEPACreditTransfer(XMLPortId: Integer; var PaymentHeaderFR: Record "Payment Header FR") + var + GenJournalLine: Record "Gen. Journal Line"; + SEPACTExportFile: Codeunit "SEPA CT-Export File"; + begin + GenJournalLine.SetRange("Journal Template Name", ''); + GenJournalLine.SetRange("Journal Batch Name", ''); + GenJournalLine.SetRange("Document No.", PaymentHeaderFR."No."); + OnExportSEPACreditTransferOnAfterGenJnlLineSetFilters(GenJournalLine, XMLPortId, PaymentHeaderFR); + if SEPACTExportFile.Export(GenJournalLine, XMLPortId) then begin + PaymentHeaderFR."File Export Completed" := true; + PaymentHeaderFR.Modify(); + end; + end; + + local procedure ExportSEPADirectDebit(var PaymentHeaderFR: Record "Payment Header FR") + var + DirectDebitCollection: Record "Direct Debit Collection"; + DirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; + LastError: Text; + begin + PaymentHeaderFR.TestField("Account Type", PaymentHeaderFR."Account Type"::"Bank Account"); + DirectDebitCollection.CreateRecord(PaymentHeaderFR."No.", PaymentHeaderFR."Account No.", PaymentHeaderFR."Partner Type"); + DirectDebitCollection."Source Table ID" := DATABASE::"Payment Header FR"; + DirectDebitCollection.Modify(); + DirectDebitCollectionEntry.SetRange("Direct Debit Collection No.", DirectDebitCollection."No."); + Commit(); + ClearLastError(); + if CODEUNIT.Run(CODEUNIT::"SEPA DD-Export File", DirectDebitCollectionEntry) then begin + DeleteDirectDebitCollection(DirectDebitCollection."No."); + PaymentHeaderFR."File Export Completed" := true; + PaymentHeaderFR.Modify(); + exit; + end; + + LastError := GetLastErrorText; + DeleteDirectDebitCollection(DirectDebitCollection."No."); + Commit(); + Error(LastError); + end; + + local procedure DeleteDirectDebitCollection(DirectDebitCollectionNo: Integer) + var + DirectDebitCollection: Record "Direct Debit Collection"; + begin + if DirectDebitCollection.Get(DirectDebitCollectionNo) then + DirectDebitCollection.Delete(true); + end; + + local procedure PostInvPostingBuffer(): Integer + var + GLEntry: Record "G/L Entry"; + begin + GenJnlLine.Init(); + GenJnlLine."Posting Date" := PaymentHeader."Posting Date"; + GenJnlLine."Document Date" := PaymentHeader."Document Date"; + GenJnlLine.Description := InvPostingBuffer[1].Description; + GenJnlLine."Reason Code" := Step."Reason Code"; + PaymentClass.Get(PaymentHeader."Payment Class"); + GenJnlLine."Delayed Unrealized VAT" := + (PaymentClass."Unrealized VAT Reversal" = PaymentClass."Unrealized VAT Reversal"::Delayed); + GenJnlLine."Realize VAT" := Step."Realize VAT"; + GenJnlLine."Created from No." := InvPostingBuffer[1]."Created from No."; + GenJnlLine."Document Type" := InvPostingBuffer[1]."Document Type"; + GenJnlLine."Document No." := InvPostingBuffer[1]."Document No."; + GenJnlLine."Account Type" := InvPostingBuffer[1]."Account Type"; + GenJnlLine."Account No." := InvPostingBuffer[1]."Account No."; + GenJnlLine."System-Created Entry" := InvPostingBuffer[1]."System-Created Entry"; + GenJnlLine."Currency Code" := InvPostingBuffer[1]."Currency Code"; + GenJnlLine."Currency Factor" := InvPostingBuffer[1]."Currency Factor"; + GenJnlLine.Validate(Amount, InvPostingBuffer[1].Amount); + GenJnlLine.Correction := InvPostingBuffer[1].Correction; + if PaymentHeader."Source Code" <> '' then begin + TestSourceCode(PaymentHeader."Source Code"); + GenJnlLine."Source Code" := PaymentHeader."Source Code"; + end else begin + Step.TestField("Source Code"); + TestSourceCode(Step."Source Code"); + GenJnlLine."Source Code" := Step."Source Code"; + end; + GenJnlLine."Applies-to ID" := InvPostingBuffer[1]."Applies-to ID"; + if GenJnlLine."Applies-to ID" = '' then begin + GenJnlLine."Applies-to Doc. Type" := InvPostingBuffer[1]."Applies-to Doc. Type"; + GenJnlLine."Applies-to Doc. No." := InvPostingBuffer[1]."Applies-to Doc. No."; + end; + GenJnlLine."Posting Group" := InvPostingBuffer[1]."Posting Group"; + GenJnlLine."Source Type" := InvPostingBuffer[1]."Source Type"; + GenJnlLine."Source No." := InvPostingBuffer[1]."Source No."; + GenJnlLine."External Document No." := InvPostingBuffer[1]."External Document No."; + GenJnlLine."Due Date" := InvPostingBuffer[1]."Due Date"; + GenJnlLine."Shortcut Dimension 1 Code" := InvPostingBuffer[1]."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := InvPostingBuffer[1]."Global Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := InvPostingBuffer[1]."Dimension Set ID"; + + OnPostInvPostingBufferOnBeforeGenJnlPostLineRunWithCheck(GenJnlLine, PaymentHeader, PaymentClass, PaymentLine); + GenJnlPostLine.RunWithCheck(GenJnlLine); + GLEntry.SetRange("Document Type", GenJnlLine."Document Type"); + GLEntry.SetRange("Document No.", GenJnlLine."Document No."); + if GLEntry.FindLast() then + exit(GLEntry."Entry No."); + exit(0); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterApplication(StepLedger: Record "Payment Step Ledger FR"; var InvPostingBuffer: array[2] of Record "Payment Post. Buffer FR" temporary; PaymentHeader: Record "Payment Header FR"; PaymentLine: Record "Payment Line FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterGetDescriptionForInvPostingBuffer(var StepLedger: Record "Payment Step Ledger FR"; var PaymentLine: Record "Payment Line FR"; var Description: Text[98]) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeProcessPaymentStep(PaymentHeaderNo: Code[20]; PaymentStep: Record "Payment Step FR"; PaymentLine: Record "Payment Line FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeProcessPaymentStepByActionType(var PaymentLine: Record "Payment Line FR"; PaymentStep: Record "Payment Step FR"; var ActionValidated: Boolean; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnCopyLigBorOnBeforeInitHeader(var ToBord: Record "Payment Header FR"; var Process: Record "Payment Class FR"; var i: Integer) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnCopyLigBorOnBeforeToPaymentLineInsert(var ToPaymentLine: Record "Payment Line FR"; var Process: Record "Payment Class FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPaymentStep(PaymentHeaderNo: Code[20]; PaymentStep: Record "Payment Step FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnGenerEntriesOnBeforeGenJnlPostLineRunWithCheck(var GenJnlLine: Record "Gen. Journal Line"; PaymentHeader: Record "Payment Header FR"; StepLedger: Record "Payment Step Ledger FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnExportSEPACreditTransferOnAfterGenJnlLineSetFilters(var GenJnlLine: Record "Gen. Journal Line"; var XMLPortId: Integer; var PaymentHeader: Record "Payment Header FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnGenerInvPostingBufferOnBeforeUpdtBuffer(var InvPostingBuffer: array[2] of Record "Payment Post. Buffer FR" temporary; PaymentLine: Record "Payment Line FR"; StepLedger: Record "Payment Step Ledger FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnGenerInvPostingBufferOnAfterGetDescriptionForInvPostingBuffer(var StepLedger: record "Payment Step Ledger FR"; var PaymentHeader: record "Payment Header FR"; var PaymentLine: Record "Payment Line FR"; var Description: Text[98]) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnPostInvPostingBufferOnBeforeGenJnlPostLineRunWithCheck(var GenJnlLine: Record "Gen. Journal Line"; var PaymentHeader: Record "Payment Header FR"; var PaymentClass: Record "Payment Class FR"; PaymentLine: Record "Payment Line FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnProcessPaymentStepOnCaseElse(var Step: Record "Payment Step FR"; var PaymentLine: Record "Payment Line FR"; var ActionValidated: Boolean; var PaymentHeader: Record "Payment Header FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnProcessPaymentStepOnAfterCheckPaymentStep(var PaymentStep: Record "Payment Step FR"; var PaymentHeader: Record "Payment Header FR"; var PaymentLine: Record "Payment Line FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSetPostingGroupOnBeforeCheckPostingGroup(var PaymentLine: Record "Payment Line FR"; var StepLedger: record "Payment Step Ledger FR"; var PostingGroup: Code[20]) + begin + end; +} diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFeatureFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFeatureFR.Codeunit.al new file mode 100644 index 0000000000..2a610dc62e --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFeatureFR.Codeunit.al @@ -0,0 +1,37 @@ +#if not CLEAN28 +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using System.Environment.Configuration; + +codeunit 10835 "Payment Management Feature FR" +{ + Access = Internal; + InherentEntitlements = X; + InherentPermissions = X; + + var + FeatureKeyIdTok: Label 'PaymentManagementFR', Locked = true; + + procedure IsEnabled() Enabled: Boolean + var + FeatureManagementFacade: Codeunit "Feature Management Facade"; + begin + Enabled := FeatureManagementFacade.IsEnabled(FeatureKeyIdTok); + OnAfterCheckFeatureEnabled(Enabled); + end; + + procedure GetFeatureKeyId(): Text + begin + exit(FeatureKeyIdTok); + end; + + [IntegrationEvent(true, false)] + local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean) + begin + end; +} +#endif \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentMgtSubscribersFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentMgtSubscribersFR.Codeunit.al new file mode 100644 index 0000000000..86e2eff2f0 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentMgtSubscribersFR.Codeunit.al @@ -0,0 +1,531 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; +#pragma warning disable AA0228 + +using Microsoft.Bank.BankAccount; +using Microsoft.Bank.DirectDebit; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Finance.VAT.Ledger; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.Receivables; + +codeunit 10838 "PaymentMgt Subscribers FR" +{ + InherentEntitlements = X; + InherentPermissions = X; + Access = Internal; + + var + UnrealCVLedgEntryBuffer: Record "Unreal. CV Ledg. Entry Buffer"; + PaymentToleranceMgt: Codeunit "Payment Tolerance Management"; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"SEPA CT-Prepare Source", 'OnBeforeCreateTempJnlLines', '', false, false)] + local procedure OnBeforeCreateTempJnlLines(var FromGenJnlLine: Record "Gen. Journal Line"; var TempGenJnlLine: Record "Gen. Journal Line" temporary; var IsHandled: Boolean) + var + PaymentHeader: Record "Payment Header FR"; + PaymentLine: Record "Payment Line FR"; +#if not CLEAN28 + Payment: Codeunit "Payment Management Feature FR"; +#endif + PaymentDocNo: Code[20]; + AppliedDocNoList: Text; + DescriptionLen: Integer; + begin +#if not CLEAN28 + if not Payment.IsEnabled() then + exit; +#endif + IsHandled := true; + + PaymentDocNo := CopyStr(FromGenJnlLine.GetFilter("Document No."), 1, MaxStrLen(PaymentDocNo)); + PaymentHeader.Get(PaymentDocNo); + PaymentLine.Reset(); + PaymentLine.SetRange("No.", PaymentHeader."No."); + if PaymentLine.FindSet() then + repeat + TempGenJnlLine.Init(); + TempGenJnlLine."Journal Template Name" := ''; + TempGenJnlLine."Journal Batch Name" := Format(DATABASE::"Payment Header FR"); + TempGenJnlLine."Document No." := PaymentHeader."No."; + TempGenJnlLine."Line No." := PaymentLine."Line No."; + TempGenJnlLine."Account No." := PaymentLine."Account No."; + TempGenJnlLine."Account Type" := PaymentLine."Account Type"; + case PaymentLine."Account Type" of + PaymentLine."Account Type"::Vendor: + TempGenJnlLine."Document Type" := TempGenJnlLine."Document Type"::Payment; + PaymentLine."Account Type"::Customer: + TempGenJnlLine."Document Type" := TempGenJnlLine."Document Type"::Refund; + end; + TempGenJnlLine.Amount := PaymentLine.Amount; + TempGenJnlLine."Applies-to Doc. Type" := PaymentLine."Applies-to Doc. Type"; + TempGenJnlLine."Applies-to Doc. No." := PaymentLine."Applies-to Doc. No."; + TempGenJnlLine."Applies-to ID" := PaymentLine."Applies-to ID"; + TempGenJnlLine."Bal. Account Type" := PaymentHeader."Account Type"; + TempGenJnlLine."Bal. Account No." := PaymentHeader."Account No."; + TempGenJnlLine."Currency Code" := PaymentLine."Currency Code"; + TempGenJnlLine."Posting Date" := PaymentLine."Posting Date"; + TempGenJnlLine."Recipient Bank Account" := PaymentLine."Bank Account Code"; + + DescriptionLen := MaxStrLen(TempGenJnlLine.Description); + AppliedDocNoList := PaymentLine.GetAppliedDocNoList(DescriptionLen); + TempGenJnlLine.Description := CopyStr(AppliedDocNoList, 1, MaxStrLen(TempGenJnlLine.Description)); + if StrLen(AppliedDocNoList) > DescriptionLen then + TempGenJnlLine."Message to Recipient" := + CopyStr(AppliedDocNoList, DescriptionLen + 1, MaxStrLen(TempGenJnlLine."Message to Recipient")); + OnCreateTempJnlLinesOnBeforeInsertTempGenJnlLine(TempGenJnlLine, PaymentLine); + TempGenJnlLine.Insert(); + until PaymentLine.Next() = 0; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"SEPA DD-Prepare Source", 'OnBeforeCreateTempCollectionEntries', '', false, false)] + local procedure OnBeforeCreateTempCollectionEntries(var FromDirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; var ToDirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; var isHandled: Boolean) + var + DirectDebitCollection: Record "Direct Debit Collection"; + PaymentHeader: Record "Payment Header FR"; + PaymentLine: Record "Payment Line FR"; +#if not CLEAN28 + Payment: Codeunit "Payment Management Feature FR"; +#endif + SEPADDCheckLine: Codeunit "SEPA DD-Check Line"; + AppliesToEntryNo: Integer; + HasErrorsErr: Label 'The file export has one or more errors. For each of the lines to be exported, resolve any errors that are displayed in the File Export Errors FactBox.'; + begin +#if not CLEAN28 + if not Payment.IsEnabled() then + exit; +#endif + IsHandled := true; + + ToDirectDebitCollectionEntry.Reset(); + DirectDebitCollection.Get(FromDirectDebitCollectionEntry.GetRangeMin("Direct Debit Collection No.")); + PaymentHeader.Get(DirectDebitCollection.Identifier); + PaymentLine.SetRange("No.", PaymentHeader."No."); + if PaymentLine.FindSet() then + repeat + ToDirectDebitCollectionEntry.Init(); + ToDirectDebitCollectionEntry."Entry No." := PaymentLine."Line No."; + ToDirectDebitCollectionEntry."Direct Debit Collection No." := DirectDebitCollection."No."; + ToDirectDebitCollectionEntry.DeletePaymentFileErrors(); + if CheckPaymentLine(ToDirectDebitCollectionEntry, PaymentLine, AppliesToEntryNo) then begin + ToDirectDebitCollectionEntry.Validate("Customer No.", PaymentLine."Account No."); + ToDirectDebitCollectionEntry.Validate("Applies-to Entry No.", AppliesToEntryNo); + ToDirectDebitCollectionEntry."Transfer Date" := PaymentHeader."Posting Date"; + ToDirectDebitCollectionEntry."Currency Code" := PaymentLine."Currency Code"; + ToDirectDebitCollectionEntry.Validate("Transfer Amount", PaymentLine."Credit Amount"); + ToDirectDebitCollectionEntry.Validate("Mandate ID", PaymentLine."Direct Debit Mandate ID"); + OnCreateTempCollectionEntriesOnBeforeInsert(ToDirectDebitCollectionEntry, PaymentHeader, PaymentLine); + ToDirectDebitCollectionEntry.Insert(); + SEPADDCheckLine.CheckCollectionEntry(ToDirectDebitCollectionEntry); + end; + until PaymentLine.Next() = 0; + + if DirectDebitCollection.HasPaymentFileErrors() then begin + Commit(); + Error(HasErrorsErr); + end; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnBeforeInitGLEntryForGLAcc', '', false, false)] + local procedure OnPostGLAccOnBeforeInitGLEntry(GenJnlLine: Record "Gen. Journal Line"; var GLEntry: Record "G/L Entry"; var TaxAmount: Decimal; var TaxAmountLCY: Decimal; var IsHandled: Boolean) + var +#if not CLEAN28 + Payment: Codeunit "Payment Management Feature FR"; +#endif + begin +#if not CLEAN28 + if not Payment.IsEnabled() then + exit; +#endif + + RealizeDelayedUnrealizedVAT(GenJnlLine); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnPostBankAccOnBeforeCheckCurrencyCode', '', false, false)] + local procedure OnPostBankAccOnBeforeCheckCurrencyCode(var GenJournalLine: Record "Gen. Journal Line"; BankAccount: Record "Bank Account"; var IsHandled: Boolean) +#if not CLEAN28 + var + Payment: Codeunit "Payment Management Feature FR"; +#endif + begin +#if not CLEAN28 + if not Payment.IsEnabled() then + exit; +#endif + RealizeDelayedUnrealizedVAT(GenJournalLine); + end; + + local procedure SetTransactionNo(GenJnlLine: Record "Gen. Journal Line") + var + AppliedCustLedgEntry: Record "Cust. Ledger Entry"; + AppliedVendLedgEntry: Record "Vendor Ledger Entry"; + begin + case GenJnlLine."Source Type" of + GenJnlLine."Source Type"::Customer: + begin + AppliedCustLedgEntry.Reset(); + AppliedCustLedgEntry.SetCurrentKey("Document No."); + if CheckHeaderNo(GenJnlLine."Document No.") then + AppliedCustLedgEntry.SetRange("Document No.", GenJnlLine."Created from No.") + else + AppliedCustLedgEntry.SetRange("Document No.", GenJnlLine."Document No."); + AppliedCustLedgEntry.SetRange("Document Type", AppliedCustLedgEntry."Document Type"::" "); + AppliedCustLedgEntry.SetRange("Customer No.", GenJnlLine."Source No."); + end; + GenJnlLine."Source Type"::Vendor: + begin + AppliedVendLedgEntry.Reset(); + AppliedVendLedgEntry.SetCurrentKey("Document No."); + if CheckHeaderNo(GenJnlLine."Document No.") then + AppliedVendLedgEntry.SetRange("Document No.", GenJnlLine."Created from No.") + else + AppliedVendLedgEntry.SetRange("Document No.", GenJnlLine."Document No."); + AppliedVendLedgEntry.SetRange("Document Type", AppliedVendLedgEntry."Document Type"::" "); + AppliedVendLedgEntry.SetRange("Vendor No.", GenJnlLine."Source No."); + end; + end; + end; + + local procedure CheckHeaderNo(DocNo: Code[20]): Boolean + var + PaymentLine: Record "Payment Line FR"; + begin + PaymentLine.SetRange("No.", DocNo); + exit(not PaymentLine.IsEmpty()); + end; + + procedure PmtTolPaymentLine(var NewPaymentLine: Record "Payment Line FR"): Boolean + var + GLSetup: Record "General Ledger Setup"; + TempPaymentLine: Record "Payment Line FR" temporary; + NewCustLedgEntry: Record "Cust. Ledger Entry"; + NewVendLedgEntry: Record "Vendor Ledger Entry"; + AppliedAmount: Decimal; + ApplyingAmount: Decimal; + AmounttoApply: Decimal; + PmtDiscAmount: Decimal; + MaxPmtTolAmount: Decimal; + GenJnlLineApplID: Code[50]; + ApplnRoundingPrecision: Decimal; + begin + MaxPmtTolAmount := 0; + PmtDiscAmount := 0; + AppliedAmount := 0; + ApplyingAmount := 0; + AmounttoApply := 0; + TempPaymentLine := NewPaymentLine; + + GLSetup.Get(); + if TempPaymentLine."Applies-to Doc. No." = '' then + if TempPaymentLine."Applies-to ID" <> '' then + GenJnlLineApplID := TempPaymentLine."Applies-to ID"; + + if (TempPaymentLine."Account Type" = TempPaymentLine."Account Type"::Customer) then begin + NewCustLedgEntry."Posting Date" := TempPaymentLine."Posting Date"; + NewCustLedgEntry."Document No." := TempPaymentLine."Document No."; + NewCustLedgEntry."Customer No." := TempPaymentLine."Account No."; + NewCustLedgEntry."Currency Code" := TempPaymentLine."Currency Code"; + if TempPaymentLine."Applies-to Doc. No." <> '' then + NewCustLedgEntry."Applies-to Doc. No." := TempPaymentLine."Applies-to Doc. No."; + PaymentToleranceMgt.DelCustPmtTolAcc(NewCustLedgEntry, GenJnlLineApplID); + NewCustLedgEntry.Amount := TempPaymentLine.Amount; + NewCustLedgEntry."Remaining Amount" := TempPaymentLine.Amount; + NewCustLedgEntry."Document Type" := TempPaymentLine."Applies-to Doc. Type"::Payment; + PaymentToleranceMgt.CalcCustApplnAmount( + NewCustLedgEntry, GLSetup, AppliedAmount, ApplyingAmount, AmounttoApply, PmtDiscAmount, + MaxPmtTolAmount, GenJnlLineApplID, ApplnRoundingPrecision); + end else begin + NewVendLedgEntry."Posting Date" := TempPaymentLine."Posting Date"; + NewVendLedgEntry."Document No." := TempPaymentLine."Document No."; + NewVendLedgEntry."Vendor No." := TempPaymentLine."Account No."; + NewVendLedgEntry."Currency Code" := TempPaymentLine."Currency Code"; + if TempPaymentLine."Applies-to Doc. No." <> '' then + NewVendLedgEntry."Applies-to Doc. No." := TempPaymentLine."Applies-to Doc. No."; + PaymentToleranceMgt.DelVendPmtTolAcc(NewVendLedgEntry, GenJnlLineApplID); + NewVendLedgEntry.Amount := TempPaymentLine.Amount; + NewVendLedgEntry."Remaining Amount" := TempPaymentLine.Amount; + NewVendLedgEntry."Document Type" := TempPaymentLine."Applies-to Doc. Type"::Payment; + PaymentToleranceMgt.CalcVendApplnAmount( + NewVendLedgEntry, GLSetup, AppliedAmount, ApplyingAmount, AmounttoApply, PmtDiscAmount, + MaxPmtTolAmount, GenJnlLineApplID, + ApplnRoundingPrecision); + end; + + if GLSetup."Pmt. Disc. Tolerance Warning" then + case TempPaymentLine."Account Type" of + TempPaymentLine."Account Type"::Customer: + if not PaymentToleranceMgt.ManagePaymentDiscToleranceWarningCustomer( + NewCustLedgEntry, GenJnlLineApplID, AppliedAmount, AmounttoApply, TempPaymentLine."Applies-to Doc. No.") + then + exit(false); + TempPaymentLine."Account Type"::Vendor: + if not PaymentToleranceMgt.ManagePaymentDiscToleranceWarningVendor( + NewVendLedgEntry, GenJnlLineApplID, AppliedAmount, AmounttoApply, TempPaymentLine."Applies-to Doc. No.") + then + exit(false); + end; + + if Abs(AmounttoApply) >= Abs(AppliedAmount - PmtDiscAmount - MaxPmtTolAmount) then begin + AppliedAmount := AppliedAmount - PmtDiscAmount; + if Abs(AppliedAmount) > Abs(AmounttoApply) then + AppliedAmount := AmounttoApply; + + if ((Abs(AppliedAmount + ApplyingAmount) - ApplnRoundingPrecision) <= Abs(MaxPmtTolAmount)) and + (MaxPmtTolAmount <> 0) and ((Abs(AppliedAmount + ApplyingAmount) - ApplnRoundingPrecision) <> 0) and + ((Abs(AppliedAmount + ApplyingAmount) > ApplnRoundingPrecision)) + then + if TempPaymentLine."Account Type" = TempPaymentLine."Account Type"::Customer then begin + if GLSetup."Payment Tolerance Warning" then begin + if PaymentToleranceMgt.CallPmtTolWarning( + TempPaymentLine."Posting Date", TempPaymentLine."Account No.", TempPaymentLine."Document No.", + TempPaymentLine."Currency Code", ApplyingAmount, AppliedAmount, "Payment Tolerance Account Type"::Customer) + then begin + if (AppliedAmount <> 0) and (ApplyingAmount <> 0) then + PaymentToleranceMgt.PutCustPmtTolAmount(NewCustLedgEntry, ApplyingAmount, AppliedAmount, GenJnlLineApplID) + else + PaymentToleranceMgt.DelCustPmtTolAcc(NewCustLedgEntry, GenJnlLineApplID); + end else + exit(false); + end else + PaymentToleranceMgt.PutCustPmtTolAmount(NewCustLedgEntry, ApplyingAmount, AppliedAmount, GenJnlLineApplID); + end else + if GLSetup."Payment Tolerance Warning" then begin + if PaymentToleranceMgt.CallPmtTolWarning( + TempPaymentLine."Posting Date", TempPaymentLine."Account No.", TempPaymentLine."Document No.", + TempPaymentLine."Currency Code", ApplyingAmount, AppliedAmount, "Payment Tolerance Account Type"::Vendor) + then begin + if (AppliedAmount <> 0) and (ApplyingAmount <> 0) then + PaymentToleranceMgt.PutVendPmtTolAmount(NewVendLedgEntry, ApplyingAmount, AppliedAmount, GenJnlLineApplID) + else + PaymentToleranceMgt.DelVendPmtTolAcc(NewVendLedgEntry, GenJnlLineApplID); + end else begin + PaymentToleranceMgt.DelVendPmtTolAcc(NewVendLedgEntry, GenJnlLineApplID); + exit(false); + end; + end else + PaymentToleranceMgt.PutVendPmtTolAmount(NewVendLedgEntry, ApplyingAmount, AppliedAmount, GenJnlLineApplID); + + end; + exit(true); + end; + + local procedure CheckPaymentLine(DirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; PaymentLine: Record "Payment Line FR"; var AppliesToEntryNo: Integer) Result: Boolean + var + SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate"; + CustLedgerEntry: Record "Cust. Ledger Entry"; + SummarizeNotAllowedErr: Label 'You cannot export a SEPA customer payment that is applied to multiple documents. Make sure that the Summarize per field in the Suggest Customer Payments window is blank.'; + UnappliedLinesNotAllowedErr: Label 'Payment slip line %1 must be applied to a customer invoice.', Comment = '%1 = No.'; + AccTypeErr: Label 'Only customer transactions are allowed.'; + BankAccErr: Label 'You must use customer bank account, %1, which you specified in the selected direct debit mandate.', Comment = '%1 = code'; + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforeCheckPaymentLine(DirectDebitCollectionEntry, PaymentLine, Result, IsHandled); + if IsHandled then + exit(Result); + + if PaymentLine."Account Type" <> PaymentLine."Account Type"::Customer then + DirectDebitCollectionEntry.InsertPaymentFileError(AccTypeErr); + + if SEPADirectDebitMandate.Get(PaymentLine."Direct Debit Mandate ID") then + if SEPADirectDebitMandate."Customer Bank Account Code" <> PaymentLine."Bank Account Code" then + DirectDebitCollectionEntry.InsertPaymentFileError(StrSubstNo(BankAccErr, SEPADirectDebitMandate."Customer Bank Account Code")); + + if (PaymentLine."Applies-to Doc. No." = '') and (PaymentLine."Applies-to ID" = '') then + DirectDebitCollectionEntry.InsertPaymentFileError(StrSubstNo(UnappliedLinesNotAllowedErr, PaymentLine."Line No.")) + else begin + PaymentLine.GetAppliesToDocCustLedgEntry(CustLedgerEntry); + if CustLedgerEntry.Count > 1 then + DirectDebitCollectionEntry.InsertPaymentFileError(SummarizeNotAllowedErr); + CustLedgerEntry.FindFirst(); + if CustLedgerEntry."Document Type" <> CustLedgerEntry."Document Type"::Invoice then + DirectDebitCollectionEntry.InsertPaymentFileError(StrSubstNo(UnappliedLinesNotAllowedErr, PaymentLine."Line No.")); + AppliesToEntryNo := CustLedgerEntry."Entry No."; + end; + + exit(not DirectDebitCollectionEntry.HasPaymentFileErrors()); + end; + + local procedure PostDelayedUnrealizedVAT(GenJnlLine: Record "Gen. Journal Line") + var + OldCustLedgEntry: Record "Cust. Ledger Entry"; + OldVendLedgEntry: Record "Vendor Ledger Entry"; + begin + case GenJnlLine."Source Type" of + GenJnlLine."Source Type"::Customer: + if GenJnlLine."Applies-to Doc. No." <> '' then begin + // Find original entry based on Applies-to Doc. No. + OldCustLedgEntry.Reset(); + OldCustLedgEntry.SetCurrentKey("Document No."); + OldCustLedgEntry.SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + OldCustLedgEntry.SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + OldCustLedgEntry.SetRange("Customer No.", GenJnlLine."Source No."); + OldCustLedgEntry.FindFirst(); + OldCustLedgEntry.CalcFields( + Amount, "Amount (LCY)", "Remaining Amount", "Remaining Amt. (LCY)", + "Original Amount", "Original Amt. (LCY)"); + SetTransactionNo(GenJnlLine); + UnrealCVLedgEntryBuffer.Reset(); + UnrealCVLedgEntryBuffer.SetRange("Account Type", UnrealCVLedgEntryBuffer."Account Type"::Customer); + UnrealCVLedgEntryBuffer.SetRange("Account No.", GenJnlLine."Source No."); + if CheckHeaderNo(GenJnlLine."Document No.") then + UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Created from No.") + else + UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Document No."); + UnrealCVLedgEntryBuffer.FindFirst(); + GenJnlPostLine.CustUnrealizedVAT(GenJnlLine, OldCustLedgEntry, GenJnlLine.Amount); + UnrealCVLedgEntryBuffer.Realized := true; + UnrealCVLedgEntryBuffer.Modify(); + UpdateUnrealCVLedgEntryBuffer(GenJnlLine, OldCustLedgEntry."Transaction No."); + end else begin + // Find original entry from buffer table + UnrealCVLedgEntryBuffer.Reset(); + UnrealCVLedgEntryBuffer.SetRange("Account Type", UnrealCVLedgEntryBuffer."Account Type"::Customer); + UnrealCVLedgEntryBuffer.SetRange("Account No.", GenJnlLine."Source No."); + if CheckHeaderNo(GenJnlLine."Document No.") then + UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Created from No.") + else + UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Document No."); + UnrealCVLedgEntryBuffer.SetRange("Applies-to ID", GenJnlLine."Applies-to ID"); +#pragma warning disable AL0667 + if UnrealCVLedgEntryBuffer.FindSet(true, false) then +#pragma warning restore AL0667 + repeat + OldCustLedgEntry.Get(UnrealCVLedgEntryBuffer."Entry No."); + OldCustLedgEntry.CalcFields( + Amount, "Amount (LCY)", "Remaining Amount", "Remaining Amt. (LCY)", + "Original Amount", "Original Amt. (LCY)"); + SetTransactionNo(GenJnlLine); + GenJnlPostLine.CustUnrealizedVAT(GenJnlLine, OldCustLedgEntry, UnrealCVLedgEntryBuffer."Applied Amount"); + UnrealCVLedgEntryBuffer.Realized := true; + UnrealCVLedgEntryBuffer.Modify(); + UpdateUnrealCVLedgEntryBuffer(GenJnlLine, OldCustLedgEntry."Transaction No."); + until UnrealCVLedgEntryBuffer.Next() = 0; + end; + GenJnlLine."Source Type"::Vendor: + if GenJnlLine."Applies-to Doc. No." <> '' then begin + // Find original entry based on Applies-to Doc. No. + OldVendLedgEntry.Reset(); + OldVendLedgEntry.SetCurrentKey("Document No."); + OldVendLedgEntry.SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + OldVendLedgEntry.SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + OldVendLedgEntry.SetRange("Vendor No.", GenJnlLine."Source No."); + OldVendLedgEntry.FindFirst(); + OldVendLedgEntry.CalcFields( + Amount, "Amount (LCY)", "Remaining Amount", "Remaining Amt. (LCY)", + "Original Amount", "Original Amt. (LCY)"); + SetTransactionNo(GenJnlLine); + UnrealCVLedgEntryBuffer.Reset(); + UnrealCVLedgEntryBuffer.SetRange("Account Type", UnrealCVLedgEntryBuffer."Account Type"::Vendor); + UnrealCVLedgEntryBuffer.SetRange("Account No.", GenJnlLine."Source No."); + if CheckHeaderNo(GenJnlLine."Document No.") then + UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Created from No.") + else + UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Document No."); + UnrealCVLedgEntryBuffer.FindFirst(); + GenJnlPostLine.VendUnrealizedVAT(GenJnlLine, OldVendLedgEntry, GenJnlLine.Amount); + UnrealCVLedgEntryBuffer.Realized := true; + UnrealCVLedgEntryBuffer.Modify(); + UpdateUnrealCVLedgEntryBuffer(GenJnlLine, OldVendLedgEntry."Transaction No."); + end else begin + // Find original entry from buffer table + UnrealCVLedgEntryBuffer.Reset(); + UnrealCVLedgEntryBuffer.SetRange("Account Type", UnrealCVLedgEntryBuffer."Account Type"::Vendor); + UnrealCVLedgEntryBuffer.SetRange("Account No.", GenJnlLine."Source No."); + if CheckHeaderNo(GenJnlLine."Document No.") then + UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Created from No.") + else + UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Document No."); + UnrealCVLedgEntryBuffer.SetRange("Applies-to ID", GenJnlLine."Applies-to ID"); +#pragma warning disable AL0667 + if UnrealCVLedgEntryBuffer.FindSet(true, false) then +#pragma warning restore AL0667 + repeat + OldVendLedgEntry.Get(UnrealCVLedgEntryBuffer."Entry No."); + OldVendLedgEntry.CalcFields( + Amount, "Amount (LCY)", "Remaining Amount", "Remaining Amt. (LCY)", + "Original Amount", "Original Amt. (LCY)"); + SetTransactionNo(GenJnlLine); + GenJnlPostLine.VendUnrealizedVAT(GenJnlLine, OldVendLedgEntry, UnrealCVLedgEntryBuffer."Applied Amount"); + UnrealCVLedgEntryBuffer.Realized := true; + UnrealCVLedgEntryBuffer.Modify(); + UpdateUnrealCVLedgEntryBuffer(GenJnlLine, OldVendLedgEntry."Transaction No."); + until UnrealCVLedgEntryBuffer.Next() = 0; + end; + end; + end; + + local procedure UpdateUnrealCVLedgEntryBuffer(GenJnlLine: Record "Gen. Journal Line"; TransactionNo: Integer) + var + VATEntry2: Record "VAT Entry"; + UnrealCVLedgEntryBuffer2: Record "Unreal. CV Ledg. Entry Buffer"; + TotalUnrealVATAmount: Decimal; + begin + VATEntry2.Reset(); + VATEntry2.SetCurrentKey("Transaction No."); + VATEntry2.SetRange("Transaction No.", TransactionNo); + if VATEntry2.FindSet() then + repeat + TotalUnrealVATAmount := TotalUnrealVATAmount - VATEntry2."Remaining Unrealized Amount"; + until VATEntry2.Next() = 0; + if TotalUnrealVATAmount = 0 then begin + UnrealCVLedgEntryBuffer2.Reset(); + if GenJnlLine."Source Type" = GenJnlLine."Source Type"::Customer then + UnrealCVLedgEntryBuffer2.SetRange("Account Type", UnrealCVLedgEntryBuffer2."Account Type"::Customer) + else + UnrealCVLedgEntryBuffer2.SetRange("Account Type", UnrealCVLedgEntryBuffer2."Account Type"::Vendor); + UnrealCVLedgEntryBuffer2.SetRange("Entry No.", UnrealCVLedgEntryBuffer."Entry No."); + UnrealCVLedgEntryBuffer2.SetRange(Realized, true); + UnrealCVLedgEntryBuffer2.DeleteAll(); + end; + end; + + procedure CalcPaidAmount(GenJnlLine: Record "Gen. Journal Line"): Decimal + var + UnrealCVLedgEntryBuffer2: Record "Unreal. CV Ledg. Entry Buffer"; + PaidAmount: Decimal; + begin + UnrealCVLedgEntryBuffer2.Reset(); + if GenJnlLine."Source Type" = GenJnlLine."Source Type"::Customer then + UnrealCVLedgEntryBuffer2.SetRange("Account Type", UnrealCVLedgEntryBuffer2."Account Type"::Customer) + else + UnrealCVLedgEntryBuffer2.SetRange("Account Type", UnrealCVLedgEntryBuffer2."Account Type"::Vendor); + UnrealCVLedgEntryBuffer2.SetRange("Entry No.", UnrealCVLedgEntryBuffer."Entry No."); + UnrealCVLedgEntryBuffer2.SetRange(Realized, true); + if UnrealCVLedgEntryBuffer2.FindSet() then + repeat + PaidAmount := PaidAmount - UnrealCVLedgEntryBuffer2."Applied Amount"; + until UnrealCVLedgEntryBuffer2.Next() = 0; + exit(Abs(PaidAmount)); + end; + + local procedure RealizeDelayedUnrealizedVAT(GenJnlLine: Record "Gen. Journal Line") + begin + if GenJnlLine."Delayed Unrealized VAT" and GenJnlLine."Realize VAT" then + if (GenJnlLine."Applies-to Doc. No." <> '') or (GenJnlLine."Applies-to ID" <> '') then + PostDelayedUnrealizedVAT(GenJnlLine); + end; + + [IntegrationEvent(false, false)] + local procedure OnCreateTempJnlLinesOnBeforeInsertTempGenJnlLine(var TempGenJnlLine: Record "Gen. Journal Line" temporary; var PaymentLine: Record "Payment Line FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnCreateTempCollectionEntriesOnBeforeInsert(var ToDirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; PaymentHeader: Record "Payment Header FR"; PaymentLine: Record "Payment Line FR") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCheckPaymentLine(var DirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; var PaymentLine: Record "Payment Line FR"; var Result: Boolean; var IsHandled: Boolean) + begin + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/RIBKeyFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/RIBKeyFR.Codeunit.al new file mode 100644 index 0000000000..0148c11930 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/RIBKeyFR.Codeunit.al @@ -0,0 +1,62 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +codeunit 10839 "RIB Key FR" +{ + + trigger OnRun() + begin + end; + + var + CodingLbl: Label 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; +#pragma warning disable AA0240 + UncodingLbl: Label '12345678912345678923456789'; +#pragma warning restore AA0240 + + procedure Check(Bank: Text; Agency: Text; Account: Text; RIBKey: Integer) Result: Boolean + var + LongAccountNum: Code[30]; + Index: Integer; + Remaining: Integer; + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforeCheck(Bank, Agency, Account, RIBKey, Result, IsHandled); + if IsHandled then + exit(Result); + + if not ((StrLen(Bank) = 5) and + (StrLen(Agency) = 5) and + (StrLen(Account) = 11) and + (RIBKey < 100)) + then + exit(false); + + LongAccountNum := + CopyStr(Bank + Agency + Account + ConvertStr(Format(RIBKey, 2), ' ', '0'), 1, MaxStrLen(LongAccountNum)); + LongAccountNum := ConvertStr(LongAccountNum, CodingLbl, UncodingLbl); + + Remaining := 0; + for Index := 1 to 23 do + Remaining := (Remaining * 10 + (LongAccountNum[Index] - '0')) mod 97; + + OnAfterCheck(Remaining); + + exit(Remaining = 0); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCheck(Remaining: Integer) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCheck(Bank: Text; Agency: Text; Account: Text; RIBKey: Integer; var Result: Boolean; var IsHandled: Boolean) + begin + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgTagPaymentManagementFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgTagPaymentManagementFR.Codeunit.al new file mode 100644 index 0000000000..4a631aaf3b --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgTagPaymentManagementFR.Codeunit.al @@ -0,0 +1,23 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using System.Upgrade; + +codeunit 10841 "Upg. Tag Payment Management FR" +{ + Access = Internal; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Upgrade Tag", 'OnGetPerCompanyUpgradeTags', '', false, false)] + local procedure RegisterPerCompanyTags(var PerCompanyUpgradeTags: List of [Code[250]]) + begin + PerCompanyUpgradeTags.Add(GetPaymentUpgradeTag()); + end; + + internal procedure GetPaymentUpgradeTag(): Code[250] + begin + exit('MS-581204-PaymentManagementUpgradeTag-20250918'); + end; +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgradePaymentManagementFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgradePaymentManagementFR.Codeunit.al new file mode 100644 index 0000000000..f19b251fe2 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgradePaymentManagementFR.Codeunit.al @@ -0,0 +1,116 @@ +#if CLEAN28 +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Bank.BankAccount; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using System.Reflection; +using System.Upgrade; + +codeunit 10840 "Upgrade Payment Management FR" +{ + Access = Internal; + Subtype = Upgrade; + + var + UpgradeTag: Codeunit "Upgrade Tag"; + UpgTagPayment: Codeunit "Upg. Tag Payment Management FR"; + + trigger OnUpgradePerCompany() + var + CurrentModuleInfo: ModuleInfo; + begin + NavApp.GetCurrentModuleInfo(CurrentModuleInfo); + if CurrentModuleInfo.AppVersion().Major() < 31 then + exit; + + UpgradePayment(); + end; + + local procedure UpgradePayment() + begin + if UpgradeTag.HasUpgradeTag(UpgTagPayment.GetPaymentUpgradeTag()) then + exit; + + TransferFields(Database::"Bank Account", 10805, 10851); // 10805 - the existing field "Agency Code", 10851 - the new field "Agency Code FR"; + TransferFields(Database::"Bank Account", 10806, 10852); // 10806 - the existing field "RIB Key", 10852 - the new field "RIB Key FR"; + TransferFields(Database::"Bank Account", 10807, 10853); // 10807 - the existing field "RIB Checked", 10853 - the new field "RIB Checked FR",; + TransferFields(Database::"Customer Bank Account", 10805, 10851); // 10805 - the existing field "Agency Code", 10851 - the new field "Agency Code FR",; + TransferFields(Database::"Customer Bank Account", 10806, 10852); //, 10806 - the existing field "RIB Key", 10852 - the new field "RIB Key FR"; + TransferFields(Database::"Customer Bank Account", 10807, 10853); // 10807 - the existing field "RIB Checked", 10853 - the new field "RIB Checked FR"; + TransferFields(Database::"Vendor Bank Account", 10805, 10851); // 10805 - the existing field "Agency Code", 10851 - the new field "Agency Code FR"; + TransferFields(Database::"Vendor Bank Account", 10806, 10852); // 10806 - the existing field "RIB Key", 10852 - the new field "RIB Key FR"; + TransferFields(Database::"Vendor Bank Account", 10807, 10853); // 10807 - the existing field "RIB Checked", 10853 - the new field "RIB Checked FR"; + TransferRecords(Database::"Bank Account Buffer", Database::"Bank Account Buffer FR"); + TransferRecords(Database::"Payment Class", Database::"Payment Class FR"); + TransferRecords(Database::"Payment Header", Database::"Payment Header FR"); + TransferRecords(Database::"Payment Header Archive", Database::"Payment Header Archive FR"); + TransferRecords(Database::"Payment Line", Database::"Payment Line FR"); + TransferRecords(Database::"Payment Line Archive", Database::"Payment Line Archive FR"); + TransferRecords(Database::"Payment Post. Buffer", Database::"Payment Post. Buffer FR"); + TransferRecords(Database::"Payment Status", Database::"Payment Status FR"); + TransferRecords(Database::"Payment Step", Database::"Payment Step FR"); + TransferRecords(Database::"Payment Step Ledger", Database::"Payment Step Ledger FR"); + TransferRecords(Database::"Payment Address", Database::"Payment Address FR"); + + UpgradeTag.SetUpgradeTag(UpgTagPayment.GetPaymentUpgradeTag()); + end; + + procedure TransferRecords(SourceTableId: Integer; TargetTableId: Integer) + var + SourceField: Record Field; + SourceRecRef: RecordRef; + TargetRecRef: RecordRef; + TargetFieldRef: FieldRef; + SourceFieldRef: FieldRef; + SourceFieldRefNo: Integer; + begin + SourceRecRef.Open(SourceTableId, false); + TargetRecRef.Open(TargetTableId, false); + + if SourceRecRef.IsEmpty() then + exit; + + SourceRecRef.FindSet(); + + repeat + Clear(SourceField); + SourceField.SetRange(TableNo, SourceTableId); + SourceField.SetRange(Class, SourceField.Class::Normal); + SourceField.SetRange(Enabled, true); + if SourceField.Findset() then + repeat + SourceFieldRefNo := SourceField."No."; + SourceFieldRef := SourceRecRef.Field(SourceFieldRefNo); + TargetFieldRef := TargetRecRef.Field(SourceFieldRefNo); + TargetFieldRef.VALUE := SourceFieldRef.VALUE; + until SourceField.Next() = 0; + TargetRecRef.Insert(); + until SourceRecRef.Next() = 0; + SourceRecRef.Close(); + TargetRecRef.Close(); + end; + + procedure TransferFields(TableId: Integer; SourceFieldNo: Integer; TargetFieldNo: Integer) + var + RecRef: RecordRef; + TargetFieldRef: FieldRef; + SourceFieldRef: FieldRef; + begin + RecRef.Open(TableId, false); + SourceFieldRef := RecRef.Field(SourceFieldNo); + SourceFieldRef.SetFilter('<>%1', ''); + + if RecRef.FindSet() then + repeat + TargetFieldRef := RecRef.Field(TargetFieldNo); + TargetFieldRef.VALUE := SourceFieldRef.VALUE; + RecRef.Modify(false); + until RecRef.Next() = 0; + end; +} +#endif \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Enum/PaymentStepActionTypeFR.Enum.al b/Apps/FR/PaymentManagementFR/app/src/Enum/PaymentStepActionTypeFR.Enum.al new file mode 100644 index 0000000000..e611ee1e80 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Enum/PaymentStepActionTypeFR.Enum.al @@ -0,0 +1,18 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +enum 10831 "Payment Step Action Type FR" +{ + Extensible = true; + AssignmentCompatibility = true; + + value(0; "None") { Caption = 'None'; } + value(1; "Ledger") { Caption = 'Ledger'; } + value(2; "Report") { Caption = 'Report'; } + value(3; "File") { Caption = 'File'; } + value(4; "Create New Document") { Caption = 'Create New Document'; } + value(5; "Cancel File") { Caption = 'Cancel File'; } +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/EnumExtensions/FeaturePaymentMgtFR.EnumExt.al b/Apps/FR/PaymentManagementFR/app/src/EnumExtensions/FeaturePaymentMgtFR.EnumExt.al new file mode 100644 index 0000000000..ac347c93d0 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/EnumExtensions/FeaturePaymentMgtFR.EnumExt.al @@ -0,0 +1,21 @@ +#if not CLEAN28 +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.VAT.Setup; + +using Microsoft.Bank.Payment; +using System.Environment.Configuration; + +enumextension 10831 "Feature - PaymentMgt FR" extends "Feature To Update" +{ + value(10831; Payment) + { + Implementation = "Feature Data Update" = "Feature - PaymentMgt FR"; + ObsoleteState = Pending; + ObsoleteReason = 'Feature Payment Management will be enabled by default in version 31.0.'; + ObsoleteTag = '28.0'; + } +} +#endif \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccPayablesCoordinatorRC.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccPayablesCoordinatorRC.PageExt.al new file mode 100644 index 0000000000..e7be2cc661 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccPayablesCoordinatorRC.PageExt.al @@ -0,0 +1,95 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.RoleCenters; + +pageextension 10832 "Acc. Payables Coordinator RC" extends "Acc. Payables Coordinator RC" +{ + actions + { + addafter(Action1120006) + { + action("Payments Lists FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payments Lists'; + Image = "Report"; + RunObject = Report "Payment List FR"; + ToolTip = 'View a list of payments.'; + } + action("GL/Vend. Ledger Reconciliation FR") + { + ApplicationArea = Basic, Suite; + Caption = 'GL/Vend. Ledger Reconciliation'; + Image = "Report"; + RunObject = Report "GL/Vend Ledger Reconciliation"; + ToolTip = 'View or print a separate page for each vendor that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with vendor ledger entries.'; + } + } + addafter(PaymentJournals) + { + action("Payment Slips FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slips'; + RunObject = Page "Payment Slip List FR"; + ToolTip = 'View a list of payment slips.'; + } + } + addafter("G/L Registers") + { + action("Payment Slip List Archives FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip List Archives'; + RunObject = Page "Payment Slip List Archive FR"; + ToolTip = 'View a list of payment slips that have been posted and archived.'; + } + } + addafter("Payment &Journal") + { + action("Payment Slip FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip'; + RunObject = Page "Payment Slip FR"; + ToolTip = 'Use payment slips to manage customer and vendor payments. '; + } + action("Look/Edit Payment Line FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Look/Edit Payment Line'; + RunObject = Page "View/Edit Payment Line FR"; + ToolTip = 'View and edit all payment lines that belong to a payment class. The window shows a line for each payment status. '; + } + action("Payment Report FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Report'; + RunObject = Page "Payment Report FR"; + ToolTip = 'View all payment documents that belong to a payment class and have the same status.'; + } + } + addafter(VendorPayments) + { + action("Archive Payment Journals FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Archive Payment Journals'; + Image = "Report"; + RunObject = Report "Archive Payment Slips FR"; + ToolTip = 'Archive payment journals to separate them from active journals. You can enter criteria to specify the journals to archive.'; + } + action("Create Payment Slip FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Create Payment Slip'; + RunObject = Codeunit "Payment Management FR"; + ToolTip = 'Manage information about customer and vendor payments.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccReceivablesAdmRC.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccReceivablesAdmRC.PageExt.al new file mode 100644 index 0000000000..74c185a7b9 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccReceivablesAdmRC.PageExt.al @@ -0,0 +1,92 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.RoleCenters; + +pageextension 10833 "Acc. Receivables Adm. RC" extends "Acc. Receivables Adm. RC" +{ + actions + { + addafter(Action1120005) + { + action("Payments Lists FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payments Lists'; + Image = "Report"; + RunObject = Report "Payment List FR"; + ToolTip = 'View a list of payments.'; + } + action("GL/Cust. Ledger Reconciliation FR") + { + ApplicationArea = Basic, Suite; + Caption = 'GL/Cust. Ledger Reconciliation'; + Image = "Report"; + RunObject = Report "GL/Cust Ledger Reconciliation"; + ToolTip = 'View or print a separate page for each customer that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with customer ledger entries.'; + } + } + addafter(CashReceiptJournals) + { + action("Payment Slips FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slips'; + RunObject = Page "Payment Slip List FR"; + ToolTip = 'View a list of payment slips.'; + } + } + addafter("G/L Registers") + { + action("Payment Slip List Archives FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip List Archives'; + RunObject = Page "Payment Slip List Archive FR"; + ToolTip = 'View a list of payment slips that have been posted and archived.'; + } + } + addafter("Cash Receipt &Journal") + { + action("Payment Slip FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip'; + RunObject = Page "Payment Slip FR"; + ToolTip = 'Use payment slips to manage customer and vendor payments. '; + } + action("Look/Edit Payment Line FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Look/Edit Payment Line'; + RunObject = Page "View/Edit Payment Line FR"; + ToolTip = 'View and edit all payment lines that belong to a payment class. The window shows a line for each payment status. '; + } + action("Payment Report FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Report'; + RunObject = Page "Payment Report FR"; + ToolTip = 'View all payment documents that belong to a payment class and have the same status.'; + } + action("Archive Payment Journals FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Archive Payment Journals'; + Image = "Report"; + RunObject = Report "Archive Payment Slips FR"; + ToolTip = 'Archive payment journals to separate them from active journals. You can enter criteria to specify the journals to archive.'; + } + action("Create Payment Slip FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Create Payment Slip'; + RunObject = Codeunit "Payment Management FR"; + ToolTip = 'Manage information about customer and vendor payments.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccountingManagerRoleCenter.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccountingManagerRoleCenter.PageExt.al new file mode 100644 index 0000000000..ccde08da3d --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccountingManagerRoleCenter.PageExt.al @@ -0,0 +1,100 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.RoleCenters; + +pageextension 10831 "Accounting Manager Role Center" extends "Accounting Manager Role Center" +{ + actions + { + addafter(Action1120013) + { + action("Payments Lists FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payments Lists'; + Image = "Report"; + RunObject = Report "Payment List FR"; + ToolTip = 'View a list of payments.'; + } + action("GL/Cust. Ledger Reconciliation FR") + { + ApplicationArea = Basic, Suite; + Caption = 'GL/Cust. Ledger Reconciliation'; + Image = "Report"; + RunObject = Report "GL/Cust Ledger Reconciliation"; + ToolTip = 'View or print a separate page for each customer that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with customer ledger entries.'; + } + action("GL/Vend. Ledger Reconciliation FR") + { + ApplicationArea = Basic, Suite; + Caption = 'GL/Vend. Ledger Reconciliation'; + Image = "Report"; + RunObject = Report "GL/Vend Ledger Reconciliation"; + ToolTip = 'View or print a separate page for each vendor that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with vendor ledger entries.'; + } + } + addafter(GeneralJournals) + { + action("Payment Slips FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slips'; + RunObject = Page "Payment Slip List FR"; + ToolTip = 'View a list of payment slips.'; + } + } + addafter("Cost Accounting Budget Registers") + { + action("Payment Slip List Archives FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip List Archives'; + RunObject = Page "Payment Slip List Archive FR"; + ToolTip = 'View a list of payment slips that have been posted and archived.'; + } + } + addafter("Pa&yment Journal") + { + action("Payment Slip FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip'; + RunObject = Page "Payment Slip FR"; + ToolTip = 'Use payment slips to manage customer and vendor payments. '; + } + action("Look/Edit Payment Line FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Look/Edit Payment Line'; + RunObject = Page "View/Edit Payment Line FR"; + ToolTip = 'View and edit all payment lines that belong to a payment class. The window shows a line for each payment status. '; + } + action("Payment Report FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Report'; + RunObject = Page "Payment Report FR"; + ToolTip = 'View all payment documents that belong to a payment class and have the same status.'; + } + action("Archive Payment Journals FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Archive Payment Journals'; + Image = "Report"; + RunObject = Report "Archive Payment Slips FR"; + ToolTip = 'Archive payment journals to separate them from active journals. You can enter criteria to specify the journals to archive.'; + } + action("Create Payment Slips FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Create Payment Slips'; + RunObject = Codeunit "Payment Management FR"; + ToolTip = 'Manage information about customer and vendor payments.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BankAccountCard.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BankAccountCard.PageExt.al new file mode 100644 index 0000000000..8e37775b64 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BankAccountCard.PageExt.al @@ -0,0 +1,88 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.BankAccount; +#if not CLEAN28 +using Microsoft.Bank.Payment; +#endif + +pageextension 10834 "Bank Account Card" extends "Bank Account Card" +{ + layout + { +#if not CLEAN28 +#pragma warning disable AL0432 + modify(" R.I.B") + { + Visible = not FeatureEnabled; + } +#pragma warning restore AL0432 +#endif + addafter(Transfer) + { + group("R.I.B FR") + { + Caption = ' R.I.B'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + field("Bank Branch No.3 FR"; Rec."Bank Branch No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the branch number of your bank.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + field("Agency Code FR"; Rec."Agency Code FR") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the five-number code of the agency of the bank, for example, 00300.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + field("Bank Account No.3 FR"; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the bank account number.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + field("RIB Key FR"; Rec."RIB Key FR") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + field("RIB Checked FR"; Rec."RIB Checked FR") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the Bank Account No. has been verified against the RIB Key.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + } + } +#if CLEAN28 + moveafter("RIB Checked FR"; "Bank Statement Import Format", "Payment Export Format", CheckTransmitted, "Positive Pay Export Code") +#endif + } + +#if not CLEAN28 + trigger OnOpenPage() + var + PaymentFeatureFR: Codeunit "Payment Management Feature FR"; + begin + FeatureEnabled := PaymentFeatureFR.IsEnabled(); + end; + + var + FeatureEnabled: Boolean; +#endif +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BookkeeperRoleCenter.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BookkeeperRoleCenter.PageExt.al new file mode 100644 index 0000000000..825fc86860 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BookkeeperRoleCenter.PageExt.al @@ -0,0 +1,90 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.RoleCenters; + +pageextension 10835 "Bookkeeper Role Center" extends "Bookkeeper Role Center" +{ + actions + { + addafter(Action1120013) + { + action("Payments Lists FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payments Lists'; + Image = "Report"; + RunObject = Report "Payment List FR"; + ToolTip = 'View a list of payments.'; + } + action("GL/Cust. Ledger Reconciliation FR") + { + ApplicationArea = Basic, Suite; + Caption = 'GL/Cust. Ledger Reconciliation'; + Image = "Report"; + RunObject = Report "GL/Cust Ledger Reconciliation"; + ToolTip = 'View or print a separate page for each customer that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with customer ledger entries.'; + } + action("GL/Vend. Ledger Reconciliation FR") + { + ApplicationArea = Basic, Suite; + Caption = 'GL/Vend. Ledger Reconciliation'; + Image = "Report"; + RunObject = Report "GL/Vend Ledger Reconciliation"; + ToolTip = 'View or print a separate page for each vendor that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with vendor ledger entries.'; + } + } + addafter("G/L Registers") + { + action("Payment Slip List Archives FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip List Archives'; + RunObject = Page "Payment Slip List Archive FR"; + ToolTip = 'View a list of payment slips that have been posted and archived.'; + } + } + addafter("Payment &Journal") + { + action("Payment Slip FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip'; + RunObject = Page "Payment Slip FR"; + ToolTip = 'Use payment slips to manage customer and vendor payments. '; + } + action("Look/Edit Payment Line FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Look/Edit Payment Line'; + RunObject = Page "View/Edit Payment Line FR"; + ToolTip = 'View and edit all payment lines that belong to a payment class. The window shows a line for each payment status. '; + } + action("Payment Report FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Report'; + RunObject = Page "Payment Report FR"; + ToolTip = 'View all payment documents that belong to a payment class and have the same status.'; + } + action("Archive Payment Journals FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Archive Payment Journals'; + Image = "Report"; + RunObject = Report "Archive Payment Slips FR"; + ToolTip = 'Archive payment journals to separate them from active journals. You can enter criteria to specify the journals to archive.'; + } + action("Create Payment Slip FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Create Payment Slip'; + RunObject = Codeunit "Payment Management FR"; + ToolTip = 'Manage information about customer and vendor payments.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CashReceiptJournal.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CashReceiptJournal.PageExt.al new file mode 100644 index 0000000000..b2fe4b2581 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CashReceiptJournal.PageExt.al @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Bank.Payment; + +pageextension 10836 "Cash Receipt Journal" extends "Cash Receipt Journal" +{ + actions + { +#if not CLEAN28 +#pragma warning disable AL0432 + modify(PrintCheckRemittanceReport) + { + Visible = not FeatureEnabled; + } +#pragma warning restore AL0432 +#endif + addafter("Insert Conv. LCY Rndg. Lines") + { + separator(Action1120000FR) + { + } + action(PrintCheckRemittanceReportFR) + { + ApplicationArea = Basic, Suite; + Caption = 'Print Check Remittance Report'; + Image = PrintCheck; + ToolTip = 'View a list of checks remitted to the bank. The header shows the names and addresses of the company and bank. The body shows the list of checks. The footer shows the total of the remittance and the number of checks. Typically, you give this report to your bank with the checks at remittance.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + trigger OnAction() + var + RecapitulationForm: Report "Recapitulation Form FR"; + begin + RecapitulationForm.SetTableView(Rec); + RecapitulationForm.RunModal(); + Clear(RecapitulationForm); + end; + } + } + } + +#if not CLEAN28 + trigger OnOpenPage() + var + PaymentFeatureFR: Codeunit "Payment Management Feature FR"; + begin + FeatureEnabled := PaymentFeatureFR.IsEnabled(); + end; + + var + FeatureEnabled: Boolean; +#endif +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerBankAccountCard.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerBankAccountCard.PageExt.al new file mode 100644 index 0000000000..c79d01afbb --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerBankAccountCard.PageExt.al @@ -0,0 +1,73 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Customer; +#if not CLEAN28 +using Microsoft.Bank.Payment; +#endif + +pageextension 10837 "Customer Bank Account Card" extends "Customer Bank Account Card" +{ + layout + { +#if not CLEAN28 +#pragma warning disable AL0432 + modify("Agency Code") + { + Visible = not FeatureEnabled; + } + modify("RIB Key") + { + Visible = not FeatureEnabled; + } + modify("RIB Checked") + { + Visible = not FeatureEnabled; + } +#pragma warning restore AL0432 +#endif + addafter("Bank Branch No.") + { + field("Agency Code FR"; Rec."Agency Code FR") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the five-number code of the agency of the bank, for example, 00300.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + } + addafter("Bank Account No.") + { + field("RIB Key FR"; Rec."RIB Key FR") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + field("RIB Checked FR"; Rec."RIB Checked FR") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the Bank Account No. has been verified against the RIB Key.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + } + } + +#if not CLEAN28 + trigger OnOpenPage() + var + PaymentFeatureFR: Codeunit "Payment Management Feature FR"; + begin + FeatureEnabled := PaymentFeatureFR.IsEnabled(); + end; + + var + FeatureEnabled: Boolean; +#endif +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerCard.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerCard.PageExt.al new file mode 100644 index 0000000000..835e70b13c --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerCard.PageExt.al @@ -0,0 +1,90 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Sales.Customer; + +pageextension 10838 "Customer Card" extends "Customer Card" +{ + layout + { +#if not CLEAN28 +#pragma warning disable AL0432 + modify("Payment in progress (LCY)") + { + Visible = not FeatureEnabled; + } + modify("""Balance (LCY)"" - ""Payment in progress (LCY)""") + { + Visible = not FeatureEnabled; + } +#pragma warning restore AL0432 +#endif + addafter("Payment Balance (LCY)") + { + field("Payment in progress (LCY) FR"; Rec."Payment in progress (LCY) FR") + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = Rec."Currency Code"; + ToolTip = 'Specifies the customer''s payments in progress.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + field("Net amount (LCY)"; Rec."Balance (LCY)" - Rec."Payment in progress (LCY) FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Net amount (LCY)'; + Editable = false; + AutoFormatType = 1; + AutoFormatExpression = Rec."Currency Code"; + ToolTip = 'Specifies the net amount in local currency.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + } + } + actions + { +#if not CLEAN28 +#pragma warning disable AL0432 + modify("&Payment Addresses") + { + Visible = not FeatureEnabled; + } +#pragma warning restore AL0432 +#endif + addafter(Contact) + { + action("&Payment Addresses FR") + { + ApplicationArea = Basic, Suite; + Caption = '&Payment Addresses'; + Image = Addresses; + RunObject = Page "Payment Addresses FR"; + RunPageLink = "Account Type" = const(Customer), + "Account No." = field("No."); + ToolTip = 'View payment addresses for the customer.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + } + } + +#if not CLEAN28 + trigger OnOpenPage() + var + PaymentFeatureFR: Codeunit "Payment Management Feature FR"; + begin + FeatureEnabled := PaymentFeatureFR.IsEnabled(); + end; + + var + FeatureEnabled: Boolean; +#endif +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/FinanceManagerRoleCenter.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/FinanceManagerRoleCenter.PageExt.al new file mode 100644 index 0000000000..1760924faa --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/FinanceManagerRoleCenter.PageExt.al @@ -0,0 +1,99 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.RoleCenters; + +pageextension 10839 "Finance Manager Role Center" extends "Finance Manager Role Center" +{ + actions + { + addafter("Bank Account Journal") + { + action("GL/Cust. Ledger Reconciliation FR") + { + ApplicationArea = Basic, Suite; + Caption = 'GL/Cust. Ledger Reconciliation'; + RunObject = report "GL/Cust Ledger Reconciliation"; + Tooltip = 'Run the GL/Cust Ledger Reconciliation report.'; + } + action("GL/Vend. Ledger Reconciliation FR") + { + ApplicationArea = Basic, Suite; + Caption = 'GL/Vend. Ledger Reconciliation'; + RunObject = report "GL/Vend Ledger Reconciliation"; + Tooltip = 'Run the GL/Vend Ledger Reconciliation report.'; + } + } + addafter("Payment Registration") + { + action("Payment Slips FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slips'; + RunObject = page "Payment Slip List FR"; + Tooltip = 'Open the Payment Slip List page.'; + } + } + addafter(Group15) + { + group("Group62 FR") + { + Caption = 'Payment Slip'; + action("View/Edit Payment Lines FR") + { + ApplicationArea = Basic, Suite; + Caption = 'View/Edit Payment Lines'; + RunObject = page "View/Edit Payment Line FR"; + Tooltip = 'Open the View/Edit Payment Line page.'; + } + action("Payment Report FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Report'; + RunObject = page "Payment Report FR"; + Tooltip = 'Open the Payment Report page.'; + } + action("Archive Payment Slips FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Archive Payment Slips'; + RunObject = report "Archive Payment Slips FR"; + Tooltip = 'Run the Archive Payment Slips report.'; + } + } + } + addafter("Cash Flow Ledger Entries1") + { + action("Payment Slip Archive FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip Archive'; + RunObject = page "Payment Slip List Archive FR"; + Tooltip = 'Open the Payment Slip List page.'; + } + } + addafter("Direct Debit Collections") + { + action("Payment Slips1 FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slips'; + RunObject = page "Payment Slip List FR"; + Tooltip = 'Open the Payment Slip List page.'; + } + } + addafter("Credit Memos1") + { + action("Payment Slips2 FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slips'; + RunObject = page "Payment Slip List FR"; + Tooltip = 'Open the Payment Slip List page.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/SmallBusinessOwnerRC.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/SmallBusinessOwnerRC.PageExt.al new file mode 100644 index 0000000000..ccc3a9c074 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/SmallBusinessOwnerRC.PageExt.al @@ -0,0 +1,103 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.RoleCenters; + +pageextension 10840 "Small Business Owner RC" extends "Small Business Owner RC" +{ + actions + { + addafter(Action1120008) + { + action("Payments Lists FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payments Lists'; + Image = "Report"; + RunObject = Report "Payment List FR"; + ToolTip = 'View a list of payments.'; + } + action("GL/Cust. Ledger Reconciliation FR") + { + ApplicationArea = Basic, Suite; + Caption = 'GL/Cust. Ledger Reconciliation'; + Image = "Report"; + RunObject = Report "GL/Cust Ledger Reconciliation"; + ToolTip = 'View or print a separate page for each customer that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with customer ledger entries.'; + } + action("GL/Vend. Ledger Reconciliation FR") + { + ApplicationArea = Basic, Suite; + Caption = 'GL/Vend. Ledger Reconciliation'; + Image = "Report"; + RunObject = Report "GL/Vend Ledger Reconciliation"; + ToolTip = 'View or print a separate page for each vendor that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with vendor ledger entries.'; + } + } + addafter(VendorsBalance) + { + action("Payment Slips FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slips'; + RunObject = Page "Payment Slip List FR"; + ToolTip = 'View a list of payment slips.'; + } + } + addafter(PaymentJournals) + { + action(Action1120016_FR) + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slips'; + RunObject = Page "Payment Slip List FR"; + ToolTip = 'View a list of payment slips.'; + } + } + addafter("Issued Fin. Charge Memos") + { + action("Payment Slip List Archives FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip List Archives'; + RunObject = Page "Payment Slip List Archive FR"; + ToolTip = 'View a list of payment slips that have been posted and archived.'; + } + } + addafter("Vendor Pa&yment Journal") + { + action("Archive Payment Journals FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Archive Payment Journals'; + Image = "Report"; + RunObject = Report "Archive Payment Slips FR"; + ToolTip = 'Archive payment journals to separate them from active journals. You can enter criteria to specify the journals to archive.'; + } + action("Create Payment Slips FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Create Payment Slips'; + RunObject = Codeunit "Payment Management FR"; + ToolTip = 'Manage information about customer and vendor payments.'; + } + action("Look/Edit Payment Line FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Look/Edit Payment Line'; + RunObject = Page "View/Edit Payment Line FR"; + ToolTip = 'View and edit all payment lines that belong to a payment class. The window shows a line for each payment status. '; + } + action("Payment Report FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Report'; + RunObject = Page "Payment Report FR"; + ToolTip = 'View all payment documents that belong to a payment class and have the same status.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorBankAccountCard.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorBankAccountCard.PageExt.al new file mode 100644 index 0000000000..1d22353e78 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorBankAccountCard.PageExt.al @@ -0,0 +1,73 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Vendor; +#if not CLEAN28 +using Microsoft.Bank.Payment; +#endif + +pageextension 10841 "Vendor Bank Account Card" extends "Vendor Bank Account Card" +{ + layout + { +#if not CLEAN28 +#pragma warning disable AL0432 + modify("Agency Code") + { + Visible = not FeatureEnabled; + } + modify("RIB Key") + { + Visible = not FeatureEnabled; + } + modify("RIB Checked") + { + Visible = not FeatureEnabled; + } +#pragma warning restore AL0432 +#endif + addafter("Bank Branch No.") + { + field("Agency Code FR"; Rec."Agency Code FR") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the five-number code of the agency of the bank, for example, 00300.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + } + addafter("Bank Account No.") + { + field("RIB Key FR"; Rec."RIB Key FR") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + field("RIB Checked FR"; Rec."RIB Checked FR") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the Bank Account No. has been verified against the RIB Key.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + } + } + +#if not CLEAN28 + trigger OnOpenPage() + var + PaymentFeatureFR: Codeunit "Payment Management Feature FR"; + begin + FeatureEnabled := PaymentFeatureFR.IsEnabled(); + end; + + var + FeatureEnabled: Boolean; +#endif +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorCard.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorCard.PageExt.al new file mode 100644 index 0000000000..11b9062a73 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorCard.PageExt.al @@ -0,0 +1,90 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Purchases.Vendor; + +pageextension 10842 "Vendor Card" extends "Vendor Card" +{ + layout + { +#if not CLEAN28 +#pragma warning disable AL0432 + modify("Payment in progress (LCY)") + { + Visible = not FeatureEnabled; + } + modify("""Balance (LCY)"" - ""Payment in progress (LCY)""") + { + Visible = not FeatureEnabled; + } +#pragma warning restore AL0432 +#endif + addafter("Payment Balance (LCY)") + { + field("Payment in progress (LCY) FR"; Rec."Payment in progress (LCY) FR") + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = Rec."Currency Code"; + ToolTip = 'Specifies the vendor''s payments in progress.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + field("Net amount (LCY)"; Rec."Balance (LCY)" - Rec."Payment in progress (LCY) FR") + { + ApplicationArea = Basic, Suite; + Caption = 'Net amount (LCY)'; + Editable = false; + AutoFormatType = 1; + AutoFormatExpression = Rec."Currency Code"; + ToolTip = 'Specifies the net amount in local currency.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + } + } + actions + { +#if not CLEAN28 +#pragma warning disable AL0432 + modify("&Payment Addresses") + { + Visible = not FeatureEnabled; + } +#pragma warning restore AL0432 +#endif + addafter(Attachments) + { + action("&Payment Addresses FR") + { + ApplicationArea = Basic, Suite; + Caption = '&Payment Addresses'; + Image = Addresses; + RunObject = Page "Payment Addresses FR"; + RunPageLink = "Account Type" = const(Vendor), + "Account No." = field("No."); + ToolTip = 'View payment addresses for the vendor.'; +#if not CLEAN28 + Visible = FeatureEnabled; +#endif + } + } + } + +#if not CLEAN28 + trigger OnOpenPage() + var + PaymentFeatureFR: Codeunit "Payment Management Feature FR"; + begin + FeatureEnabled := PaymentFeatureFR.IsEnabled(); + end; + + var + FeatureEnabled: Boolean; +#endif +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentAddressesFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentAddressesFR.Page.al new file mode 100644 index 0000000000..4355752a6c --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentAddressesFR.Page.al @@ -0,0 +1,120 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; + +page 10831 "Payment Addresses FR" +{ + Caption = 'Payment Address'; + DataCaptionExpression = Legend; + PageType = List; + SourceTable = "Payment Address FR"; + + layout + { + area(content) + { + repeater(Control1120000) + { + ShowCaption = false; + field("Code"; Rec.Code) + { + ApplicationArea = All; + ToolTip = 'Specifies a payment address code.'; + } + field("Default Value"; Rec."Default Value") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if this address is the default payment address.'; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies the name associated with the payment address.'; + } + field("Search Name"; Rec."Search Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a search name.'; + } + field("Name 2"; Rec."Name 2") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies an additional part of the name associated with the payment address.'; + } + field(Address; Rec.Address) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment address.'; + } + field("Address 2"; Rec."Address 2") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies an additional part of the payment address.'; + } + field("Post Code"; Rec."Post Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payer''s post code.'; + } + field(City; Rec.City) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the city of the payment address.'; + } + field(Contact; Rec.Contact) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the person you contact about payments to this address.'; + } + field("Country/Region Code"; Rec."Country/Region Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payer''s country/region code.'; + } + field(County; Rec.County) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payer''s county name.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + AfterGetCurrentRecord(); + end; + + trigger OnNewRecord(BelowxRec: Boolean) + begin + AfterGetCurrentRecord(); + end; + + var + Cust: Record Customer; + Vend: Record Vendor; + Text001Lbl: Label 'Customer'; + Text002Lbl: Label 'Vendor'; + Legend: Text[250]; + + local procedure AfterGetCurrentRecord() + begin + xRec := Rec; + if Rec."Account Type" = Rec."Account Type"::Customer then begin + Cust.Get(Rec."Account No."); + Legend := Text001Lbl + ' ' + Format(Rec."Account No.") + ' ' + Cust.Name; + end else begin + Vend.Get(Rec."Account No."); + Legend := Text002Lbl + ' ' + Format(Rec."Account No.") + ' ' + Vend.Name; + end; + end; +} diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankArchiveFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankArchiveFR.Page.al new file mode 100644 index 0000000000..fb3e9f329a --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankArchiveFR.Page.al @@ -0,0 +1,120 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10832 "Payment Bank Archive FR" +{ + Caption = 'Bank Account Card'; + Editable = false; + PageType = Card; + SourceTable = "Payment Header Archive FR"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("Bank Name"; Rec."Bank Name") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the name of your bank.'; + } + field("Bank Address"; Rec."Bank Address") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the address of your bank.'; + } + field("Bank Address 2"; Rec."Bank Address 2") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies an additional part of the address of your bank.'; + } + field("Bank Post Code"; Rec."Bank Post Code") + { + ApplicationArea = Basic, Suite; + Caption = 'Post Code/City'; + ToolTip = 'Specifies the postal code of your bank.'; + } + field("Bank City"; Rec."Bank City") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the city of your bank.'; + } + field("Bank Country/Region Code"; Rec."Bank Country/Region Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the country/region code of your bank.'; + } + field("Bank Contact"; Rec."Bank Contact") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the contact of your bank.'; + } + field("Bank Branch No."; Rec."Bank Branch No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the branch number of your bank.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the company''s account number at your bank.'; + } + field(IBAN; Rec.IBAN) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.'; + } + field("SWIFT Code"; Rec."SWIFT Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank identification code for the payment slip.'; + } + } + group("R.I.B.") + { + Caption = 'R.I.B.'; + field("Bank Branch No.2"; Rec."Bank Branch No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the branch number of your bank.'; + } + field("Agency Code"; Rec."Agency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the agency code of your bank.'; + } + field("Bank Account No.2"; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the company''s account number at your bank.'; + } + field("RIB Key"; Rec."RIB Key") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.'; + } + field("RIB Checked"; Rec."RIB Checked") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the key entered in the RIB Key field is correct.'; + } + field("National Issuer No."; Rec."National Issuer No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment authorization number.'; + } + } + } + } + + actions + { + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankFR.Page.al new file mode 100644 index 0000000000..3a3be3d876 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankFR.Page.al @@ -0,0 +1,118 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10833 "Payment Bank FR" +{ + Caption = 'Bank Account Card'; + PageType = Card; + SourceTable = "Payment Header FR"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("Bank Name"; Rec."Bank Name") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the name of the bank selected in the Account No. field, if Account Type is Bank.'; + } + field("Bank Address"; Rec."Bank Address") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the address of the bank.'; + } + field("Bank Address 2"; Rec."Bank Address 2") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies an additional part of the address of the bank.'; + } + field("Bank Post Code"; Rec."Bank Post Code") + { + ApplicationArea = Basic, Suite; + Caption = 'Post Code/City'; + ToolTip = 'Specifies the postal code of the bank.'; + } + field("Bank City"; Rec."Bank City") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the city of the bank.'; + } + field("Bank Country/Region Code"; Rec."Bank Country/Region Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the country/region code of the bank.'; + } + field("Bank Contact"; Rec."Bank Contact") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the contact at the bank.'; + } + field("Bank Branch No."; Rec."Bank Branch No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the branch number of the bank.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the company''s account at the bank.'; + } + field(IBAN; Rec.IBAN) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank account number associated with the payment header.'; + } + field("SWIFT Code"; Rec."SWIFT Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank identification code for the payment slip.'; + } + } + group("R.I.B.") + { + Caption = 'R.I.B.'; + field("Bank Branch No.2"; Rec."Bank Branch No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the branch number of the bank.'; + } + field("Agency Code"; Rec."Agency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the agency code of the bank.'; + } + field("Bank Account No.2"; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the company''s account at the bank.'; + } + field("RIB Key"; Rec."RIB Key") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.'; + } + field("RIB Checked"; Rec."RIB Checked") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the key entered in the RIB Key field is correct.'; + } + field("National Issuer No."; Rec."National Issuer No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment authorization number.'; + } + } + } + } + + actions + { + } +} diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassFR.Page.al new file mode 100644 index 0000000000..bd4a7708a5 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassFR.Page.al @@ -0,0 +1,184 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using System.IO; + +page 10834 "Payment Class FR" +{ + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip Setup'; + DelayedInsert = true; + PageType = List; + SourceTable = "Payment Class FR"; + UsageCategory = Administration; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field(Enable; Rec.Enable) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the user is allowed to use this payment class.'; + } + field("Code"; Rec.Code) + { + ApplicationArea = All; + ToolTip = 'Specifies a payment class code.'; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies text to describe the payment class.'; + } + field("Header No. Series"; Rec."Header No. Series") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number series code used to assign numbers to the header of a payment slip.'; + } + field("Line No. Series"; Rec."Line No. Series") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number series code used to assign numbers to the lines of a payment slip.'; + } + field(Suggestions; Rec.Suggestions) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies what kind of payments proposals are allowed to be created automatically on a payment slip.'; + } + field("Unrealized VAT Reversal"; Rec."Unrealized VAT Reversal") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies how unrealized VAT should be handled.'; + } + field("SEPA Transfer Type"; Rec."SEPA Transfer Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type, if the payment class is used to export payments according to the SEPA standard.'; + } + } + } + } + + actions + { + area(processing) + { + group("F&unctions") + { + Caption = 'F&unctions'; + Image = "Action"; + action(DuplicateParameter) + { + ApplicationArea = Basic, Suite; + Caption = 'Duplicate Parameter'; + Image = CopySerialNo; + ToolTip = 'Create a new payment class based on an existing payment class.'; + + trigger OnAction() + var + PaymentClass: Record "Payment Class FR"; + DuplicateParameter: Report "Duplicate parameter FR"; + begin + if Rec.Code <> '' then begin + PaymentClass.SetRange(Code, Rec.Code); + DuplicateParameter.SetTableView(PaymentClass); + DuplicateParameter.InitParameter(Rec.Code); + DuplicateParameter.RunModal(); + end; + end; + } + action("Import Parameters") + { + ApplicationArea = Basic, Suite; + Caption = 'Import Parameters'; + Image = Import; + ToolTip = 'Import payment management parameters. You can use the following formats: ETEBAC (XMLport 10860) to create a bill of exchange remittance. Withdraw (XMLport 10861) to create a customer payment withdrawal (direct debit). Transfer (XMLport 10862) to create a vendor payment transfer (credit transfer). You choose these formats when you set up the payment status for your payment class.'; + + trigger OnAction() + var + Instream: InStream; + ImportFile: File; + ToFile: Text; + begin + Upload('', '', '', '', ToFile); + ImportFile.Open(ToFile); + ImportFile.CreateInStream(Instream); + XMLPORT.Import(XMLPORT::"Import/Export Parameters FR", Instream); + ImportFile.Close(); + end; + } + action("Export Parameters") + { + ApplicationArea = Basic, Suite; + Caption = 'Export Parameters'; + Image = Export; + ToolTip = 'Import or export parameters for your payment management setup.'; + + trigger OnAction() + var + RBAutoMgt: Codeunit "File Management"; + ServerFile: File; + Fileoutstream: OutStream; + ToFile: Text; + ServerFileName: Text; + begin + ServerFileName := RBAutoMgt.ServerTempFileName(Text002Lbl); + + ServerFile.Create(ServerFileName); + ServerFile.CreateOutStream(Fileoutstream); + XMLPORT.Export(XMLPORT::"Import/Export Parameters FR", Fileoutstream); + ServerFile.Close(); + + ToFile := Text003Lbl; + Download(ServerFileName, '', '', '', ToFile); + Erase(ServerFileName); + end; + } + } + action(Status) + { + ApplicationArea = Basic, Suite; + Caption = 'St&atus'; + Image = "Report"; + RunObject = Page "Payment Status FR"; + RunPageLink = "Payment Class" = field(Code); + ToolTip = 'Manage a series of states that indicate the progress of a payment document.'; + } + action(Steps) + { + ApplicationArea = Basic, Suite; + Caption = 'Ste&ps'; + Image = MoveToNextPeriod; + RunObject = Page "Payment Steps FR"; + RunPageLink = "Payment Class" = field(Code); + ToolTip = 'Manage the steps that must be performed for this status in order to move to the next.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(Status_Promoted; Status) + { + } + actionref(Steps_Promoted; Steps) + { + } + } + } + } + + var + Text002Lbl: Label '''txt'''; + Text003Lbl: Label 'Import_Export Parameters.txt'; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassListFR.Page.al new file mode 100644 index 0000000000..e5d77bed88 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassListFR.Page.al @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10835 "Payment Class List FR" +{ + Caption = 'Payment Class List'; + Editable = false; + PageType = List; + SourceTable = "Payment Class FR"; + SourceTableView = where(Enable = const(true)); + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Code"; Rec.Code) + { + ApplicationArea = All; + ToolTip = 'Specifies a payment class code.'; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies text to describe the payment class.'; + } + } + } + } + + actions + { + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLineModificationFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLineModificationFR.Page.al new file mode 100644 index 0000000000..8af71ca1d1 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLineModificationFR.Page.al @@ -0,0 +1,96 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10836 "Payment Line Modification FR" +{ + Caption = 'Payment Line Modification'; + DeleteAllowed = false; + InsertAllowed = false; + PageType = Card; + RefreshOnActivate = true; + SourceTable = "Payment Line FR"; + + layout + { + area(content) + { + group(Control1) + { + ShowCaption = false; + field("External Document No."; Rec."External Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a document number that refers to the customer''s or vendor''s numbering system.'; + } + field("Drawee Reference"; Rec."Drawee Reference") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the file reference which will be used in the electronic payment (ETEBAC) file.'; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date on the entry.'; + } + field("Acceptation Code"; Rec."Acceptation Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies an acceptation code for the payment line.'; + } + field("Bank Account Code"; Rec."Bank Account Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code of the customer or vendor bank account that you want to perform the payment to, or collection from.'; + } + field("Bank Branch No."; Rec."Bank Branch No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the branch number of the bank account.'; + } + field("Agency Code"; Rec."Agency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the agency code of the bank account.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the customer or vendor bank account that you want to perform the payment to, or collection from.'; + } + field(IBAN; Rec.IBAN) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.'; + } + field("SWIFT Code"; Rec."SWIFT Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank identification code for the payment slip.'; + } + field("RIB Key"; Rec."RIB Key") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.'; + } + field("RIB Checked"; Rec."RIB Checked") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the key entered in the RIB Key field is correct.'; + } + } + } + } + + actions + { + } + + trigger OnInit() + begin + CurrPage.LookupMode := true; + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesArchiveListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesArchiveListFR.Page.al new file mode 100644 index 0000000000..b6a20b0a21 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesArchiveListFR.Page.al @@ -0,0 +1,177 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10839 "Payment Lines Archive List FR" +{ + Caption = 'Payment Lines Archive List'; + Editable = false; + PageType = List; + SourceTable = "Payment Line Archive FR"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of the archived payment.'; + } + field("Line No."; Rec."Line No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the archived payment line''s entry number.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the document number of the archived payment line.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code of the archived payment line.'; + Visible = false; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + ToolTip = 'Specifies the amount (including VAT) of the archived payment line.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + ToolTip = 'Specifies the amount in LCY of the archived payment line.'; + Visible = false; + } + field("Account Type"; Rec."Account Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account type of the archived payment line.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account number of the archived payment line.'; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of the archived payment line.'; + } + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment class of the archived payment line.'; + } + field("Status Name"; Rec."Status Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status of the archived payment.'; + } + field("Status No."; Rec."Status No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the archived status line entry number.'; + Visible = false; + } + field("Acceptation Code"; Rec."Acceptation Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the acception code of the archived payment.'; + } + field("Drawee Reference"; Rec."Drawee Reference") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the file reference which has been used in the electronic payment (ETEBAC) file.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the bank account, as entered in the Bank Account field.'; + Visible = false; + } + field("Bank Branch No."; Rec."Bank Branch No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the branch number of the bank account as entered in the Bank Account field.'; + Visible = false; + } + field("Agency Code"; Rec."Agency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the agency code of the bank account as entered in the Bank Account field.'; + Visible = false; + } + field("SWIFT Code"; Rec."SWIFT Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank identification code for the payment slip.'; + } + field(IBAN; Rec.IBAN) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the customer or vendor bank account of the archived payment.'; + Visible = false; + } + field("RIB Key"; Rec."RIB Key") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.'; + Visible = false; + } + field("Payment in Progress"; Rec."Payment in Progress") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies whether the payment line was taken into account for the customer or vendor payments in progress.'; + Visible = false; + } + } + } + } + + actions + { + area(navigation) + { + group(Functions) + { + Caption = '&Payment'; + action(Card) + { + ApplicationArea = Basic, Suite; + Caption = 'Card'; + Image = EditLines; + ShortCutKey = 'Shift+F7'; + ToolTip = 'Open the card for the entity on the selected line to view more details.'; + + trigger OnAction() + var + Statement: Record "Payment Header Archive FR"; + StatementForm: Page "Payment Slip Archive FR"; + begin + if Statement.Get(Rec."No.") then begin + Statement.SetRange("No.", Rec."No."); + StatementForm.SetTableView(Statement); + StatementForm.Run(); + end; + end; + } + } + } + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesListFR.Page.al new file mode 100644 index 0000000000..e29cf5b023 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesListFR.Page.al @@ -0,0 +1,245 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10840 "Payment Lines List FR" +{ + Caption = 'Payment Lines List'; + DeleteAllowed = false; + Editable = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = List; + SourceTable = "Payment Line FR"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of the payment.'; + } + field("Line No."; Rec."Line No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment line''s entry number.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a document number for the payment line.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code for the amount on this line.'; + Visible = false; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + ToolTip = 'Specifies the total amount (including VAT) of the payment line.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + ToolTip = 'Specifies the total amount on the payment line in LCY.'; + Visible = false; + } + field("Account Type"; Rec."Account Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of account that the payment line will be posted to.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the account that the entry on the journal line will be posted to.'; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date on the entry.'; + } + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment class used when creating this payment slip line.'; + } + field("Status Name"; Rec."Status Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status of the payment.'; + } + field("Status No."; Rec."Status No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status line entry number.'; + Visible = false; + } + field("Acceptation Code"; Rec."Acceptation Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies an acceptation code for the payment line.'; + } + field("Drawee Reference"; Rec."Drawee Reference") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the file reference which will be used in the electronic payment (ETEBAC) file.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the bank account as entered in the Bank Account Code field.'; + Visible = false; + } + field("Bank Branch No."; Rec."Bank Branch No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the branch number of the bank account.'; + Visible = false; + } + field("Agency Code"; Rec."Agency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the agency code of the bank account.'; + Visible = false; + } + field(IBAN; Rec.IBAN) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.'; + } + field("SWIFT Code"; Rec."SWIFT Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank identification code for the payment slip.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the customer or vendor bank account that you want to perform the payment to, or collection from.'; + Visible = false; + } + field("RIB Key"; Rec."RIB Key") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.'; + Visible = false; + } + field("Payment in Progress"; Rec."Payment in Progress") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies whether the payment line is taken into account for the customer or vendor payments in progress.'; + Visible = false; + } + } + } + } + + actions + { + area(navigation) + { + group("F&unctions") + { + Caption = '&Payment'; + action(Card) + { + ApplicationArea = Basic, Suite; + Caption = 'Card'; + Image = EditLines; + ShortCutKey = 'Shift+F7'; + ToolTip = 'Open the card for the entity on the selected line to view more details.'; + + trigger OnAction() + var + Statement: Record "Payment Header FR"; + StatementForm: Page "Payment Slip FR"; + begin + if Statement.Get(Rec."No.") then begin + Statement.SetRange("No.", Rec."No."); + StatementForm.SetTableView(Statement); + StatementForm.Run(); + end; + end; + } + } + } + area(processing) + { + group("F&unctions2") + { + Caption = 'F&unctions'; + Image = "Action"; + action(Modify) + { + ApplicationArea = Basic, Suite; + Caption = 'Modify'; + Image = EditFilter; + ToolTip = 'View and edit line information for payments and collections.'; + + trigger OnAction() + var + PaymentLine: Record "Payment Line FR"; + Consult: Page "Payment Line Modification FR"; + begin + PaymentLine.Copy(Rec); + PaymentLine.SetRange("No.", Rec."No."); + PaymentLine.SetRange("Line No.", Rec."Line No."); + Consult.SetTableView(PaymentLine); + Consult.RunModal(); + end; + } + } + } + } + + trigger OnQueryClosePage(CloseAction: Action): Boolean + begin + if CloseAction = ACTION::LookupOK then + LookupOKOnPush(); + end; + + var + Steps: Integer; + PayNum: Code[20]; + + + procedure SetSteps(Step: Integer) + begin + Steps := Step; + end; + + + procedure SetNumBor(N: Code[20]) + begin + PayNum := N; + end; + + + procedure GetNumBor() N: Code[20] + begin + N := PayNum; + end; + + local procedure LookupOKOnPush() + var + StatementLine: Record "Payment Line FR"; + PostingStatement: Codeunit "Payment Management FR"; + begin + CurrPage.SetSelectionFilter(StatementLine); + PostingStatement.CopyLigBor(StatementLine, Steps, PayNum); + CurrPage.Close(); + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentReportFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentReportFR.Page.al new file mode 100644 index 0000000000..6040dc4b40 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentReportFR.Page.al @@ -0,0 +1,71 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10841 "Payment Report FR" +{ + Caption = 'Payment Report'; + Editable = false; + PageType = List; + SourceTable = "Payment Status FR"; + SourceTableView = where(ReportMenu = const(true)); + UsageCategory = Lists; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = All; + ToolTip = 'Specifies the payment class.'; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies text to describe the payment status.'; + } + } + } + } + + actions + { + area(processing) + { + action(OK) + { + ApplicationArea = Basic, Suite; + Caption = '&Print'; + Image = Print; + ToolTip = 'Prepare to print the document. A report request window for the document opens where you can specify what to include on the print-out.'; + + trigger OnAction() + var + PaymentLine: Record "Payment Line FR"; + begin + PaymentLine.SetRange("Payment Class", Rec."Payment Class"); + PaymentLine.SetRange("Status No.", Rec.Line); + REPORT.RunModal(REPORT::"Payment List FR", true, true, PaymentLine); + end; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(OK_Promoted; OK) + { + } + } + } + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipArchiveFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipArchiveFR.Page.al new file mode 100644 index 0000000000..0320bf801c --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipArchiveFR.Page.al @@ -0,0 +1,188 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Foundation.Navigate; + +page 10842 "Payment Slip Archive FR" +{ + Caption = 'Payment Slip Archive'; + Editable = false; + PageType = Document; + SourceTable = "Payment Header Archive FR"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("No."; Rec."No.") + { + ApplicationArea = All; + AssistEdit = false; + ToolTip = 'Specifies the number of the payment slip.'; + } + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = Basic, Suite; + Lookup = false; + ToolTip = 'Specifies the payment class used when creating this payment slip.'; + } + field("Payment Class Name"; Rec."Payment Class Name") + { + ApplicationArea = Basic, Suite; + DrillDown = false; + Importance = Promoted; + ToolTip = 'Specifies the name of the payment class used.'; + } + field("Status Name"; Rec."Status Name") + { + ApplicationArea = Basic, Suite; + DrillDown = false; + Importance = Promoted; + ToolTip = 'Specifies the status of the payment.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code of the payment.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the date when the payment slip was posted.'; + } + field("Document Date"; Rec."Document Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date when the payment slip was created.'; + + trigger OnValidate() + begin + DocumentDateOnAfterValidate(); + end; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + AutoFormatType = 1; + ToolTip = 'Specifies the sum of the amounts in the Amount (LCY) fields on the associated lines.'; + } + } + part(Lines; "Payment Slip Subform ArchiveFR") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + } + group(Posting) + { + Caption = 'Posting'; + field("Source Code"; Rec."Source Code") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the source of the entry.'; + } + field("Shortcut Dimension 1 Code"; Rec."Shortcut Dimension 1 Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the dimension value code with which the payment is associated.'; + } + field("Shortcut Dimension 2 Code"; Rec."Shortcut Dimension 2 Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the dimension value code with which the invoice is associated.'; + } + field("Account Type"; Rec."Account Type") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the type of the account that the payments have been transferred to/from.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the number of the account that the payments have been transferred to/from.'; + } + } + } + } + + actions + { + area(navigation) + { + group("&Header") + { + Caption = '&Header'; + Image = DepositSlip; + action(Dimensions) + { + ApplicationArea = Basic, Suite; + Caption = 'Dimensions'; + Image = Dimensions; + ToolTip = 'View or change the dimension settings for this payment slip. If you change the dimension, you can update all lines on the payment slip.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + action("Header RIB") + { + ApplicationArea = Basic, Suite; + Caption = 'Header RIB'; + Image = Check; + RunObject = Page "Payment Bank Archive FR"; + RunPageLink = "No." = field("No."); + ToolTip = 'View the RIB key that is associated with the bank account.'; + } + } + group("&Navigate") + { + Caption = '&Navigate'; + action(Header) + { + ApplicationArea = Basic, Suite; + Caption = 'Header'; + Image = DepositSlip; + ToolTip = 'View general information about archived payments or collections, for example, to and from customers and vendors. A payment header has one or more payment lines assigned to it. The lines contain information such as the amount, the bank details, and the due date.'; + + trigger OnAction() + begin + Navigate.SetDoc(Rec."Posting Date", Rec."No."); + Navigate.Run(); + end; + } + action(Line) + { + ApplicationArea = Basic, Suite; + Caption = 'Line'; + Image = Line; + ToolTip = 'View the ledger entry line information for the archived payment slips.'; + + trigger OnAction() + begin + CurrPage.Lines.PAGE.NavigateLine(Rec."Posting Date"); + end; + } + } + } + } + + var + Navigate: Page Navigate; + + local procedure DocumentDateOnAfterValidate() + begin + CurrPage.Update(); + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipFR.Page.al new file mode 100644 index 0000000000..8d5a675952 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipFR.Page.al @@ -0,0 +1,396 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.Currency; +using Microsoft.Foundation.Navigate; +using Microsoft.Sales.Customer; +using System.Telemetry; + +page 10843 "Payment Slip FR" +{ + Caption = 'Payment Slip'; + PageType = Document; + RefreshOnActivate = true; + SourceTable = "Payment Header FR"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("No."; Rec."No.") + { + ApplicationArea = Basic, Suite; + AssistEdit = false; + ToolTip = 'Specifies the number of the payment header.'; + + trigger OnAssistEdit() + begin + if Rec.AssistEdit(xRec) then + CurrPage.Update(); + end; + } + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = Basic, Suite; + Editable = false; + Lookup = false; + ToolTip = 'Specifies the payment class used when creating this payment slip.'; + } + field("Payment Class Name"; Rec."Payment Class Name") + { + ApplicationArea = Basic, Suite; + DrillDown = false; + Editable = false; + Importance = Promoted; + ToolTip = 'Specifies the name of the payment class used.'; + } + field("Status Name"; Rec."Status Name") + { + ApplicationArea = Basic, Suite; + DrillDown = false; + Editable = false; + Importance = Promoted; + ToolTip = 'Specifies the status the payment is in.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code to be used on the payment lines.'; + + trigger OnAssistEdit() + begin + ChangeExchangeRate.SetParameter(Rec."Currency Code", Rec."Currency Factor", Rec."Posting Date"); + if ChangeExchangeRate.RunModal() = ACTION::OK then begin + Rec.Validate("Currency Factor", ChangeExchangeRate.GetParameter()); + CurrPage.Update(); + end; + Clear(ChangeExchangeRate); + end; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the date when the payment slip should be posted.'; + } + field("Document Date"; Rec."Document Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date when you create the payment slip.'; + + trigger OnValidate() + begin + DocumentDateOnAfterValidate(); + end; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + AutoFormatType = 1; + ToolTip = 'Specifies the sum of the amounts in the Amount (LCY) fields on the associated lines.'; + } + field("Partner Type"; Rec."Partner Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if the payment slip is a person or company.'; + } + } + part(Lines; "Payment Slip Subform FR") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + } + group(Posting) + { + Caption = 'Posting'; + field("Source Code"; Rec."Source Code") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the source of the payment slip.'; + } + field("Shortcut Dimension 1 Code"; Rec."Shortcut Dimension 1 Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the dimension value code that the payment header will be associated with.'; + } + field("Shortcut Dimension 2 Code"; Rec."Shortcut Dimension 2 Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the dimension value code associated with the payment header.'; + } + field("Account Type"; Rec."Account Type") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the type of account that payments will be transferred to/from.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the number of the account that the payments will be transferred to/from.'; + } + } + } + area(factboxes) + { + part("Payment Journal Errors"; "Payment Journal Errors Part") + { + ApplicationArea = Basic, Suite; + Caption = 'File Export Errors'; + Provider = Lines; + SubPageLink = "Document No." = field("No."), + "Journal Line No." = field("Line No."), + "Journal Template Name" = const(''), + "Journal Batch Name" = const('10865'); + } + } + } + + actions + { + area(navigation) + { + group("&Header") + { + Caption = '&Header'; + Image = DepositSlip; + action(Dimensions) + { + ApplicationArea = Basic, Suite; + Caption = 'Dimensions'; + Image = Dimensions; + ToolTip = 'View or change the dimension settings for this payment slip. If you change the dimension, you can update all lines on the payment slip.'; + + trigger OnAction() + begin + Rec.ShowDocDim(); + CurrPage.SaveRecord(); + end; + } + action("Header RIB") + { + ApplicationArea = Basic, Suite; + Caption = 'Header RIB'; + Image = Check; + RunObject = Page "Payment Bank FR"; + RunPageLink = "No." = field("No."); + ToolTip = 'View the RIB key that is associated with the bank account.'; + } + } + group("&Navigate") + { + Caption = '&Navigate'; + action(Header) + { + ApplicationArea = Basic, Suite; + Caption = 'Header'; + Image = DepositSlip; + ToolTip = 'View general information about payments or collections, for example, to and from customers and vendors. A payment header has one or more payment lines assigned to it. The lines contain information such as the amount, the bank details, and the due date.'; + + trigger OnAction() + begin + Navigate.SetDoc(Rec."Posting Date", Rec."No."); + Navigate.Run(); + end; + } + action(Line) + { + ApplicationArea = Basic, Suite; + Caption = 'Line'; + Image = Line; + ToolTip = 'Create a new payment line for the payment slip.'; + + trigger OnAction() + begin + CurrPage.Lines.PAGE.NavigateLine(Rec."Posting Date"); + end; + } + } + } + area(processing) + { + group("F&unctions") + { + Caption = 'F&unctions'; + Image = "Action"; + action(SuggestVendorPayments) + { + ApplicationArea = Basic, Suite; + Caption = 'Suggest &Vendor Payments'; + Image = SuggestVendorPayments; + ToolTip = 'Process open vendor ledger entries (entries that result from posting invoices, finance charge memos, credit memos, and payments) to create a payment suggestion as lines in a payment slip. '; + + trigger OnAction() + var + PaymentClass: Record "Payment Class FR"; + CreateVendorPmtSuggestion: Report "Suggest Vend. Payments"; + begin + if Rec."Status No." <> 0 then + Message(Text003Lbl) + else + if PaymentClass.Get(Rec."Payment Class") then + if PaymentClass.Suggestions = PaymentClass.Suggestions::Vendor then begin + CreateVendorPmtSuggestion.SetGenPayLine(Rec); + CreateVendorPmtSuggestion.RunModal(); + Clear(CreateVendorPmtSuggestion); + end else + Message(Text001Lbl); + end; + } + action(SuggestCustomerPayments) + { + ApplicationArea = Basic, Suite; + Caption = 'Suggest &Customer Payments'; + Image = SuggestCustomerPayments; + ToolTip = 'Process open customer ledger entries (entries that result from posting invoices, finance charge memos, credit memos, and payments) to create a payment suggestion as lines in a payment slip.'; + + trigger OnAction() + var + Customer: Record Customer; + PaymentClass: Record "Payment Class FR"; + CreateCustomerPmtSuggestion: Report "Suggest Cust. Payments"; + begin + if Rec."Status No." <> 0 then + Message(Text003Lbl) + else + if PaymentClass.Get(Rec."Payment Class") then + if PaymentClass.Suggestions = PaymentClass.Suggestions::Customer then begin + CreateCustomerPmtSuggestion.SetGenPayLine(Rec); + Customer.SetRange("Partner Type", Rec."Partner Type"); + CreateCustomerPmtSuggestion.SetTableView(Customer); + CreateCustomerPmtSuggestion.RunModal(); + Clear(CreateCustomerPmtSuggestion); + end else + Message(Text002Lbl); + end; + } + separator(Action1120052) + { + } + action(Archive) + { + ApplicationArea = Basic, Suite; + Caption = 'Archive'; + Image = Archive; + ToolTip = 'Archive the payment slip to separate it from active entries.'; + + trigger OnAction() + var + PaymentMgt: Codeunit "Payment Management FR"; + begin + if Rec."No." = '' then + exit; + if not Confirm(Text009Lbl) then + exit; + PaymentMgt.ArchiveDocument(Rec); + end; + } + } + group("P&osting") + { + Caption = 'P&osting'; + Image = Post; + action(GenerateFile) + { + ApplicationArea = Basic, Suite; + Caption = 'Generate file'; + Image = CreateDocument; + ToolTip = 'Generate an XML or an XMLport file that you can send to your bank. This requires that File is chosen in the Action Type field for the payment slip setup. '; + + trigger OnAction() + var + PaymentMgt: Codeunit "Payment Management FR"; + begin + FeatureTelemetry.LogUptake('1000HP2', FRPaymentSlipTok, Enum::"Feature Uptake Status"::"Used"); + PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::File); + PaymentMgt.ProcessPaymentSteps(Rec, PaymentStep); + FeatureTelemetry.LogUsage('1000HP3', FRPaymentSlipTok, 'FR Payment Slips File Created'); + end; + } + action(Post) + { + ApplicationArea = Basic, Suite; + Caption = 'Post'; + Image = Post; + ToolTip = 'Post the payment.'; + + trigger OnAction() + var + PaymentMgt: Codeunit "Payment Management FR"; + begin + PaymentStep.SetFilter( + "Action Type", + '%1|%2|%3', + PaymentStep."Action Type"::None, PaymentStep."Action Type"::Ledger, PaymentStep."Action Type"::"Cancel File"); + PaymentMgt.ProcessPaymentSteps(Rec, PaymentStep); + end; + } + action(Print) + { + ApplicationArea = Basic, Suite; + Caption = 'Print'; + Image = Print; + ToolTip = 'Print the payment slip.'; + + trigger OnAction() + var + PaymentMgt: Codeunit "Payment Management FR"; + begin + CurrPage.Lines.PAGE.MarkLines(true); + PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::Report); + PaymentMgt.ProcessPaymentSteps(Rec, PaymentStep); + CurrPage.Lines.PAGE.MarkLines(false); + end; + } + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(Post_Promoted; Post) + { + } + actionref(SuggestVendorPayments_Promoted; SuggestVendorPayments) + { + } + actionref(SuggestCustomerPayments_Promoted; SuggestCustomerPayments) + { + } + } + } + } + + trigger OnAfterGetRecord() + begin + CurrPage.Lines.PAGE.Editable(true); + end; + + var + PaymentStep: Record "Payment Step FR"; + FeatureTelemetry: Codeunit "Feature Telemetry"; + ChangeExchangeRate: Page "Change Exchange Rate"; + Navigate: Page Navigate; + Text001Lbl: Label 'This payment class does not authorize vendor suggestions.'; + Text002Lbl: Label 'This payment class does not authorize customer suggestions.'; + Text003Lbl: Label 'You cannot suggest payments on a posted header.'; + Text009Lbl: Label 'Do you want to archive this document?'; + FRPaymentSlipTok: Label 'FR Create Payment Slips', Locked = true; + + local procedure DocumentDateOnAfterValidate() + begin + CurrPage.Update(); + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListArchiveFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListArchiveFR.Page.al new file mode 100644 index 0000000000..85453fd37f --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListArchiveFR.Page.al @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10845 "Payment Slip List Archive FR" +{ + ApplicationArea = Basic, Suite; + Caption = 'Payment Slip Archive'; + CardPageID = "Payment Slip Archive FR"; + Editable = false; + PageType = List; + SourceTable = "Payment Header Archive FR"; + UsageCategory = History; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of the payment slip.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code of the payment.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date when the payment slip was posted.'; + } + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment class used when creating this payment slip.'; + } + field("Status Name"; Rec."Status Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status of the payment.'; + } + } + } + } + + actions + { + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListFR.Page.al new file mode 100644 index 0000000000..b0575e2d2a --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListFR.Page.al @@ -0,0 +1,78 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using System.Telemetry; + +page 10846 "Payment Slip List FR" +{ + ApplicationArea = Basic, Suite; + Caption = 'Payment Slips'; + CardPageID = "Payment Slip FR"; + Editable = false; + PageType = List; + SourceTable = "Payment Header FR"; + UsageCategory = Lists; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of the payment header.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code to be used on the payment lines.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date when the payment slip should be posted.'; + } + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment class used when creating this payment slip.'; + } + field("Status Name"; Rec."Status Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status the payment is in.'; + } + } + } + } + + actions + { + area(creation) + { + action("Create Payment Slip") + { + ApplicationArea = Basic, Suite; + Caption = 'Create Payment Slip'; + Image = NewDocument; + RunObject = Codeunit "Payment Management FR"; + ToolTip = 'Manage information about customer and vendor payments.'; + } + } + } + + trigger OnOpenPage() + var + FeatureTelemetry: Codeunit "Feature Telemetry"; + FRPaymentSlipTok: Label 'FR Create Payment Slips', Locked = true; + begin + FeatureTelemetry.LogUptake('1000HP0', FRPaymentSlipTok, Enum::"Feature Uptake Status"::Discovered); + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformArchiveFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformArchiveFR.Page.al new file mode 100644 index 0000000000..95fdf4d45e --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformArchiveFR.Page.al @@ -0,0 +1,227 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Foundation.Navigate; + +page 10847 "Payment Slip Subform ArchiveFR" +{ + Caption = 'Lines'; + Editable = false; + PageType = ListPart; + SourceTable = "Payment Line Archive FR"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Account Type"; Rec."Account Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account type of the archived payment line.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account number of the archived payment line.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the document number that is related to the payment slip.'; + } + field("External Document No."; Rec."External Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the document number of the archived payment that refers to the customer''s or vendor''s numbering system.'; + } + field("Drawee Reference"; Rec."Drawee Reference") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the file reference which has been used in the electronic payment (ETEBAC) file.'; + } + field("Posting Group"; Rec."Posting Group") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the posting group associated with the account of the archived payment line.'; + Visible = false; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of the archived payment line.'; + } + field("Debit Amount"; Rec."Debit Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the debit amount of the archived payment line.'; + } + field("Credit Amount"; Rec."Credit Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the credit amount of the archived payment line.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + ToolTip = 'Specifies the amount (including VAT) of the archived payment line.'; + } + field("Bank Account Code"; Rec."Bank Account Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the bank account code that is related to the payment slip.'; + } + field("Acceptation Code"; Rec."Acceptation Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the acception code of the archived payment.'; + } + field("Payment Address Code"; Rec."Payment Address Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code of the payment address of the archived payment.'; + } + field("Bank Branch No."; Rec."Bank Branch No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the branch number of the bank account as entered in the Bank Account field.'; + } + field("Agency Code"; Rec."Agency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the agency code of the bank account as entered in the Bank Account field.'; + } + field(IBAN; Rec.IBAN) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.'; + } + field("SWIFT Code"; Rec."SWIFT Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the international bank identification code for the payment slip.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the customer or vendor bank account of the archived payment.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the bank account, as entered in the Bank Account field.'; + } + field("Bank City"; Rec."Bank City") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the city of the bank account.'; + Visible = false; + } + field("RIB Key"; Rec."RIB Key") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.'; + } + field("RIB Checked"; Rec."RIB Checked") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the key entered in the RIB Key field is correct.'; + } + } + } + } + + actions + { + area(processing) + { + group("A&ccount") + { + Caption = 'A&ccount'; + Image = ChartOfAccounts; + action(Card) + { + ApplicationArea = Basic, Suite; + Caption = 'Card'; + Image = EditLines; + ShortCutKey = 'Shift+F7'; + ToolTip = 'Open the card for the entity on the selected line to view more details.'; + + trigger OnAction() + begin + ShowAccount(); + end; + } + action("Ledger E&ntries") + { + ApplicationArea = Basic, Suite; + Image = LedgerEntries; + Caption = 'Ledger E&ntries'; + ShortCutKey = 'Ctrl+F7'; + ToolTip = 'View details about ledger entries for the vendor account.'; + + trigger OnAction() + begin + ShowEntries(); + end; + } + } + group("&Line") + { + Caption = '&Line'; + Image = Line; + action(Dimensions) + { + ApplicationArea = Basic, Suite; + Caption = 'Dimensions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or change the dimension settings for this payment slip. If you change the dimension, you can update all lines on the payment slip.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + } + } + } + + var + Navigate: Page Navigate; + + + procedure ShowAccount() + var + GenJnlLine: Record "Gen. Journal Line"; + begin + GenJnlLine."Account Type" := Rec."Account Type"; + GenJnlLine."Account No." := Rec."Account No."; + CODEUNIT.Run(CODEUNIT::"Gen. Jnl.-Show Card", GenJnlLine); + end; + + + procedure ShowEntries() + var + GenJnlLine: Record "Gen. Journal Line"; + begin + GenJnlLine."Account Type" := Rec."Account Type"; + GenJnlLine."Account No." := Rec."Account No."; + CODEUNIT.Run(CODEUNIT::"Gen. Jnl.-Show Entries", GenJnlLine); + end; + + + procedure NavigateLine(PostingDate: Date) + begin + Navigate.SetDoc(PostingDate, Rec."Document No."); + Navigate.Run(); + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformFR.Page.al new file mode 100644 index 0000000000..161921c73e --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformFR.Page.al @@ -0,0 +1,481 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Foundation.Navigate; + +page 10848 "Payment Slip Subform FR" +{ + AutoSplitKey = true; + Caption = 'Lines'; + DelayedInsert = true; + PageType = ListPart; + SourceTable = "Payment Line FR"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Account Type"; Rec."Account Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of account that the payment line will be posted to.'; + + trigger OnValidate() + begin + BankInfoEditable := IsBankInfoEditable(); + end; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + Style = Strong; + StyleExpr = AccountNoEmphasize; + ToolTip = 'Specifies the number of the account that the entry on the journal line will be posted to.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a document number for the payment line.'; + } + field("External Document No."; Rec."External Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a document number that refers to the customer''s or vendor''s numbering system.'; + Visible = false; + } + field("Drawee Reference"; Rec."Drawee Reference") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the file reference which will be used in the electronic payment (ETEBAC) file.'; + } + field("Posting Group"; Rec."Posting Group") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the posting group associated with the account.'; + Visible = false; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date on the entry.'; + } + field("Debit Amount"; Rec."Debit Amount") + { + ApplicationArea = All; + ToolTip = 'Specifies the total amount (including VAT) of the payment line, if it is a debit amount.'; + Visible = DebitAmountVisible; + } + field("Credit Amount"; Rec."Credit Amount") + { + ApplicationArea = All; + ToolTip = 'Specifies the total amount (including VAT) of the payment line, if it is a credit amount.'; + Visible = CreditAmountVisible; + } + field(Amount; Rec.Amount) + { + ApplicationArea = All; + ToolTip = 'Specifies the total amount (including VAT) of the payment line.'; + Visible = AmountVisible; + AutoFormatType = 1; + } + field(IBAN; Rec.IBAN) + { + ApplicationArea = Basic, Suite; + Editable = BankInfoEditable; + ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.'; + } + field("SWIFT Code"; Rec."SWIFT Code") + { + ApplicationArea = Basic, Suite; + Editable = BankInfoEditable; + ToolTip = 'Specifies the international bank identification code for the payment slip.'; + } + field("Bank Account Code"; Rec."Bank Account Code") + { + ApplicationArea = All; + ToolTip = 'Specifies the code of the customer or vendor bank account that you want to perform the payment to, or collection from.'; + Visible = BankAccountCodeVisible; + } + field("Acceptation Code"; Rec."Acceptation Code") + { + ApplicationArea = All; + ToolTip = 'Specifies an acceptation code for the payment line.'; + Visible = AcceptationCodeVisible; + } + field("Payment Address Code"; Rec."Payment Address Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a code for the payment address of the customer or vendor.'; + } + field("Bank Branch No."; Rec."Bank Branch No.") + { + ApplicationArea = All; + Editable = BankInfoEditable; + ToolTip = 'Specifies the branch number of the bank account.'; + Visible = RIBVisible; + } + field("Agency Code"; Rec."Agency Code") + { + ApplicationArea = All; + Editable = BankInfoEditable; + ToolTip = 'Specifies the agency code of the bank account.'; + Visible = RIBVisible; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = All; + Editable = BankInfoEditable; + ToolTip = 'Specifies the number of the customer or vendor bank account that you want to perform the payment to, or collection from.'; + Visible = RIBVisible; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = All; + Editable = BankInfoEditable; + ToolTip = 'Specifies the name of the bank account as entered in the Bank Account Code field.'; + Visible = RIBVisible; + } + field("Bank City"; Rec."Bank City") + { + ApplicationArea = Basic, Suite; + Editable = BankInfoEditable; + ToolTip = 'Specifies the city of the bank account.'; + Visible = false; + } + field("RIB Key"; Rec."RIB Key") + { + ApplicationArea = All; + Editable = BankInfoEditable; + ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.'; + Visible = RIBVisible; + } + field("RIB Checked"; Rec."RIB Checked") + { + ApplicationArea = All; + ToolTip = 'Specifies that the key entered in the RIB Key field is correct.'; + Visible = RIBVisible; + } + field("Has Payment Export Error"; Rec."Has Payment Export Error") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that an error occurred when you used the Export Payments to File function in the Payment Slip window.'; + } + field("Direct Debit Mandate ID"; Rec."Direct Debit Mandate ID") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the direct debit mandate of the customer who made this payment.'; + } + } + } + } + + actions + { + area(processing) + { + group("F&unctions") + { + Caption = 'F&unctions'; + Image = "Action"; + action("Set Document ID") + { + ApplicationArea = Basic, Suite; + Caption = 'Set Document ID'; + Image = Documents; + ToolTip = 'Fill in the document number of the entry in the payment slip.'; + + trigger OnAction() + begin + SetDocumentID(); + end; + } + } + group("&Line") + { + Caption = '&Line'; + Image = Line; + action(Application) + { + ApplicationArea = Basic, Suite; + Caption = '&Application'; + ShortCutKey = 'Shift+F11'; + Image = ApplicationWorksheet; + ToolTip = 'Apply the customer or vendor payment on the selected payment slip line.'; + + trigger OnAction() + begin + ApplyPayment(); + end; + } + action(Dimensions) + { + ApplicationArea = Basic, Suite; + Caption = 'Dimensions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or change the dimension settings for this payment slip. If you change the dimension, you can update all lines on the payment slip.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + action(Modify) + { + ApplicationArea = Basic, Suite; + Caption = 'Modify'; + Image = EditFilter; + ToolTip = 'View and edit information in the document associated with the line on the payment slip.'; + + trigger OnAction() + begin + OnModify(); + end; + } + action(Insert) + { + ApplicationArea = Basic, Suite; + Image = Insert; + Caption = 'Insert'; + ToolTip = 'Insert the payment line.'; + + trigger OnAction() + begin + OnInsert(); + end; + } + action(Remove) + { + ApplicationArea = Basic, Suite; + Caption = 'Remove'; + Image = Cancel; + ToolTip = 'Remove the payment line.'; + + trigger OnAction() + begin + OnDelete(); + end; + } + group("A&ccount") + { + Caption = 'A&ccount'; + Image = ChartOfAccounts; + action(Card) + { + ApplicationArea = Basic, Suite; + Caption = 'Card'; + Image = EditLines; + ShortCutKey = 'Shift+F7'; + ToolTip = 'Open the card for the entity on the selected line to view more details.'; + + trigger OnAction() + begin + ShowAccount(); + end; + } + action("Ledger E&ntries") + { + ApplicationArea = Basic, Suite; + Caption = 'Ledger E&ntries'; + ShortCutKey = 'Ctrl+F7'; + Image = LedgerEntries; + ToolTip = 'View details about ledger entries for the vendor account.'; + + trigger OnAction() + begin + ShowEntries(); + end; + } + } + } + } + } + + trigger OnAfterGetRecord() + begin + ActivateControls(); + BankInfoEditable := IsBankInfoEditable(); + AccountNoEmphasize := Rec."Copied To No." <> ''; + end; + + trigger OnInit() + begin + BankAccountCodeVisible := true; + CreditAmountVisible := true; + DebitAmountVisible := true; + AmountVisible := true; + AcceptationCodeVisible := true; + RIBVisible := true; + end; + + trigger OnNewRecord(BelowxRec: Boolean) + begin + Rec.SetUpNewLine(xRec, BelowxRec); + end; + + var + Header: Record "Payment Header FR"; + Status: Record "Payment Status FR"; + Navigate: Page Navigate; + Text000Lbl: Label 'Assign No. ?'; + Text001Lbl: Label 'There is no line to modify.'; + Text002Lbl: Label 'A posted line cannot be modified.'; + Text003Lbl: Label 'You cannot assign numbers to a posted header.'; + AccountNoEmphasize: Boolean; + AcceptationCodeVisible: Boolean; + AmountVisible: Boolean; + BankAccountCodeVisible: Boolean; + BankInfoEditable: Boolean; + CreditAmountVisible: Boolean; + DebitAmountVisible: Boolean; + RIBVisible: Boolean; + + local procedure ApplyPayment() + begin + CODEUNIT.Run(CODEUNIT::"Payment-Apply FR", Rec); + end; + + local procedure DisableFields() + begin + if Header.Get(Rec."No.") then + CurrPage.Editable((Header."Status No." = 0) and (Rec."Copied To No." = '')); + end; + + local procedure OnModify() + var + PaymentLine: Record "Payment Line FR"; + PaymentModification: Page "Payment Line Modification FR"; + begin + if Rec."Line No." = 0 then + Message(Text001Lbl) + else + if not Rec.Posted then begin + PaymentLine.Copy(Rec); + PaymentLine.SetRange("No.", Rec."No."); + PaymentLine.SetRange("Line No.", Rec."Line No."); + PaymentModification.SetTableView(PaymentLine); + PaymentModification.RunModal(); + end else + Message(Text002Lbl); + end; + + local procedure OnInsert() + var + PaymentManagement: Codeunit "Payment Management FR"; + begin + PaymentManagement.LinesInsert(Rec."No."); + end; + + local procedure OnDelete() + var + StatementLine: Record "Payment Line FR"; + PostingStatement: Codeunit "Payment Management FR"; + begin + StatementLine.Copy(Rec); + CurrPage.SetSelectionFilter(StatementLine); + PostingStatement.DeleteLigBorCopy(StatementLine); + end; + + local procedure SetDocumentID() + var + StatementLine: Record "Payment Line FR"; + No: Code[20]; + begin + if Rec."Status No." <> 0 then begin + Message(Text003Lbl); + exit; + end; + if Confirm(Text000Lbl) then begin + CurrPage.SetSelectionFilter(StatementLine); + StatementLine.MarkedOnly(true); + if not StatementLine.Find('-') then + StatementLine.MarkedOnly(false); + if StatementLine.Find('-') then begin + No := StatementLine."Document No."; + while StatementLine.Next() <> 0 do begin + No := IncStr(No); + StatementLine."Document No." := No; + StatementLine.Modify(); + end; + end; + end; + end; + + local procedure ShowAccount() + var + GenJnlLine: Record "Gen. Journal Line"; + begin + GenJnlLine."Account Type" := Rec."Account Type"; + GenJnlLine."Account No." := Rec."Account No."; + CODEUNIT.Run(CODEUNIT::"Gen. Jnl.-Show Card", GenJnlLine); + end; + + local procedure ShowEntries() + var + GenJnlLine: Record "Gen. Journal Line"; + begin + GenJnlLine."Account Type" := Rec."Account Type"; + GenJnlLine."Account No." := Rec."Account No."; + CODEUNIT.Run(CODEUNIT::"Gen. Jnl.-Show Entries", GenJnlLine); + end; + + + procedure MarkLines(ToMark: Boolean) + var + LineCopy: Record "Payment Line FR"; + NumLines: Integer; + begin + if ToMark then begin + CurrPage.SetSelectionFilter(LineCopy); + NumLines := LineCopy.Count(); + if NumLines > 0 then begin + LineCopy.Find('-'); + repeat + LineCopy.Marked := true; + LineCopy.Modify(); + until LineCopy.Next() = 0; + end else + LineCopy.Reset(); + LineCopy.SetRange("No.", Rec."No."); + LineCopy.ModifyAll(Marked, true); + end else begin + LineCopy.SetRange("No.", Rec."No."); + LineCopy.ModifyAll(Marked, false); + end; + Commit(); + end; + + local procedure ActivateControls() + begin + if Header.Get(Rec."No.") then begin + Status.Get(Header."Payment Class", Header."Status No."); + RIBVisible := Status.RIB; + AcceptationCodeVisible := Status."Acceptation Code"; + AmountVisible := Status.Amount; + DebitAmountVisible := Status.Debit; + CreditAmountVisible := Status.Credit; + BankAccountCodeVisible := Status."Bank Account"; + DisableFields(); + end; + end; + + + procedure NavigateLine(PostingDate: Date) + begin + Navigate.SetDoc(PostingDate, Rec."Document No."); + Navigate.Run(); + end; + + local procedure IsBankInfoEditable(): Boolean + begin + exit(not (Rec."Account Type" in [Rec."Account Type"::Customer, Rec."Account Type"::Vendor])); + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusFR.Page.al new file mode 100644 index 0000000000..69b0956b62 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusFR.Page.al @@ -0,0 +1,85 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10849 "Payment Status FR" +{ + AutoSplitKey = true; + Caption = 'Payment Status'; + DelayedInsert = true; + PageType = List; + SourceTable = "Payment Status FR"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies text to describe the payment status.'; + } + field(RIB; Rec.RIB) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies all information involving the bank identifier (RIB) statement of the customer or vendor be displayed on the payment lines.'; + } + field(Look; Rec.Look) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that lines of payment documents with this status may be looked up and edited through the View/Edit Payment Line window.'; + } + field(ReportMenu; Rec.ReportMenu) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that documents with this status may be printed.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the amount will displayed on the payment lines.'; + } + field(Debit; Rec.Debit) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the debit amount will displayed on the payment lines.'; + } + field(Credit; Rec.Credit) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the credit amount will displayed on the payment lines.'; + } + field("Bank Account"; Rec."Bank Account") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the bank account code will displayed on the payment lines.'; + } + field("Payment in Progress"; Rec."Payment in Progress") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the program will take into account all billing and payment lines with this status, when calculating the payments in progress.'; + } + field("Archiving Authorized"; Rec."Archiving Authorized") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the payment header with this status can be archived.'; + } + field(AcceptationCode; Rec."Acceptation Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the acceptation code will displayed on the payment lines.'; + } + } + } + } + + actions + { + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusListFR.Page.al new file mode 100644 index 0000000000..ddc9f9162b --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusListFR.Page.al @@ -0,0 +1,74 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10850 "Payment Status List FR" +{ + AutoSplitKey = true; + Caption = 'Payment Status List'; + PageType = List; + SourceTable = "Payment Status FR"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies text to describe the payment status.'; + } + field(Look; Rec.Look) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that lines of payment documents with this status may be looked up and edited through the View/Edit Payment Line window.'; + } + field(ReportMenu; Rec.ReportMenu) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that documents with this status may be printed.'; + } + field(RIB; Rec.RIB) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies all information involving the bank identifier (RIB) statement of the customer or vendor be displayed on the payment lines.'; + } + field("Acceptation Code"; Rec."Acceptation Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the acceptation code will displayed on the payment lines.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the amount will displayed on the payment lines.'; + } + field(Debit; Rec.Debit) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the debit amount will displayed on the payment lines.'; + } + field(Credit; Rec.Credit) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the credit amount will displayed on the payment lines.'; + } + field("Payment in Progress"; Rec."Payment in Progress") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if you want to take into account all billing and payment lines with this status, when calculating the payments in progress.'; + } + } + } + } + + actions + { + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepCardFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepCardFR.Page.al new file mode 100644 index 0000000000..71e29063d4 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepCardFR.Page.al @@ -0,0 +1,271 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10851 "Payment Step Card FR" +{ + Caption = 'Payment Step Card'; + PageType = Card; + RefreshOnActivate = true; + SourceTable = "Payment Step FR"; + + layout + { + area(content) + { + group(Control1) + { + ShowCaption = false; + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the payment class.'; + } + field(Line; Rec.Line) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the step line''s entry number.'; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies text to describe the payment step.'; + } + field("Previous Status"; Rec."Previous Status") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status from which this step should start executing.'; + + trigger OnValidate() + begin + Rec.CalcFields("Previous Status Name"); + end; + } + field("Previous Status Name"; Rec."Previous Status Name") + { + ApplicationArea = Basic, Suite; + DrillDown = false; + Editable = false; + ToolTip = 'Specifies the name of the status selected in the Previous Status field.'; + } + field("Next Status"; Rec."Next Status") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status on which this step should end.'; + + trigger OnValidate() + begin + Rec.CalcFields("Next Status Name"); + end; + } + field("Next Status Name"; Rec."Next Status Name") + { + ApplicationArea = Basic, Suite; + DrillDown = false; + Editable = false; + ToolTip = 'Specifies the name of the status selected in the Next Status field.'; + } + field("Action Type"; Rec."Action Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of action to be performed by this step.'; + + trigger OnValidate() + begin + DisableFields(); + end; + } + field("Report No."; Rec."Report No.") + { + ApplicationArea = Basic, Suite; + Enabled = ReportNoEnable; + ToolTip = 'Specifies the ID for the report used, when Action Type is set to Report.'; + } + field("Export Type"; Rec."Export Type") + { + ApplicationArea = Basic, Suite; + Enabled = ExportTypeEnable; + ToolTip = 'Specifies the method that is used to export files.'; + } + field("Export No."; Rec."Export No.") + { + ApplicationArea = Basic, Suite; + Enabled = ExportNoEnable; + ToolTip = 'Specifies the ID code for the selected export type.'; + } + field("Verify Lines RIB"; Rec."Verify Lines RIB") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the RIB of the header on the payment slip lines has been properly reported.'; + } + field("Verify Due Date"; Rec."Verify Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the due date on the billing and payment lines has been properly reported.'; + } + field("Source Code"; Rec."Source Code") + { + ApplicationArea = Basic, Suite; + Enabled = SourceCodeEnable; + ToolTip = 'Specifies the source code linked to the payment step.'; + } + field("Reason Code"; Rec."Reason Code") + { + ApplicationArea = Basic, Suite; + Enabled = ReasonCodeEnable; + ToolTip = 'Specifies the reason code linked to the payment step.'; + } + field("Header Nos. Series"; Rec."Header Nos. Series") + { + ApplicationArea = Basic, Suite; + Enabled = HeaderNosSeriesEnable; + ToolTip = 'Specifies the code used to assign numbers to the header of a new payment slip.'; + } + field(Correction; Rec.Correction) + { + ApplicationArea = Basic, Suite; + Enabled = CorrectionEnable; + ToolTip = 'Specifies you want the payment entries to pass as corrections.'; + } + field("Realize VAT"; Rec."Realize VAT") + { + ApplicationArea = Basic, Suite; + Enabled = RealizeVATEnable; + ToolTip = 'Specifies that the unrealized VAT should be reversed and the VAT should be declared.'; + } + field("Verify Header RIB"; Rec."Verify Header RIB") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the RIB on the payment slip header has been properly reported.'; + } + field("Acceptation Code<>No"; Rec."Acceptation Code<>No") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the acceptation code on each payment line is not No.'; + } + } + } + } + + actions + { + area(navigation) + { + group("Payment Step") + { + Caption = 'Payment Step'; + Image = Installments; + action(Ledger) + { + ApplicationArea = Basic, Suite; + Caption = 'Ledger'; + Image = Ledger; + RunObject = Page "Payment Step Ledger List FR"; + RunPageLink = "Payment Class" = field("Payment Class"), + Line = field(Line); + ToolTip = 'View and edit the list of payment steps for posting debit and credit entries to the general ledger.'; + } + } + } + } + + trigger OnAfterGetRecord() + begin + DisableFields(); + end; + + trigger OnInit() + begin + CorrectionEnable := true; + HeaderNosSeriesEnable := true; + SourceCodeEnable := true; + ReasonCodeEnable := true; + ExportNoEnable := true; + ExportTypeEnable := true; + ReportNoEnable := true; + end; + + var + PaymentClass: Record "Payment Class FR"; + ReportNoEnable: Boolean; + ExportTypeEnable: Boolean; + ExportNoEnable: Boolean; + ReasonCodeEnable: Boolean; + SourceCodeEnable: Boolean; + HeaderNosSeriesEnable: Boolean; + CorrectionEnable: Boolean; + RealizeVATEnable: Boolean; + + + procedure DisableFields() + begin + case Rec."Action Type" of + Rec."Action Type"::None: + begin + ReportNoEnable := false; + ExportTypeEnable := false; + ExportNoEnable := false; + ReasonCodeEnable := false; + SourceCodeEnable := false; + HeaderNosSeriesEnable := false; + CorrectionEnable := false; + RealizeVATEnable := false; + end; + + Rec."Action Type"::Ledger: + begin + ReportNoEnable := false; + ExportTypeEnable := false; + ExportNoEnable := false; + ReasonCodeEnable := true; + SourceCodeEnable := true; + HeaderNosSeriesEnable := false; + CorrectionEnable := true; + PaymentClass.Get(Rec."Payment Class"); + RealizeVATEnable := + (PaymentClass."Unrealized VAT Reversal" = PaymentClass."Unrealized VAT Reversal"::Delayed); + end; + + Rec."Action Type"::Report: + begin + ReportNoEnable := true; + ExportTypeEnable := false; + ExportNoEnable := false; + ReasonCodeEnable := false; + SourceCodeEnable := false; + HeaderNosSeriesEnable := false; + CorrectionEnable := false; + RealizeVATEnable := false; + end; + + Rec."Action Type"::File: + begin + ReportNoEnable := false; + ExportTypeEnable := true; + ExportNoEnable := true; + ReasonCodeEnable := false; + SourceCodeEnable := false; + HeaderNosSeriesEnable := false; + CorrectionEnable := false; + RealizeVATEnable := false; + end; + + Rec."Action Type"::"Create New Document": + begin + ReportNoEnable := false; + ExportTypeEnable := false; + ExportNoEnable := false; + ReasonCodeEnable := false; + SourceCodeEnable := false; + HeaderNosSeriesEnable := true; + CorrectionEnable := false; + RealizeVATEnable := false; + end; + end; + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerFR.Page.al new file mode 100644 index 0000000000..61a0f14969 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerFR.Page.al @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10852 "Payment Step Ledger FR" +{ + Caption = 'Payment Step Ledger'; + PageType = Card; + SourceTable = "Payment Step Ledger FR"; + + layout + { + area(content) + { + group(Control1) + { + ShowCaption = false; + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = Basic, Suite; + Enabled = false; + ToolTip = 'Specifies the payment class.'; + } + field(Line; Rec.Line) + { + ApplicationArea = Basic, Suite; + Enabled = false; + ToolTip = 'Specifies the ledger line''s entry number.'; + } + field(Sign; Rec.Sign) + { + ApplicationArea = Basic, Suite; + Enabled = SignEnable; + ToolTip = 'Specifies if the posting will result in a debit or credit entry.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a description to be used on the general ledger entry.'; + } + field("Accounting Type"; Rec."Accounting Type") + { + ApplicationArea = Basic, Suite; + Enabled = AccountingTypeEnable; + ToolTip = 'Specifies the type of account to post the entry to.'; + + trigger OnValidate() + begin + DisableFields(); + end; + } + field("Account Type"; Rec."Account Type") + { + ApplicationArea = Basic, Suite; + Enabled = AccountTypeEnable; + ToolTip = 'Specifies the type of account to post the entry to.'; + + trigger OnValidate() + begin + DisableFields(); + end; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + Enabled = AccountNoEnable; + ToolTip = 'Specifies the account number to post the entry to.'; + + trigger OnValidate() + begin + DisableFields(); + end; + } + field("Customer Posting Group"; Rec."Customer Posting Group") + { + ApplicationArea = Basic, Suite; + Enabled = CustomerPostingGroupEnable; + ToolTip = 'Specifies a code for the customer posting group used when the entry is posted.'; + + trigger OnValidate() + begin + DisableFields(); + end; + } + field("Vendor Posting Group"; Rec."Vendor Posting Group") + { + ApplicationArea = Basic, Suite; + Enabled = VendorPostingGroupEnable; + ToolTip = 'Specifies a code for the vendor posting group used when the entry is posted.'; + + trigger OnValidate() + begin + DisableFields(); + end; + } + field(Root; Rec.Root) + { + ApplicationArea = Basic, Suite; + Enabled = RootEnable; + ToolTip = 'Specifies the root for the G/L accounts group used, when you have selected either G/L Account / Month, or G/L Account / Week.'; + + trigger OnValidate() + begin + DisableFields(); + end; + } + field("Memorize Entry"; Rec."Memorize Entry") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that entries created in this step will be memorized, so the next application can be performed against newly posted entries.'; + + trigger OnValidate() + begin + DisableFields(); + end; + } + field(Application; Rec.Application) + { + ApplicationArea = Basic, Suite; + Enabled = ApplicationEnable; + ToolTip = 'Specifies how to apply entries.'; + + trigger OnValidate() + begin + DisableFields(); + end; + } + field("Detail Level"; Rec."Detail Level") + { + ApplicationArea = Basic, Suite; + Enabled = DetailLevelEnable; + ToolTip = 'Specifies how payment lines will be posted.'; + + trigger OnValidate() + begin + DisableFields(); + end; + } + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document that will be assigned to the ledger entry.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the method to assign a document number to the ledger entry.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + DisableFields(); + end; + + trigger OnInit() + begin + DetailLevelEnable := true; + RootEnable := true; + VendorPostingGroupEnable := true; + CustomerPostingGroupEnable := true; + AccountNoEnable := true; + AccountTypeEnable := true; + ApplicationEnable := true; + SignEnable := true; + AccountingTypeEnable := true; + end; + + var + AccountingTypeEnable: Boolean; + SignEnable: Boolean; + ApplicationEnable: Boolean; + AccountTypeEnable: Boolean; + AccountNoEnable: Boolean; + CustomerPostingGroupEnable: Boolean; + VendorPostingGroupEnable: Boolean; + RootEnable: Boolean; + DetailLevelEnable: Boolean; + + + procedure DisableFields() + begin + AccountingTypeEnable := true; + SignEnable := true; + ApplicationEnable := true; + + case Rec."Accounting Type" of + Rec."Accounting Type"::"Setup Account": + begin + AccountTypeEnable := true; + AccountNoEnable := true; + RootEnable := false; + + case Rec."Account Type" of + Rec."Account Type"::Customer: + begin + CustomerPostingGroupEnable := true; + VendorPostingGroupEnable := false; + end; + Rec."Account Type"::Vendor: + begin + CustomerPostingGroupEnable := false; + VendorPostingGroupEnable := true; + end; + else begin + CustomerPostingGroupEnable := false; + VendorPostingGroupEnable := false; + end; + end; + end; + + Rec."Accounting Type"::"G/L Account / Month", + Rec."Accounting Type"::"G/L Account / Week": + begin + AccountTypeEnable := false; + AccountNoEnable := false; + RootEnable := true; + CustomerPostingGroupEnable := false; + VendorPostingGroupEnable := false; + end; + + Rec."Accounting Type"::"Bal. Account Previous Entry": + begin + AccountTypeEnable := false; + AccountNoEnable := false; + RootEnable := false; + CustomerPostingGroupEnable := false; + VendorPostingGroupEnable := false; + end; + + else begin + AccountTypeEnable := false; + AccountNoEnable := false; + RootEnable := false; + CustomerPostingGroupEnable := true; + VendorPostingGroupEnable := true; + end; + end; + + if Rec."Memorize Entry" or (Rec.Application <> Rec.Application::None) then begin + Rec."Detail Level" := Rec."Detail Level"::Line; + DetailLevelEnable := false; + end else + DetailLevelEnable := true; + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerListFR.Page.al new file mode 100644 index 0000000000..5350c79e6d --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerListFR.Page.al @@ -0,0 +1,105 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10853 "Payment Step Ledger List FR" +{ + Caption = 'Payment Step Ledger List'; + CardPageID = "Payment Step Ledger FR"; + Editable = false; + PageType = List; + SourceTable = "Payment Step Ledger FR"; + + layout + { + area(content) + { + repeater(Control1120000) + { + ShowCaption = false; + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment class.'; + } + field(Line; Rec.Line) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the ledger line''s entry number.'; + } + field(Sign; Rec.Sign) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if the posting will result in a debit or credit entry.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a description to be used on the general ledger entry.'; + } + field("Accounting Type"; Rec."Accounting Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of account to post the entry to.'; + } + field("Account Type"; Rec."Account Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of account to post the entry to.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account number to post the entry to.'; + } + field("Customer Posting Group"; Rec."Customer Posting Group") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a code for the customer posting group used when the entry is posted.'; + } + field("Vendor Posting Group"; Rec."Vendor Posting Group") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a code for the vendor posting group used when the entry is posted.'; + } + field(Root; Rec.Root) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the root for the G/L accounts group used, when you have selected either G/L Account / Month, or G/L Account / Week.'; + } + field("Detail Level"; Rec."Detail Level") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies how payment lines will be posted.'; + } + field(Application; Rec.Application) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies how to apply entries.'; + } + field("Memorize Entry"; Rec."Memorize Entry") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that entries created in this step will be memorized, so the next application can be performed against newly posted entries.'; + } + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document that will be assigned to the ledger entry.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the method to assign a document number to the ledger entry.'; + } + } + } + } + + actions + { + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsFR.Page.al new file mode 100644 index 0000000000..fdd4e26e8f --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsFR.Page.al @@ -0,0 +1,37 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10854 "Payment Steps FR" +{ + AutoSplitKey = true; + Caption = 'Payment Step'; + CardPageID = "Payment Step Card FR"; + DataCaptionFields = "Payment Class"; + DelayedInsert = true; + PageType = List; + SourceTable = "Payment Step FR"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies text to describe the payment step.'; + } + } + } + } + + actions + { + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsListFR.Page.al new file mode 100644 index 0000000000..a21f1f8266 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsListFR.Page.al @@ -0,0 +1,58 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10855 "Payment Steps List FR" +{ + Caption = 'Payment Steps List'; + PageType = List; + SourceTable = "Payment Step FR"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment class.'; + } + field(Line; Rec.Line) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the step line''s entry number.'; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies text to describe the payment step.'; + } + field("Previous Status"; Rec."Previous Status") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status from which this step should start executing.'; + } + field("Next Status"; Rec."Next Status") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status on which this step should end.'; + } + field("Action Type"; Rec."Action Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of action to be performed by this step.'; + } + } + } + } + + actions + { + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/ViewEditPaymentLineFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/ViewEditPaymentLineFR.Page.al new file mode 100644 index 0000000000..a682668d9a --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Pages/ViewEditPaymentLineFR.Page.al @@ -0,0 +1,66 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +page 10857 "View/Edit Payment Line FR" +{ + Caption = 'View/Edit Payment Lines'; + Editable = false; + PageType = List; + SourceTable = "Payment Status FR"; + SourceTableView = where(Look = const(true)); + UsageCategory = Lists; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Payment Class"; Rec."Payment Class") + { + ApplicationArea = All; + ToolTip = 'Specifies the payment class.'; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies text to describe the payment status.'; + } + } + } + } + + actions + { + area(processing) + { + action("Payment Lines List") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Lines List'; + Image = ListPage; + RunObject = Page "Payment Lines List FR"; + RunPageLink = "Payment Class" = field("Payment Class"), + "Status No." = field(Line), + "Copied To No." = filter(''); + ToolTip = 'View line information for payments and collections.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("Payment Lines List_Promoted"; "Payment Lines List") + { + } + } + } + } +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/ArchivePaymentSlipsFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/ArchivePaymentSlipsFR.Report.al new file mode 100644 index 0000000000..5ac567a4ba --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/ArchivePaymentSlipsFR.Report.al @@ -0,0 +1,72 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +report 10831 "Archive Payment Slips FR" +{ + ApplicationArea = Basic, Suite; + Caption = 'Archive Payment Slips'; + ProcessingOnly = true; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem("Payment Header"; "Payment Header FR") + { + CalcFields = "Archiving Authorized"; + DataItemTableView = sorting("No."); + RequestFilterFields = "No.", "Payment Class"; + + trigger OnAfterGetRecord() + begin + if "Archiving Authorized" then begin + PaymentManagement.ArchiveDocument("Payment Header"); + ArchivedDocs += 1; + end; + end; + } + } + + requestpage + { + + layout + { + } + + actions + { + } + } + + labels + { + } + + trigger OnPostReport() + begin + case ArchivedDocs of + 0: + Message(Text002Lbl); + 1: + Message(Text003Lbl); + else + Message(Text001Lbl, ArchivedDocs); + end; + end; + + trigger OnPreReport() + begin + ArchivedDocs := 0; + end; + + var + PaymentManagement: Codeunit "Payment Management FR"; + ArchivedDocs: Integer; + Text001Lbl: Label '%1 Payment Headers have been archived.', Comment = '%1 = Document'; + Text002Lbl: Label 'There is no Payment Header to archive.'; + Text003Lbl: Label 'One Payment Header has been archived.'; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Bill.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Bill.rdlc new file mode 100644 index 0000000000..8c1fb0a5f5 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Bill.rdlc @@ -0,0 +1,2583 @@ + + + 0 + + + + SQL + + + None + c4ea1258-4911-4efd-a67f-8354d713e966 + + + + + + + + + + + 0.20372in + + + 0.3937in + + + 0.41432in + + + 0.17123in + + + 0.11811in + + + 0.87489in + + + 0.29621in + + + 0.49994in + + + 0.49994in + + + 1.12486in + + + 0.99987in + + + 2.22962in + + + + + 0.16654in + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + true + + + + + =Parameters!Against_this_BILL_noted_as_NO_CHARGES_please_pay_the_indicated_sum_below_for_order_ofCaption.Value + + + + + + 3 + true + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!BILLCaption.Value + + + + + + + 68 + + + + + + + + 0.16654in + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + true + + + + + + + + + + + 3 + + + + + + + + true + + + + + + + + 2 + + + + + + + 0.16654in + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + true + + + + + + + + + + + 3 + + + + + + + + true + + + + + + + + 2 + + + + + + + 0.16654in + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + true + + + + + + + + + + + 3 + + + + + + + + true + + + + + + + + 2 + + + + + + + 0.33307in + + + + + true + + + + + + + + 12 + + + + + + + + + + + + + + + + + 0.16732in + + + + + true + + + + + =Fields!TOCaption.Value + + + + + + + + + + + true + + + + + =Fields!IssueCity.Value + + + + + + + 55 + + + 5 + + + + + + + + + + true + + + + + =Fields!ONCaption.Value + + + + + + + + + + + true + + + + + =Fields!IssueDate.Value + + + + + + + 53 + + + 3 + + + + + + + + true + + + + + + + + 2 + + + + + + + 0.16654in + + + + + true + + + + + =Fields!AMOUNT_FOR_CONTROLCaption.Value + + + + + + + 51 + + + 5 + + + + + + + + + + true + + + + + =Fields!CREATION_DATECaption.Value + + + + + + + 50 + + + 2 + + + + + + + true + + + + + =Fields!DUE_DATECaption.Value + + + + + + + 49 + + + 2 + + + + + + + true + + + + + =Fields!DRAWEE_REF_Caption.Value + + + + + + + 48 + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!FORMAT_AmountText_.Value + + + + + + + 46 + + + + + + + + 0.16732in + + + + + true + true + + + + + =Fields!FORMAT_Amount_0___Precision_2___Standard_Format_0___.Value + + + + + + + 45 + + + 5 + + + + + + + + + + true + + + + + =Fields!PostingDate.Value + + + + + + 2 + + + + + + + true + + + + + =Fields!Payment_Line__Due_Date_.Value + + + + + + 2 + + + + + + + true + + + + + =Fields!Payment_Line__Drawee_Reference_.Value + + + + + + + 42 + + + + + + + + true + + + + + + + + + + + + + true + true + + + + + =Fields!FORMAT_Amount_0___Precision_2___Standard_Format_0___.Value + + + + + + + 40 + + + + + + + + 0.33307in + + + + + true + + + + + + + + + + + + textbox31 + 39 + + + 12 + + + + + + + + + + + + + + + + + 0.16654in + + + + + true + + + + + + + + 3 + + + + + + + + true + + + + + =Fields!DRAWEE_R_I_B_Caption.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + 5 + + + + + + + + + + true + + + + + =Fields!DOMICILIATIONCaption.Value + + + + + + + + + + + 0.16654in + + + + + true + + + + + =Fields!Payment_Line__Bank_Branch_No__.Value + + + + + + 2 + + + + + + + true + + + + + =Fields!Payment_Line__Agency_Code_.Value + + + + + + 2 + + + + + + + true + + + + + =Fields!Payment_Line__Bank_Account_No__.Value + + + + + + 3 + + + + + + + + true + + + + + =Fields!CONVERTSTR_FORMAT__RIB_Key__2_______0__.Value + + + + + + + + + + + true + + + + + + + + + + + 3 + + + + + + + + true + + + + + =Fields!Payment_Line__Bank_Account_Name_.Value + + + + + + + + + + + 0.16654in + + + + + true + + + + + + + + 11 + + + + + + + + + + + + + + + + true + + + + + =Fields!Payment_Line__Bank_City_.Value + + + + + + + + + + + 0.16732in + + + + + true + + + + + =Fields!Value_in__Caption.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + 3 + + + + + + + + true + + + + + =Fields!NAME_andCaption.Value + + + + + + + 23 + + + 2 + + + + + + + true + + + + + =Fields!CustAdr_1_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.16732in + + + + + true + + + + + + + + 6 + + + + + + + + + + + true + + + + + =Fields!ADDRESSCaption.Value + + + + + + + 19 + + + 2 + + + + + + + true + + + + + =Fields!CustAdr_2_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.16732in + + + + + true + + + + + + + + 6 + + + + + + + + + + + true + + + + + =Fields!of_DRAWEECaption.Value + + + + + + + 15 + + + 2 + + + + + + + true + + + + + =Fields!CustAdr_3_.Value + + + + + + 3 + + + + + + + + true + + + + + =Fields!Stamp_Allow_and_SignatureCaption.Value + + + + + + + + + + + 0.16732in + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + true + + + + + =Fields!CustAdr_4_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.16732in + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + true + + + + + =Fields!CustAdr_5_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.16732in + + + + + true + + + + + =Fields!ACCEPTANCE_or_ENDORSMENTCaption.Value + + + + + + 6 + + + + + + + + + + + true + + + + + + + + 2 + + + + + + + true + + + + + =Fields!CustAdr_6_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.16732in + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + true + + + + + =Fields!CustAdr_7_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =Fields!Payment_Line_No_.Value + =Fields!Payment_Line_Line_No_.Value + + + End + + + + + + Detail + + + + + + + + + + + + + + + + + + + + + + + Detail_Collection + Output + true + + + + + + DataSet_Result + 8.90102cm + 19.87908cm + + + 7 + + + + + + + + + + + + true + true + + + + + =Parameters!Against_the_present_DRAFT_noted_as_NO_CHARGES__we_will_pay_the_indicated_sum_below_toCaption.Value + + + + + + 3 + true + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!DRAFTCaption.Value + + + + + + + 70 + + + + + + + + 0.16654in + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + true + + + + + + + + + + + 3 + + + + + + + + true + + + + + + + + 2 + + + + + + + 0.16654in + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + true + + + + + + + + + + + 3 + + + + + + + + true + + + + + + + + 2 + + + + + + + 0.16654in + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + true + + + + + + + + + + + 3 + + + + + + + + true + + + + + + + + 2 + + + + + + + 0.16654in + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + true + + + + + + + + + + + 3 + + + + + + + + true + + + + + + + + 2 + + + + + + + 0.16654in + + + + + true + + + + + + + + 12 + + + + + + + + + + + + + + + + + 0.16732in + + + + + true + + + + + =Fields!TOCaption.Value + + + + + + + + + + + true + + + + + =Fields!IssueCity.Value + + + + + + + 55 + + + 5 + + + + + + + + + + true + + + + + =Fields!ONCaption.Value + + + + + + + + + + + true + + + + + =Fields!IssueDate.Value + + + + + + + 53 + + + 3 + + + + + + + + true + + + + + + + + 2 + + + + + + + 0.16654in + + + + + true + + + + + =Fields!AMOUNT_FOR_CONTROLCaption.Value + + + + + + + 51 + + + 5 + + + + + + + + + + true + + + + + =Fields!CREATION_DATECaption.Value + + + + + + + 50 + + + 2 + + + + + + + true + + + + + =Fields!DUE_DATECaption.Value + + + + + + + 49 + + + 2 + + + + + + + true + + + + + =Fields!SUBSCRIBER_REF_Caption.Value + + + + + + + 48 + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!AmountText.Value + + + + + + + 46 + + + + + + + + 0.16654in + + + + + true + + + + + =Fields!FORMAT_Amount_0___Precision_2___Standard_Format_0___.Value + + + + + + + 45 + + + 5 + + + + + + + + + + true + + + + + =Fields!PostingDate.Value + + + + + + + 44 + + + 2 + + + + + + + true + + + + + =Fields!Payment_Line__Due_Date_.Value + + + + + + 2 + + + + + + + true + + + + + =Fields!BillReference.Value + + + + + + + 42 + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!FORMAT_Amount_0___Precision_2___Standard_Format_0___.Value + + + + + + + 40 + + + + + + + + 0.16654in + + + + + true + + + + + + + + + + + + 39 + + + 12 + + + + + + + + + + + + + + + + + 0.16654in + + + + + true + + + + + + + + + + + + 38 + + + 12 + + + + + + + + + + + + + + + + + 0.16654in + + + + + true + + + + + + + + 3 + + + + + + + + true + + + + + =Fields!SUBSCRIBER_S_R_I_B_Caption.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + 5 + + + + + + + + + + true + + + + + =Fields!DOMICILIATIONCaption.Value + + + + + + + + + + + 0.16654in + + + + + true + + + + + =Fields!PaymtHeader__Bank_Branch_No__.Value + + + + + + 2 + + + + + + + true + + + + + =Fields!PaymtHeader__Agency_Code_.Value + + + + + + 2 + + + + + + + true + + + + + =Fields!PaymtHeader__Bank_Account_No__.Value + + + + + + 3 + + + + + + + + true + + + + + =Fields!CONVERTSTR_FORMAT_PaymtHeader__RIB_Key__2_______0__.Value + + + + + + + + + + + true + + + + + + + + 3 + + + + + + + + true + + + + + =Fields!PaymtHeader__Bank_Name_.Value + + + + + + + + + + + 0.16654in + + + + + true + + + + + + + + 11 + + + + + + + + + + + + + + + + true + + + + + =Fields!PaymtHeader__Bank_Post_Code_.Value + + + + + + + 26 + + + + + + + + 0.16654in + + + + + true + + + + + =Fields!Value_in__Caption.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + 2 + + + + + + + true + + + + + =Fields!NAME_andCaption.Value + + + + + + + 23 + + + 3 + + + + + + + + true + + + + + =Fields!CompanyAddr_1_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.16654in + + + + + true + + + + + + + + 5 + + + + + + + + + + true + + + + + =Fields!ADDRESSCaption.Value + + + + + + + 19 + + + 3 + + + + + + + + true + + + + + =Fields!CompanyAddr_2_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.16654in + + + + + true + + + + + + + + 5 + + + + + + + + + + true + + + + + =Fields!of_SUBSCRIBERCaption.Value + + + + + + + 15 + + + 3 + + + + + + + + true + + + + + =Fields!CompanyAddr_3_.Value + + + + + + 3 + + + + + + + + true + + + + + =Fields!Stamp_Allow_and_SignatureCaption.Value + + + + + + + + + + + 0.16654in + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + true + + + + + =Fields!CompanyAddr_4_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.16654in + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + true + + + + + =Fields!CompanyAddr_5_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.16654in + + + + + true + + + + + =Fields!OK_FOR_ENDORSMENTCaption.Value + + + + + + 4 + + + + + + + + + true + + + + + + + + + + + 4 + + + + + + + + + true + + + + + =Fields!CompanyAddr_6_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.16654in + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + true + + + + + =Fields!CompanyAddr_7_.Value + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =Fields!Payment_Line_No_.Value + =Fields!Payment_Line_Line_No_.Value + + + End + + + + + + Detail + + + + + + + + + + + + + + + + + + + + + + + + + Detail_Collection + Output + true + + + + + + DataSet_Result + 8.88522cm + 19.87908cm + + + 5 + + + + + + + + + + true + + + + + =First(Fields!STRSUBSTNO_Text002_CopyText_.Value) + + + + + + 92 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + + textbox205 + 88 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_1_.Value) + + + + + + 87 + + + 3 + + + + + + + + true + + + + + + + + + + + textbox200 + 86 + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_2_.Value) + + + + + + 85 + + + 3 + + + + + + + + true + + + + + + + + + + + textbox102 + 84 + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_3_.Value) + + + + + + 83 + + + 3 + + + + + + + + true + + + + + + + + + + + textbox94 + 82 + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_4_.Value) + + + + + + 81 + + + 3 + + + + + + + + true + + + + + + + + + + + textbox86 + 80 + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_5_.Value) + + + + + + 79 + + + 3 + + + + + + + + true + + + + + + + + + + + textbox78 + 78 + + + 2 + + + + + + + true + + + + + =First(Fields!VendAddr_1_.Value) + + + + + + 77 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_6_.Value) + + + + + + 76 + + + 3 + + + + + + + + true + + + + + + + + + + + textbox70 + 75 + + + 2 + + + + + + + true + + + + + =First(Fields!VendAddr_2_.Value) + + + + + + 74 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyInformation__Phone_No__Caption.Value) + + + + + + 73 + + + + + + + + true + + + + + =First(Fields!CompanyInformation__Phone_No__.Value) + + + + + + 72 + + + 2 + + + + + + + true + + + + + + + + + + + textbox62 + 71 + + + 2 + + + + + + + true + + + + + =First(Fields!VendAddr_3_.Value) + + + + + + 70 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyInformation__Fax_No__Caption.Value) + + + + + + 69 + + + + + + + + true + + + + + =First(Fields!CompanyInformation__Fax_No__.Value) + + + + + + 68 + + + 2 + + + + + + + true + + + + + + + + + + + textbox54 + 67 + + + 2 + + + + + + + true + + + + + =First(Fields!VendAddr_4_.Value) + + + + + + 66 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyInformation__VAT_Registration_No__Caption.Value) + + + + + + 65 + + + + + + + + true + + + + + =First(Fields!CompanyInformation__VAT_Registration_No__.Value) + + + + + + 64 + + + 2 + + + + + + + true + + + + + + + + + + + textbox46 + 63 + + + 2 + + + + + + + true + + + + + =First(Fields!VendAddr_5_.Value) + + + + + + 62 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + + textbox27 + 61 + + + 5 + + + + + + + + + + true + + + + + =First(Fields!VendAddr_6_.Value) + + + + + + 60 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!PaymtHeader__SWIFT_Code__Caption.Value) + + + + + + 59 + + + 2 + + + + + + + true + + + + + =First(Fields!PaymtHeader_SWIFT_Code.Value) + + + + + + + 58 + + + + + + + + true + + + + + + + + + + + textbox280 + 57 + + + 2 + + + + + + + true + + + + + =First(Fields!VendAddr_7_.Value) + + + + + + 56 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!PaymtHeader__IBAN__Caption.Value) + + + + + + 52 + + + 2 + + + + + + + true + + + + + =First(Fields!PaymtHeader_IBAN.Value) + + + + + + + 51 + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox286 + 49 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!Payment_Lines1___No__Caption.Value) + + + + + + 48 + + + 2 + + + + + + + true + + + + + =First(Fields!Payment_Lines1___No__.Value) + + + + + + + 47 + + + + + + + + true + + + + + + + + + + + textbox22 + 46 + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!PrintCurrencyCodeCaption.Value) + + + + + + 45 + + + 2 + + + + + + + true + + + + + =First(Fields!PrintCurrencyCode.Value) + + + + + + + 44 + + + + + + + + true + + + + + + + + + + + textbox5 + 43 + + + 4 + + + + + + + + + true + + + + + =First(Fields!FORMAT_PostingDate_0_4_.Value) + + + + + + + 42 + + + 2 + + + + + + + true + + + + + + + + + + + + textbox9 + 41 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox67 + 40 + + + 10 + + + + + + + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!HeaderText1.Value) + + + + + + 39 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox43 + 38 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Payment_Line__Document_No__.Value + + + + + + + 37 + + + + + + + + true + + + + + =Fields!PaymtHeader__Payment_Class_Name_.Value + + + + + + 36 + + + 2 + + + + + + + true + + + + + =Fields!Payment_Line__External_Document_No__.Value + + + + + + + 35 + + + + + + + + true + + + + + =Fields!PostingDate.Value + + + + + + 34 + + + 2 + + + + + + + true + + + + + =Fields!Payment_Line__Due_Date_.Value + + + + + + 33 + + + 2 + + + + + + + true + true + + + + + =Fields!ABS_Amount_.Value + + + + + + 32 + + + + + + + + true + + + + + =Fields!PrintCurrencyCode.Value + + + + + + + 31 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox3 + 30 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!HeaderText2.Value) + + + + + + 29 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox16 + 28 + + + 10 + + + + + + + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!Vendor_Ledger_Entry__Document_No__Caption.Value) + + + + + + 27 + + + + + + + + true + + + + + =First(Fields!Vendor_Ledger_Entry_DescriptionCaption.Value) + + + + + + 26 + + + 2 + + + + + + + true + + + + + =First(Fields!Vendor_Ledger_Entry__External_Document_No__Caption.Value) + + + + + + 25 + + + + + + + + true + + + + + =First(Fields!Vendor_Ledger_Entry__Posting_Date_Caption.Value) + + + + + + + 24 + + + 2 + + + + + + + true + + + + + =First(Fields!Vendor_Ledger_Entry__Due_Date_Caption.Value) + + + + + + + 23 + + + 2 + + + + + + + true + + + + + =First(Fields!ABS__Remaining_Amount___Control1120059Caption.Value) + + + + + + + 22 + + + 2 + + + + + + + 0.423cm + + + + + true + + + + + + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Vendor_Ledger_Entry__Document_No__.Value + + + + + + + 13 + + + + + + + + true + + + + + =Fields!Vendor_Ledger_Entry_Description.Value + + + + + + 12 + + + 2 + + + + + + + true + + + + + =Fields!Vendor_Ledger_Entry__External_Document_No__.Value + + + + + + + 11 + + + + + + + + true + + + + + =Fields!Vendor_Ledger_Entry__Posting_Date_.Value + + + + + + 10 + + + 2 + + + + + + + true + + + + + =Fields!Vendor_Ledger_Entry__Due_Date_.Value + + + + + + 9 + + + 2 + + + + + + + true + true + + + + + =Fields!ABS__Remaining_Amount__.Value + + + + + + 8 + + + + + + + + true + + + + + =Fields!Vendor_Ledger_Entry__Currency_Code_.Value + + + + + + + 7 + + + + + + + + 0.423cm + + + + + true + + + + + + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + 1 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!Draft_Notice_AmountCaption.Value) + + + + + + 5 + + + 3 + + + + + + + + true + + + + + + + + 5 + + + + + + + + + + true + true + + + + + =Last(Fields!TotalDraftAmount.Value) + + + + + + 3 + + + + + + + + true + + + + + =First(Fields!PrintCurrencyCode.Value) + + + + + + + 2 + + + + + + + + 0.846cm + + + + + true + + + + + + + + + + + 6 + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =1 + + + Between + + + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + + + =Fields!Payment_Line_No_.Value + =Fields!Payment_Line_Line_No_.Value + + + + + After + true + + + + =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE) + + After + true + + + + =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE) + + After + true + + + + =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE) + + After + true + + + + =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE) + + After + true + + + + =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE) + + After + true + + + + Detail + + + + + =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE) + + + + + =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE) + + + + Detail_Collection + Output + true + + + + + Before + true + + + Before + true + + + Before + true + + + + + + DataSet_Result + + + true + + + + + + + + + + + + + + + + + + =Fields!Vendor__No__.Value + =Fields!CopyLoop_Number.Value + =Fields!Bank_Account_Buffer___Customer_No__.Value + =Fields!Bank_Account_Buffer___Bank_Branch_No__.Value + =Fields!Bank_Account_Buffer___Agency_Code_.Value + =Fields!Bank_Account_Buffer___Bank_Account_No__.Value + =Fields!Payment_Line_Payment_Address_Code.Value + + + Output + true + + + + DataSet_Result + + + =IsNothing(Fields!STRSUBSTNO_Text002_CopyText_.Value) + Equal + + =false + + + + + + 14.382cm + + 16.35cm + + + 0.423cm + true + true + + + true + + + + + =Globals!PageNumber + + + + + + 10.05cm + 0.423cm + 1.68cm + + + + + + + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + + =User!Language + true + Cm + b87ff072-faf0-434b-be65-900eb0f1d3f9 + + + + + Payment_Lines1_No_ + + + Payment_Lines1_Line_No_ + + + Vendor_No_ + + + Bank_Account_Buffer_Customer_No_ + + + Bank_Account_Buffer_Bank_Branch_No_ + + + Bank_Account_Buffer_Agency_Code + + + Bank_Account_Buffer_Bank_Account_No_ + + + FORMAT_PostingDate_0_4_ + + + Payment_Lines1___No__ + + + PaymtHeader_IBAN + + + VendAddr_7_ + + + PaymtHeader_SWIFT_Code + + + VendAddr_6_ + + + CompanyInformation__VAT_Registration_No__ + + + VendAddr_5_ + + + CompanyInformation__Fax_No__ + + + VendAddr_4_ + + + CompanyInformation__Phone_No__ + + + VendAddr_3_ + + + CompanyAddr_6_ + + + VendAddr_2_ + + + CompanyAddr_5_ + + + VendAddr_1_ + + + CompanyAddr_4_ + + + CompanyAddr_3_ + + + CompanyAddr_2_ + + + CompanyAddr_1_ + + + STRSUBSTNO_Text002_CopyText_ + + + PrintCurrencyCode + + + OutputNo + + + Vendor__No__ + + + CopyLoop_Number + + + Bank_Account_Buffer___Agency_Code_ + + + Bank_Account_Buffer___Customer_No__ + + + Bank_Account_Buffer___Bank_Branch_No__ + + + Bank_Account_Buffer___Bank_Account_No__ + + + HeaderText1 + + + PrintCurrencyCode_Control1120069 + + + ABS_Amount_ + + + ABS_Amount_Format + + + Payment_Line__Due_Date_ + + + PostingDate + + + Payment_Line__External_Document_No__ + + + PaymtHeader__Payment_Class_Name_ + + + Payment_Line__Document_No__ + + + PrintCurrencyCode_Control1120064 + + + DraftAmount + + + DraftAmountFormat + + + TotalDraftAmount + + + TotalDraftAmountFormat + + + Payment_Line_No_ + + + Payment_Line_Line_No_ + + + Payment_Line_Payment_Address_Code + + + Payment_Line_Account_No_ + + + Payment_Line_Bank_Branch_No_ + + + Payment_Line_Agency_Code + + + Payment_Line_Bank_Account_No_ + + + Payment_Line_Applies_to_ID + + + Payment_Lines1___No__Caption + + + PaymtHeader__IBAN__Caption + + + PaymtHeader__SWIFT_Code__Caption + + + CompanyInformation__VAT_Registration_No__Caption + + + CompanyInformation__Fax_No__Caption + + + CompanyInformation__Phone_No__Caption + + + PrintCurrencyCodeCaption + + + Draft_Notice_AmountCaption + + + HeaderText2 + + + ABS__Remaining_Amount__ + + + ABS__Remaining_Amount__Format + + + PrintCurrencyCode_Control1120060 + + + Vendor_Ledger_Entry__Currency_Code_ + + + ABS__Remaining_Amount___Control1120059 + + + ABS__Remaining_Amount___Control1120059Format + + + Vendor_Ledger_Entry__Document_No__ + + + Vendor_Ledger_Entry_Description + + + Vendor_Ledger_Entry__External_Document_No__ + + + Vendor_Ledger_Entry__Posting_Date_ + + + Vendor_Ledger_Entry__Due_Date_ + + + ABS__Remaining_Amount___Control1120036 + + + ABS__Remaining_Amount___Control1120036Format + + + PrintCurrencyCode_Control1120063 + + + Vendor_Ledger_Entry_Entry_No_ + + + Vendor_Ledger_Entry_Vendor_No_ + + + Vendor_Ledger_Entry_Applies_to_ID + + + Vendor_Ledger_Entry__Document_No__Caption + + + Vendor_Ledger_Entry_DescriptionCaption + + + Vendor_Ledger_Entry__External_Document_No__Caption + + + Vendor_Ledger_Entry__Posting_Date_Caption + + + Vendor_Ledger_Entry__Due_Date_Caption + + + ABS__Remaining_Amount___Control1120059Caption + + + ReportCaption + + + ReportCaption_Control1120015 + + + + DataSource + + + + + \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/DraftnoticeFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/DraftnoticeFR.Report.al new file mode 100644 index 0000000000..0595db1c7f --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/DraftnoticeFR.Report.al @@ -0,0 +1,498 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Vendor; +using System.Utilities; + +report 10837 "Draft notice FR" +{ + DefaultLayout = RDLC; + RDLCLayout = './src/Reports/Draftnotice.rdlc'; + Caption = 'Draft notice'; + + dataset + { + dataitem("Payment Lines1"; "Payment Line FR") + { + DataItemTableView = sorting("No.", "Line No.") where(Marked = const(true)); + column(Payment_Lines1_No_; "No.") + { + } + column(Payment_Lines1_Line_No_; "Line No.") + { + } + + trigger OnAfterGetRecord() + begin + PaymtHeader.Get("No."); + PaymtHeader.CalcFields("Payment Class Name"); + PostingDate := PaymtHeader."Posting Date"; + + BankAccountBuffer.Init(); + BankAccountBuffer."Customer No." := "Account No."; + BankAccountBuffer."Bank Branch No." := "Bank Branch No."; + BankAccountBuffer."Agency Code" := "Agency Code"; + BankAccountBuffer."Bank Account No." := "Bank Account No."; + if not BankAccountBuffer.Insert() then; + end; + + trigger OnPreDataItem() + begin + SetRange("No.", TransfertNo); + end; + } + dataitem(Vendor; Vendor) + { + DataItemTableView = sorting("No."); + PrintOnlyIfDetail = true; + RequestFilterFields = "No."; + column(Vendor_No_; "No.") + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem("Bank Account Buffer"; "Bank Account Buffer FR") + { + DataItemTableView = sorting("Customer No.", "Bank Branch No.", "Agency Code", "Bank Account No."); + column(Bank_Account_Buffer_Customer_No_; "Customer No.") + { + } + column(Bank_Account_Buffer_Bank_Branch_No_; "Bank Branch No.") + { + } + column(Bank_Account_Buffer_Agency_Code; "Agency Code") + { + } + column(Bank_Account_Buffer_Bank_Account_No_; "Bank Account No.") + { + } + dataitem("Payment Line"; "Payment Line FR") + { + DataItemLink = "Account No." = field("Customer No."), "Bank Branch No." = field("Bank Branch No."), "Agency Code" = field("Agency Code"), "Bank Account No." = field("Bank Account No."); + DataItemLinkReference = "Bank Account Buffer"; + DataItemTableView = sorting("No.", "Account No.", "Bank Branch No.", "Agency Code", "Bank Account No.", "Payment Address Code") where(Marked = const(true)); + column(FORMAT_PostingDate_0_4_; Format(PostingDate, 0, 4)) + { + } + column(Payment_Lines1___No__; "Payment Lines1"."No.") + { + } + column(PaymtHeader_IBAN; PaymtHeader.IBAN) + { + } + column(VendAddr_7_; VendAddr[7]) + { + } + column(PaymtHeader_SWIFT_Code; PaymtHeader."SWIFT Code") + { + } + column(VendAddr_6_; VendAddr[6]) + { + } + column(CompanyInformation__VAT_Registration_No__; CompanyInformation."VAT Registration No.") + { + } + column(VendAddr_5_; VendAddr[5]) + { + } + column(CompanyInformation__Fax_No__; CompanyInformation."Fax No.") + { + } + column(VendAddr_4_; VendAddr[4]) + { + } + column(CompanyInformation__Phone_No__; CompanyInformation."Phone No.") + { + } + column(VendAddr_3_; VendAddr[3]) + { + } + column(CompanyAddr_6_; CompanyAddr[6]) + { + } + column(VendAddr_2_; VendAddr[2]) + { + } + column(CompanyAddr_5_; CompanyAddr[5]) + { + } + column(VendAddr_1_; VendAddr[1]) + { + } + column(CompanyAddr_4_; CompanyAddr[4]) + { + } + column(CompanyAddr_3_; CompanyAddr[3]) + { + } + column(CompanyAddr_2_; CompanyAddr[2]) + { + } + column(CompanyAddr_1_; CompanyAddr[1]) + { + } + column(STRSUBSTNO_Text002_CopyText_; StrSubstNo(Text002Lbl, CopyText)) + { + } + column(PrintCurrencyCode; PrintCurrencyCode()) + { + } + column(OutputNo; OutputNo) + { + } + column(Vendor__No__; Vendor."No.") + { + } + column(CopyLoop_Number; CopyLoop.Number) + { + } + column(Bank_Account_Buffer___Agency_Code_; "Bank Account Buffer"."Agency Code") + { + } + column(Bank_Account_Buffer___Customer_No__; "Bank Account Buffer"."Customer No.") + { + } + column(Bank_Account_Buffer___Bank_Branch_No__; "Bank Account Buffer"."Bank Branch No.") + { + } + column(Bank_Account_Buffer___Bank_Account_No__; "Bank Account Buffer"."Bank Account No.") + { + } + column(HeaderText1; HeaderText1) + { + } + column(PrintCurrencyCode_Control1120069; PrintCurrencyCode()) + { + } + column(ABS_Amount_; Abs(Amount)) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(Payment_Line__Due_Date_; Format("Due Date")) + { + } + column(PostingDate; Format(PostingDate)) + { + } + column(Payment_Line__External_Document_No__; "External Document No.") + { + } + column(PaymtHeader__Payment_Class_Name_; PaymtHeader."Payment Class Name") + { + } + column(Payment_Line__Document_No__; "Document No.") + { + } + column(PrintCurrencyCode_Control1120064; PrintCurrencyCode()) + { + } + column(DraftAmount; DraftAmount) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(TotalDraftAmount; TotalDraftAmount) + { + } + column(Payment_Line_No_; "No.") + { + } + column(Payment_Line_Line_No_; "Line No.") + { + } + column(Payment_Line_Payment_Address_Code; "Payment Address Code") + { + } + column(Payment_Line_Account_No_; "Account No.") + { + } + column(Payment_Line_Bank_Branch_No_; "Bank Branch No.") + { + } + column(Payment_Line_Agency_Code; "Agency Code") + { + } + column(Payment_Line_Bank_Account_No_; "Bank Account No.") + { + } + column(Payment_Line_Applies_to_ID; "Applies-to ID") + { + } + column(Payment_Lines1___No__Caption; Payment_Lines1___No__CaptionLbl) + { + } + column(PaymtHeader__IBAN__Caption; PaymtHeader__IBAN__CaptionLbl) + { + } + column(PaymtHeader__SWIFT_Code__Caption; PaymtHeader__SWIFT_Code__CaptionLbl) + { + } + column(CompanyInformation__VAT_Registration_No__Caption; CompanyInformation__VAT_Registration_No__CaptionLbl) + { + } + column(CompanyInformation__Fax_No__Caption; CompanyInformation__Fax_No__CaptionLbl) + { + } + column(CompanyInformation__Phone_No__Caption; CompanyInformation__Phone_No__CaptionLbl) + { + } + column(PrintCurrencyCodeCaption; PrintCurrencyCodeCaptionLbl) + { + } + column(Draft_Notice_AmountCaption; Draft_Notice_AmountCaptionLbl) + { + } + dataitem("Vendor Ledger Entry"; "Vendor Ledger Entry") + { + CalcFields = "Remaining Amount"; + DataItemLink = "Vendor No." = field("Account No."), "Applies-to ID" = field("Applies-to ID"); + DataItemLinkReference = "Payment Line"; + DataItemTableView = sorting("Document No."); + column(HeaderText2; HeaderText2Lbl) + { + } + column(ABS__Remaining_Amount__; Abs("Remaining Amount")) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(PrintCurrencyCode_Control1120060; PrintCurrencyCode()) + { + } + column(Vendor_Ledger_Entry__Currency_Code_; "Currency Code") + { + } + column(ABS__Remaining_Amount___Control1120059; Abs("Remaining Amount")) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(Vendor_Ledger_Entry__Document_No__; "Document No.") + { + } + column(Vendor_Ledger_Entry_Description; Description) + { + } + column(Vendor_Ledger_Entry__External_Document_No__; "External Document No.") + { + } + column(Vendor_Ledger_Entry__Posting_Date_; Format("Posting Date")) + { + } + column(Vendor_Ledger_Entry__Due_Date_; Format("Due Date")) + { + } + column(ABS__Remaining_Amount___Control1120036; Abs("Remaining Amount")) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(PrintCurrencyCode_Control1120063; PrintCurrencyCode()) + { + } + column(Vendor_Ledger_Entry_Entry_No_; "Entry No.") + { + } + column(Vendor_Ledger_Entry_Vendor_No_; "Vendor No.") + { + } + column(Vendor_Ledger_Entry_Applies_to_ID; "Applies-to ID") + { + } + column(Vendor_Ledger_Entry__Document_No__Caption; FieldCaption("Document No.")) + { + } + column(Vendor_Ledger_Entry_DescriptionCaption; FieldCaption(Description)) + { + } + column(Vendor_Ledger_Entry__External_Document_No__Caption; FieldCaption("External Document No.")) + { + } + column(Vendor_Ledger_Entry__Posting_Date_Caption; Vendor_Ledger_Entry__Posting_Date_CaptionLbl) + { + } + column(Vendor_Ledger_Entry__Due_Date_Caption; Vendor_Ledger_Entry__Due_Date_CaptionLbl) + { + } + column(ABS__Remaining_Amount___Control1120059Caption; ABS__Remaining_Amount___Control1120059CaptionLbl) + { + } + column(ReportCaption; ReportCaptionLbl) + { + } + column(ReportCaption_Control1120015; ReportCaption_Control1120015Lbl) + { + } + + trigger OnAfterGetRecord() + begin + if "Payment Line"."Applies-to ID" = '' then + CurrReport.Skip() + ; + if "Currency Code" = '' then + "Currency Code" := GLSetup."LCY Code"; + + DraftCounting := DraftCounting + 1; + end; + } + + trigger OnAfterGetRecord() + var + PaymtAddr: Record "Payment Address FR"; + PaymtManagt: Codeunit "Payment Management FR"; + begin + HeaderText1 := StrSubstNo(Text004Lbl, "Bank Account Name", "SWIFT Code", + "Agency Code", IBAN, PostingDate); + DraftCounting := 0; + + TotalDraftAmount := TotalDraftAmount + Abs(Amount); + + if "Payment Address Code" = '' then + FormatAddress.Vendor(VendAddr, Vendor) + else + if PaymtAddr.Get("Account Type"::Vendor, "Account No.", "Payment Address Code") then + PaymtManagt.PaymentAddr(VendAddr, PaymtAddr); + + DraftAmount := Abs(Amount); + end; + + trigger OnPreDataItem() + begin + SetRange("No.", TransfertNo); + SetRange("Account No.", Vendor."No."); + + TotalDraftAmount := 0; + Clear(DraftAmount); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then begin + CopyText := Text001Lbl; + OutputNo := OutputNo + 1; + end; + end; + + trigger OnPreDataItem() + begin + OutputNo := 1; + LoopsNumber := Abs(CopiesNumber) + 1; + CopyText := ''; + SetRange(Number, 1, LoopsNumber); + end; + } + + trigger OnAfterGetRecord() + begin + PaymtLine.Reset(); + PaymtLine.SetRange("No.", TransfertNo); + PaymtLine.SetRange("Account No.", "No."); + if not PaymtLine.FindFirst() then + CurrReport.Skip(); + end; + } + } + + requestpage + { + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(NumberOfCopies; CopiesNumber) + { + ApplicationArea = Basic, Suite; + Caption = 'Number of copies'; + ToolTip = 'Specifies the number of copies to print.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + trigger OnPostReport() + begin + BankAccountBuffer.DeleteAll(); + end; + + trigger OnPreReport() + begin + TransfertNo := CopyStr("Payment Lines1".GetFilter("No."), 1, MaxStrLen(TransfertNo)); + if TransfertNo = '' then + Error(Text000Lbl); + + CompanyInformation.Get(); + FormatAddress.Company(CompanyAddr, CompanyInformation); + GLSetup.Get(); + end; + + var + CompanyInformation: Record "Company Information"; + GLSetup: Record "General Ledger Setup"; + PaymtHeader: Record "Payment Header FR"; + PaymtLine: Record "Payment Line FR"; + BankAccountBuffer: Record "Bank Account Buffer FR"; + FormatAddress: Codeunit "Format Address"; + VendAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + LoopsNumber: Integer; + CopiesNumber: Integer; + CopyText: Text; + DraftAmount: Decimal; + TotalDraftAmount: Decimal; + DraftCounting: Decimal; + TransfertNo: Code[20]; + HeaderText1: Text; + PostingDate: Date; + Text000Lbl: Label 'You must specify a transfer number.'; + Text001Lbl: Label 'COPY'; + Text002Lbl: Label 'Draft notice %1', Comment = '%1 = copy'; + Text004Lbl: Label 'A transfer to your bank account %1 (RIB : %2 %3 %4) has been done on %5.', Comment = '%1 = name, %2 = SWIFT Code, %3 = Agency Code, %4 = IBAN, %5 = Posting Date '; + HeaderText2Lbl: Label 'This transfer is related to these invoices :'; + OutputNo: Integer; + Payment_Lines1___No__CaptionLbl: Label 'Draft No.'; + PaymtHeader__IBAN__CaptionLbl: Label 'IBAN', Locked = true; + PaymtHeader__SWIFT_Code__CaptionLbl: Label 'SWIFT Code'; + CompanyInformation__VAT_Registration_No__CaptionLbl: Label 'VAT Registration No.'; + CompanyInformation__Fax_No__CaptionLbl: Label 'FAX No.'; + CompanyInformation__Phone_No__CaptionLbl: Label 'Phone No.'; + PrintCurrencyCodeCaptionLbl: Label 'Currency Code'; + Draft_Notice_AmountCaptionLbl: Label 'Draft Notice Amount'; + Vendor_Ledger_Entry__Posting_Date_CaptionLbl: Label 'Posting Date'; + Vendor_Ledger_Entry__Due_Date_CaptionLbl: Label 'Due Date'; + ABS__Remaining_Amount___Control1120059CaptionLbl: Label 'Amount'; + ReportCaptionLbl: Label 'Report'; + ReportCaption_Control1120015Lbl: Label 'Report'; + + + procedure PrintCurrencyCode(): Code[10] + begin + if "Payment Lines1"."Currency Code" = '' then + exit(GLSetup."LCY Code"); + + exit("Payment Lines1"."Currency Code"); + end; +} diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Draftrecapitulation.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Draftrecapitulation.rdlc new file mode 100644 index 0000000000..98048ccf6b --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Draftrecapitulation.rdlc @@ -0,0 +1,3913 @@ + + + 0 + + + + SQL + + + None + 6b4e2b63-1565-4e2e-acfd-6000be3dc6d9 + + + + + + + + + + + 1.79409cm + + + 0.6524cm + + + 0.97859cm + + + 2.06592cm + + + 1.63099cm + + + 2.12029cm + + + 1.35916cm + + + 1.46789cm + + + 0.6524cm + + + 1.30479cm + + + 0.4893cm + + + 1.30479cm + + + 1.14169cm + + + 0.8155cm + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox92 + 91 + + + 6 + + + + + + + + + + + true + + + + + =First(Fields!STRSUBSTNO_Text001_CopyText_.Value) + + + + + + textbox98 + 90 + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox84 + 86 + + + 14 + + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_1_.Value) + + + + + + textbox76 + 85 + + + 5 + + + + + + + + + + true + + + + + + + + + + + textbox80 + 84 + + + 9 + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_2_.Value) + + + + + + textbox68 + 83 + + + 5 + + + + + + + + + + true + + + + + + + + + + + textbox72 + 82 + + + 9 + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_3_.Value) + + + + + + textbox52 + 81 + + + 5 + + + + + + + + + + true + + + + + + + + + + + textbox64 + 80 + + + + + + + + true + + + + + =First(Fields!BankAccountAddr_1_.Value) + + + + + + 75 + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_4_.Value) + + + + + + textbox44 + 79 + + + 5 + + + + + + + + + + true + + + + + + + + + + + textbox48 + 78 + + + + + + + + true + + + + + =First(Fields!BankAccountAddr_2_.Value) + + + + + + 72 + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_5_.Value) + + + + + + textbox36 + 77 + + + 5 + + + + + + + + + + true + + + + + + + + + + + textbox40 + 76 + + + + + + + + true + + + + + =First(Fields!BankAccountAddr_3_.Value) + + + + + + 68 + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_6_.Value) + + + + + + textbox28 + 74 + + + 5 + + + + + + + + + + true + + + + + + + + + + + textbox32 + 73 + + + + + + + + true + + + + + =First(Fields!BankAccountAddr_4_.Value) + + + + + + 64 + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyInformation__Phone_No__Caption.Value) + + + + + + textbox20 + 71 + + + 2 + + + + + + + true + + + + + =First(Fields!CompanyInformation__Phone_No__.Value) + + + + + + textbox21 + 70 + + + 3 + + + + + + + + true + + + + + + + + + + + textbox24 + 69 + + + + + + + + true + + + + + =First(Fields!BankAccountAddr_5_.Value) + + + + + + 60 + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyInformation__Fax_No__Caption.Value) + + + + + + textbox220 + 67 + + + 2 + + + + + + + true + + + + + =First(Fields!CompanyInformation__Fax_No__.Value) + + + + + + textbox221 + 66 + + + 3 + + + + + + + + true + + + + + + + + + + + textbox224 + 65 + + + + + + + + true + + + + + =First(Fields!BankAccountAddr_6_.Value) + + + + + + 58 + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyInformation__VAT_Registration_No__Caption.Value) + + + + + + textbox212 + 63 + + + 2 + + + + + + + true + + + + + =First(Fields!CompanyInformation__VAT_Registration_No__.Value) + + + + + + textbox213 + 62 + + + 3 + + + + + + + + true + + + + + + + + + + + textbox216 + 61 + + + + + + + + true + + + + + =First(Fields!BankAccountAddr_7_.Value) + + + + + + 56 + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox204 + 59 + + + 14 + + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox196 + 57 + + + 6 + + + + + + + + + + + true + + + + + =First(Fields!PaymtHeader__Bank_Branch_No__Caption.Value) + + + + + + textbox186 + 53 + + + 3 + + + + + + + + true + + + + + =First(Fields!PaymtHeader__Bank_Branch_No__.Value) + + + + + + textbox284 + 52 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox188 + 55 + + + 6 + + + + + + + + + + + true + + + + + =First(Fields!PaymtHeader__Agency_Code_Caption.Value) + + + + + + textbox178 + 50 + + + 3 + + + + + + + + true + + + + + =First(Fields!PaymtHeader__Agency_Code_.Value) + + + + + + textbox285 + 49 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox180 + 54 + + + 6 + + + + + + + + + + + true + + + + + =First(Fields!PaymtHeader__Bank_Account_No__Caption.Value) + + + + + + 47 + + + 3 + + + + + + + + true + + + + + =First(Fields!PaymtHeader__Bank_Account_No__.Value) + + + + + + 46 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox172 + 51 + + + 6 + + + + + + + + + + + true + + + + + =Fields!PaymtHeader_IBANCaption.Value + + + + + + 47 + + + 3 + + + + + + + + true + + + + + =Fields!PaymtHeader_IBAN.Value + + + + + + 46 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox164 + 48 + + + 6 + + + + + + + + + + + true + + + + + =Fields!PaymtHeader__SWIFT_Code_Caption.Value + + + + + + 47 + + + 3 + + + + + + + + true + + + + + =Fields!PaymtHeader__SWIFT_Code_.Value + + + + + + 46 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox156 + 45 + + + 6 + + + + + + + + + + + true + + + + + =First(Fields!PaymtHeader__RIB_Key_Caption.Value) + + + + + + 44 + + + 3 + + + + + + + + true + + + + + =First(Fields!PaymtHeader__RIB_Key_.Value) + + + + + + + 43 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox148 + 42 + + + 6 + + + + + + + + + + + true + + + + + =First(Fields!PaymtHeader__National_Issuer_No__Caption.Value) + + + + + + 41 + + + 3 + + + + + + + + true + + + + + =First(Fields!PaymtHeader__National_Issuer_No__.Value) + + + + + + 40 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!PaymtHeader__No__Caption.Value) + + + + + + textbox140 + 39 + + + 3 + + + + + + + + true + + + + + =First(Fields!PaymtHeader__No__.Value) + + + + + + textbox142 + 38 + + + 2 + + + + + + + true + + + + + + + + + + + textbox144 + 37 + + + 9 + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!PrintCurrencyCodeCaption.Value) + + + + + + textbox132 + 36 + + + 3 + + + + + + + + true + + + + + =First(Fields!PrintCurrencyCode.Value) + + + + + + textbox134 + 35 + + + 2 + + + + + + + true + + + + + + + + + + + textbox136 + 34 + + + 4 + + + + + + + + + true + + + + + =First(Fields!FORMAT_PostingDate_0_4_.Value) + + + + + + textbox261 + 33 + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox108 + 32 + + + 14 + + + + + + + + + + + + + + + + + + + 0.63492cm + + + + + true + true + + + + + =First(Fields!Payment_Lines__Account_No__Caption.Value) + + + + + + + 31 + + + + + + + + true + true + + + + + =First(Fields!Vendor_NameCaption.Value) + + + + + + 30 + + + 3 + + + + + + + + true + true + + + + + =First(Fields!Payment_Lines__Bank_Account_Name_Caption.Value) + + + + + + 29 + + + 2 + + + + + + + true + true + + + + + =First(Fields!Bank_AccountCaption.Value) + + + + + + 28 + + + 5 + + + + + + + + + + true + true + + + + + =First(Fields!ABS_Amount__Control1120031Caption.Value) + + + + + + + 27 + + + 3 + + + + + + + + 0.63492cm + + + + + true + true + + + + + + + + + + + + textbox4 + + + 4 + + + + + + + + + true + true + + + + + =First(Fields!Payment_Lines__SWIFT_Code_Caption.Value) + + + + + + + + 2 + + + + + + + true + true + + + + + =First(Fields!Payment_Lines_IBANCaption.Value) + + + + + + + + 5 + + + + + + + + + + true + true + + + + + + + + + + + + textbox19 + + + 3 + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + + textbox10 + 26 + + + 14 + + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Payment_Lines__Account_No__.Value + + + + + + + 7 + + + + + + + + true + + + + + =Fields!Vendor_Name.Value + + + + + + 6 + + + 3 + + + + + + + + true + + + + + =Fields!Payment_Lines__Bank_Account_Name_.Value + + + + + + 5 + + + 2 + + + + + + + true + + + + + =Fields!Payment_Lines__Bank_Branch_No__.Value + + + + + + 4 + + + + + + + + true + + + + + =Fields!Payment_Lines__Agency_Code_.Value + + + + + + 3 + + + + + + + + true + + + + + =Fields!Payment_Lines__Bank_Account_No__.Value + + + + + + 2 + + + 3 + + + + + + + + true + true + + + + + =Fields!ABS_Amount_.Value + + + + + + 1 + + + 2 + + + + + + + true + + + + + =Fields!PrintCurrencyCode_Control1120060.Value + + + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + + textbox5 + + + 4 + + + + + + + + + true + + + + + =Fields!Payment_Lines__SWIFT_Code_.Value + + + + + + + + + 2 + + + + + + + true + + + + + =Fields!Payment_Lines_IBAN.Value + + + + + + + + 5 + + + + + + + + + + true + true + + + + + + + + + + + textbox33 + + + 3 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox78 + 8 + + + 14 + + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Last(Fields!TotalCaption.Value) + + + + + + 13 + + + 4 + + + + + + + + + true + + + + + + + + + + + textbox387 + 12 + + + + + + + + true + + + + + =iif(CountRows() > 1, CStr(CountRows())+Fields!Text005.Value, CStr(CountRows())+Fields!Text004.Value) + + + + + + 11 + + + 6 + + + + + + + + + + + true + true + + + + + =Sum(Fields!DraftAmount.Value) + + + + + + 10 + + + 2 + + + + + + + true + + + + + =Last(Fields!PrintCurrencyCode_Control1120060.Value) + + + + + + + 9 + + + + + + + + 0.846cm + + + + + true + true + + + + + + + + + + + textbox1 + 14 + + + 14 + + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox2 + 18 + + + 7 + + + + + + + + + + + + true + + + + + =Last(Fields!Done_at__Caption.Value) + + + + + + 17 + + + 2 + + + + + + + true + + + + + =Last(Fields!CompanyInformation_City.Value) + + + + + + + 16 + + + 3 + + + + + + + + true + true + + + + + + + + + + + + textbox30 + 15 + + + 2 + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox41 + 22 + + + 7 + + + + + + + + + + + + true + + + + + =Last(Fields!On__Caption.Value) + + + + + + 21 + + + 2 + + + + + + + true + + + + + =Last(Fields!FORMAT_PostingDate_0_4__Control1120034.Value) + + + + + + + 20 + + + 3 + + + + + + + + true + true + + + + + + + + + + + + textbox31 + 19 + + + 2 + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox57 + 25 + + + 7 + + + + + + + + + + + + true + + + + + =Last(Fields!Signature__Caption.Value) + + + + + + 24 + + + 2 + + + + + + + true + + + + + + + + + + + textbox67 + 23 + + + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =Fields!Payment_Lines1_No_.Value + =Fields!OutputNo.Value + + + End + + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + true + + + true + + + true + + + + + =Fields!Payment_Lines_No_.Value + + + + + After + true + true + + + After + true + true + + + After + true + true + + + + Detail + + + + + + Detail_Collection + Output + true + + + Before + true + + + Before + true + + + Before + true + + + Before + true + + + Before + true + + + Before + true + + + + + + + + DataSet_Result + 14.80584cm + + + 15.22884cm + + 17.7778cm + + + 0.423cm + true + true + + + true + + + + + =Globals!PageNumber + + + + + + + + + + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + + =User!Language + true + Invalid + ec48afd7-2e28-4f0f-8566-7e90261e520c + + + + + Payment_Lines1_No_ + + + Payment_Lines1_Line_No_ + + + PaymtHeader__No__ + + + STRSUBSTNO_Text001_CopyText_ + + + CompanyAddr_1_ + + + CompanyAddr_2_ + + + CompanyAddr_3_ + + + CompanyAddr_4_ + + + CompanyAddr_5_ + + + CompanyAddr_6_ + + + CompanyInformation__Phone_No__ + + + CompanyInformation__Fax_No__ + + + CompanyInformation__VAT_Registration_No__ + + + FORMAT_PostingDate_0_4_ + + + BankAccountAddr_4_ + + + BankAccountAddr_5_ + + + BankAccountAddr_6_ + + + BankAccountAddr_7_ + + + BankAccountAddr_3_ + + + BankAccountAddr_2_ + + + BankAccountAddr_1_ + + + PrintCurrencyCode + + + PaymtHeader__Bank_Branch_No__ + + + PaymtHeader__Agency_Code_ + + + PaymtHeader__Bank_Account_No__ + + + PaymtHeader__RIB_Key_ + + + PaymtHeader__National_Issuer_No__ + + + OutputNo + + + PaymtHeader_IBAN + + + PaymtHeader__SWIFT_Code_ + + + PageLoop_Number + + + PaymtHeader__No__Caption + + + CompanyInformation__Phone_No__Caption + + + CompanyInformation__Fax_No__Caption + + + CompanyInformation__VAT_Registration_No__Caption + + + PrintCurrencyCodeCaption + + + PaymtHeader__Bank_Branch_No__Caption + + + PaymtHeader__Agency_Code_Caption + + + PaymtHeader__Bank_Account_No__Caption + + + PaymtHeader__RIB_Key_Caption + + + PaymtHeader__National_Issuer_No__Caption + + + PaymtHeader_IBANCaption + + + PaymtHeader__SWIFT_Code_Caption + + + ABS_Amount_ + + + ABS_Amount_Format + + + PrintCurrencyCode_Control1120060 + + + Vendor_Name + + + Payment_Lines__Bank_Branch_No__ + + + ABS_Amount__Control1120031 + + + ABS_Amount__Control1120031Format + + + Payment_Lines__Bank_Account_Name_ + + + Payment_Lines__Account_No__ + + + PrintCurrencyCode_Control1120061 + + + Payment_Lines__Agency_Code_ + + + Payment_Lines__Bank_Account_No__ + + + Payment_Lines__SWIFT_Code_ + + + Payment_Lines_IBAN + + + ABS_Amount__Control1120036 + + + ABS_Amount__Control1120036Format + + + PrintCurrencyCode_Control1120063 + + + DraftAmount + + + DraftAmountFormat + + + PrintDraftCounting + + + PrintCurrencyCode_Control1120064 + + + FORMAT_PostingDate_0_4__Control1120034 + + + CompanyInformation_City + + + Text004 + + + Text005 + + + Payment_Lines_No_ + + + Payment_Lines_Line_No_ + + + Payment_Lines__Account_No__Caption + + + Vendor_NameCaption + + + Payment_Lines__Bank_Account_Name_Caption + + + ABS_Amount__Control1120031Caption + + + Bank_AccountCaption + + + Payment_Lines__SWIFT_Code_Caption + + + Payment_Lines_IBANCaption + + + ReportCaption + + + ReportCaption_Control1120015 + + + TotalCaption + + + Done_at__Caption + + + On__Caption + + + Signature__Caption + + + + DataSource + + + + + \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/DraftrecapitulationFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/DraftrecapitulationFR.Report.al new file mode 100644 index 0000000000..8a436e172e --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/DraftrecapitulationFR.Report.al @@ -0,0 +1,447 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.Vendor; +using System.Utilities; + +report 10838 "Draft recapitulation FR" +{ + DefaultLayout = RDLC; + RDLCLayout = './src/Reports/Draftrecapitulation.rdlc'; + Caption = 'Draft recapitulation'; + + dataset + { + dataitem("Payment Lines1"; "Payment Line FR") + { + DataItemTableView = sorting("No.", "Line No."); + MaxIteration = 1; + PrintOnlyIfDetail = true; + column(Payment_Lines1_No_; "No.") + { + } + column(Payment_Lines1_Line_No_; "Line No.") + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem(PageLoop; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(PaymtHeader__No__; PaymtHeader."No.") + { + } + column(STRSUBSTNO_Text001_CopyText_; StrSubstNo(Text001Lbl, CopyText)) + { + } + column(CompanyAddr_1_; CompanyAddr[1]) + { + } + column(CompanyAddr_2_; CompanyAddr[2]) + { + } + column(CompanyAddr_3_; CompanyAddr[3]) + { + } + column(CompanyAddr_4_; CompanyAddr[4]) + { + } + column(CompanyAddr_5_; CompanyAddr[5]) + { + } + column(CompanyAddr_6_; CompanyAddr[6]) + { + } + column(CompanyInformation__Phone_No__; CompanyInformation."Phone No.") + { + } + column(CompanyInformation__Fax_No__; CompanyInformation."Fax No.") + { + } + column(CompanyInformation__VAT_Registration_No__; CompanyInformation."VAT Registration No.") + { + } + column(FORMAT_PostingDate_0_4_; Format(PostingDate, 0, 4)) + { + } + column(BankAccountAddr_4_; BankAccountAddr[4]) + { + } + column(BankAccountAddr_5_; BankAccountAddr[5]) + { + } + column(BankAccountAddr_6_; BankAccountAddr[6]) + { + } + column(BankAccountAddr_7_; BankAccountAddr[7]) + { + } + column(BankAccountAddr_3_; BankAccountAddr[3]) + { + } + column(BankAccountAddr_2_; BankAccountAddr[2]) + { + } + column(BankAccountAddr_1_; BankAccountAddr[1]) + { + } + column(PrintCurrencyCode; PrintCurrencyCode()) + { + } + column(PaymtHeader__Bank_Branch_No__; PaymtHeader."Bank Branch No.") + { + } + column(PaymtHeader__Agency_Code_; PaymtHeader."Agency Code") + { + } + column(PaymtHeader__Bank_Account_No__; PaymtHeader."Bank Account No.") + { + } + column(PaymtHeader__RIB_Key_; PaymtHeader."RIB Key") + { + } + column(PaymtHeader__National_Issuer_No__; PaymtHeader."National Issuer No.") + { + } + column(OutputNo; OutputNo) + { + } + column(PaymtHeader_IBAN; PaymtHeader.IBAN) + { + } + column(PaymtHeader__SWIFT_Code_; PaymtHeader."SWIFT Code") + { + } + column(PageLoop_Number; Number) + { + } + column(PaymtHeader__No__Caption; PaymtHeader__No__CaptionLbl) + { + } + column(CompanyInformation__Phone_No__Caption; CompanyInformation__Phone_No__CaptionLbl) + { + } + column(CompanyInformation__Fax_No__Caption; CompanyInformation__Fax_No__CaptionLbl) + { + } + column(CompanyInformation__VAT_Registration_No__Caption; CompanyInformation__VAT_Registration_No__CaptionLbl) + { + } + column(PrintCurrencyCodeCaption; PrintCurrencyCodeCaptionLbl) + { + } + column(PaymtHeader__Bank_Branch_No__Caption; PaymtHeader__Bank_Branch_No__CaptionLbl) + { + } + column(PaymtHeader__Agency_Code_Caption; PaymtHeader__Agency_Code_CaptionLbl) + { + } + column(PaymtHeader__Bank_Account_No__Caption; PaymtHeader__Bank_Account_No__CaptionLbl) + { + } + column(PaymtHeader__RIB_Key_Caption; PaymtHeader__RIB_Key_CaptionLbl) + { + } + column(PaymtHeader__National_Issuer_No__Caption; PaymtHeader__National_Issuer_No__CaptionLbl) + { + } + column(PaymtHeader_IBANCaption; PaymtHeader_IBANCaptionLbl) + { + } + column(PaymtHeader__SWIFT_Code_Caption; PaymtHeader__SWIFT_Code_CaptionLbl) + { + } + dataitem("Payment Lines"; "Payment Line FR") + { + DataItemLink = "No." = field("No."); + DataItemLinkReference = "Payment Lines1"; + DataItemTableView = sorting("No.", "Line No."); + column(ABS_Amount_; Abs(Amount)) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(PrintCurrencyCode_Control1120060; PrintCurrencyCode()) + { + } + column(Vendor_Name; Vendor.Name) + { + } + column(Payment_Lines__Bank_Branch_No__; "Bank Branch No.") + { + } + column(ABS_Amount__Control1120031; Abs(Amount)) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(Payment_Lines__Bank_Account_Name_; "Bank Account Name") + { + } + column(Payment_Lines__Account_No__; "Account No.") + { + } + column(PrintCurrencyCode_Control1120061; PrintCurrencyCode()) + { + } + column(Payment_Lines__Agency_Code_; "Agency Code") + { + } + column(Payment_Lines__Bank_Account_No__; "Bank Account No.") + { + } + column(Payment_Lines__SWIFT_Code_; "SWIFT Code") + { + } + column(Payment_Lines_IBAN; IBAN) + { + } + column(ABS_Amount__Control1120036; Abs(Amount)) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(PrintCurrencyCode_Control1120063; PrintCurrencyCode()) + { + } + column(DraftAmount; DraftAmount) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(PrintDraftCounting; PrintDraftCounting()) + { + } + column(PrintCurrencyCode_Control1120064; PrintCurrencyCode()) + { + } + column(FORMAT_PostingDate_0_4__Control1120034; Format(PostingDate, 0, 4)) + { + } + column(CompanyInformation_City; CompanyInformation.City) + { + } + column(Text004; Text004Lbl) + { + } + column(Text005; Text005Lbl) + { + } + column(Payment_Lines_No_; "No.") + { + } + column(Payment_Lines_Line_No_; "Line No.") + { + } + column(Payment_Lines__Account_No__Caption; FieldCaption("Account No.")) + { + } + column(Vendor_NameCaption; Vendor_NameCaptionLbl) + { + } + column(Payment_Lines__Bank_Account_Name_Caption; Payment_Lines__Bank_Account_Name_CaptionLbl) + { + } + column(ABS_Amount__Control1120031Caption; ABS_Amount__Control1120031CaptionLbl) + { + } + column(Bank_AccountCaption; Bank_AccountCaptionLbl) + { + } + column(Payment_Lines__SWIFT_Code_Caption; Payment_Lines__SWIFT_Code_CaptionLbl) + { + } + column(Payment_Lines_IBANCaption; Payment_Lines_IBANCaptionLbl) + { + } + column(ReportCaption; ReportCaptionLbl) + { + } + column(ReportCaption_Control1120015; ReportCaption_Control1120015Lbl) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + column(Done_at__Caption; Done_at__CaptionLbl) + { + } + column(On__Caption; On__CaptionLbl) + { + } + column(Signature__Caption; Signature__CaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + Vendor.SetRange("No.", "Account No."); + if not Vendor.FindFirst() then + Error(Text002Lbl, "Account No."); + + DraftAmount := Abs(Amount); + DraftCounting := 1; + end; + + trigger OnPreDataItem() + begin + SetRange("Account Type", "Account Type"::Vendor); + Clear(DraftAmount); + Clear(DraftCounting); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then begin + CopyText := Text006Lbl; + OutputNo := OutputNo + 1; + end; + end; + + trigger OnPreDataItem() + begin + OutputNo := 1; + LoopsNumber := Abs(CopiesNumber) + 1; + CopyText := ''; + SetRange(Number, 1, LoopsNumber); + end; + } + + trigger OnAfterGetRecord() + begin + PaymtHeader.Get("No."); + PostingDate := PaymtHeader."Posting Date"; + + PaymtManagt.PaymentBankAcc(BankAccountAddr, PaymtHeader); + end; + + trigger OnPreDataItem() + begin + SetRange("No.", TransfertNo); + end; + } + } + + requestpage + { + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(Copies_Number; CopiesNumber) + { + ApplicationArea = Basic, Suite; + Caption = 'Number of copies'; + ToolTip = 'Specifies the number of copies to print.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + trigger OnPreReport() + begin + TransfertNo := CopyStr("Payment Lines1".GetFilter("No."), 1, MaxStrLen(TransfertNo)); + if TransfertNo = '' then + Error(Text000Lbl); + + CompanyInformation.Get(); + FormatAddress.Company(CompanyAddr, CompanyInformation); + end; + + var + CompanyInformation: Record "Company Information"; + Vendor: Record Vendor; + GLSetup: Record "General Ledger Setup"; + PaymtHeader: Record "Payment Header FR"; + PaymtManagt: Codeunit "Payment Management FR"; + FormatAddress: Codeunit "Format Address"; + BankAccountAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + LoopsNumber: Integer; + CopiesNumber: Integer; + CopyText: Text; + DraftAmount: Decimal; + DraftCounting: Decimal; + TransfertNo: Code[20]; + PostingDate: Date; + Text000Lbl: Label 'You must specify a transfer number.'; + Text002Lbl: Label 'Vendor %1 does not exist.', Comment = '%1 = Account No.'; + Text006Lbl: Label 'COPY'; + Text001Lbl: Label 'Draft Recapitulation %1', Comment = '%1 = copy'; + OutputNo: Integer; + PaymtHeader__No__CaptionLbl: Label 'Draft No.'; + CompanyInformation__Phone_No__CaptionLbl: Label 'Phone No.'; + CompanyInformation__Fax_No__CaptionLbl: Label 'Fax No.'; + CompanyInformation__VAT_Registration_No__CaptionLbl: Label 'VAT Registration No.'; + PrintCurrencyCodeCaptionLbl: Label 'Currency Code'; + PaymtHeader__Bank_Branch_No__CaptionLbl: Label 'Bank Branch No.'; + PaymtHeader__Agency_Code_CaptionLbl: Label 'Agency Code'; + PaymtHeader__Bank_Account_No__CaptionLbl: Label 'Bank Account No.'; + PaymtHeader__RIB_Key_CaptionLbl: Label 'RIB Key'; + PaymtHeader__National_Issuer_No__CaptionLbl: Label 'National Issuer No.'; + PaymtHeader_IBANCaptionLbl: Label 'IBAN', Locked = true; + PaymtHeader__SWIFT_Code_CaptionLbl: Label 'SWIFT Code'; + Text004Lbl: Label ' DRAFT'; + Text005Lbl: Label ' DRAFTS'; + Vendor_NameCaptionLbl: Label 'Name'; + Payment_Lines__Bank_Account_Name_CaptionLbl: Label 'Bank Account Name'; + ABS_Amount__Control1120031CaptionLbl: Label 'Amount'; + Bank_AccountCaptionLbl: Label 'Bank Account'; + Payment_Lines__SWIFT_Code_CaptionLbl: Label 'Swift Code'; + Payment_Lines_IBANCaptionLbl: Label 'IBAN', Locked = true; + ReportCaptionLbl: Label 'Report'; + ReportCaption_Control1120015Lbl: Label 'Report'; + TotalCaptionLbl: Label 'Total'; + Done_at__CaptionLbl: Label 'Done at :'; + On__CaptionLbl: Label 'On :'; + Signature__CaptionLbl: Label 'Signature :'; + + + procedure PrintDraftCounting(): Text[30] + begin + if DraftCounting > 1 then + exit(Format(DraftCounting) + Text005Lbl); + + exit(Format(DraftCounting) + Text004Lbl); + end; + + + procedure InitRequest(InitDraftNo: Code[20]; InitCopies: Integer) + begin + TransfertNo := InitDraftNo; + CopiesNumber := InitCopies; + end; + + + procedure PrintCurrencyCode(): Code[10] + begin + if "Payment Lines1"."Currency Code" = '' then begin + GLSetup.Get(); + exit(GLSetup."LCY Code"); + end; + exit("Payment Lines1"."Currency Code"); + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/DuplicateparameterFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/DuplicateparameterFR.Report.al new file mode 100644 index 0000000000..a7e20769d6 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/DuplicateparameterFR.Report.al @@ -0,0 +1,150 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +report 10839 "Duplicate parameter FR" +{ + Caption = 'Duplicate parameter'; + ProcessingOnly = true; + + dataset + { + dataitem(PaymentClass; "Payment Class FR") + { + DataItemTableView = sorting(Code); + + trigger OnAfterGetRecord() + var + PaymtClass: Record "Payment Class FR"; + begin + PaymtClass.Copy(PaymentClass); + PaymtClass.Name := ''; + PaymtClass.Validate(Code, NewName); + PaymtClass.Insert(); + end; + + trigger OnPreDataItem() + begin + VerifyNewName(); + end; + } + dataitem("Payment Status"; "Payment Status FR") + { + DataItemTableView = sorting("Payment Class", Line); + + trigger OnAfterGetRecord() + var + PaymtStatus: Record "Payment Status FR"; + begin + PaymtStatus.Copy("Payment Status"); + PaymtStatus.Validate("Payment Class", NewName); + PaymtStatus.Insert(); + end; + + trigger OnPreDataItem() + begin + SetRange("Payment Class", PaymentClass.Code); + end; + } + dataitem("Payment Step"; "Payment Step FR") + { + DataItemTableView = sorting("Payment Class", Line); + + trigger OnAfterGetRecord() + var + PaymtStep: Record "Payment Step FR"; + begin + PaymtStep.Copy("Payment Step"); + PaymtStep.Validate("Payment Class", NewName); + PaymtStep.Insert(); + end; + + trigger OnPreDataItem() + begin + SetRange("Payment Class", PaymentClass.Code); + end; + } + dataitem("Payment Step Ledger"; "Payment Step Ledger FR") + { + DataItemTableView = sorting("Payment Class", Line, Sign); + + trigger OnAfterGetRecord() + var + PaymtStepLedger: Record "Payment Step Ledger FR"; + begin + PaymtStepLedger.Copy("Payment Step Ledger"); + PaymtStepLedger.Validate("Payment Class", NewName); + PaymtStepLedger.Insert(); + end; + + trigger OnPreDataItem() + begin + SetRange("Payment Class", PaymentClass.Code); + end; + } + } + + requestpage + { + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + group("Which name do you want to attribute to the new parameter?") + { + Caption = 'Which name do you want to attribute to the new parameter?'; + field(Old_Name; OldName) + { + ApplicationArea = Basic, Suite; + Caption = 'Old name'; + Editable = false; + ToolTip = 'Specifies the previous name of the payment class.'; + } + field(New_Name; NewName) + { + ApplicationArea = Basic, Suite; + Caption = 'New name'; + ToolTip = 'Specifies the name of the new payment class.'; + } + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + OldName: Text[30]; + NewName: Text[30]; + Text000Lbl: Label 'You must define a new name.'; + Text001Lbl: Label 'Name %1 already exist. Please define another name.', Comment = '%1 = name'; + + procedure InitParameter("Code": Text[30]) + begin + OldName := Code; + end; + + procedure VerifyNewName() + var + PaymtClass: Record "Payment Class FR"; + begin + if NewName = '' then + Error(Text000Lbl); + if PaymtClass.Get(NewName) then + Error(Text001Lbl, NewName); + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/ETEBACFilesFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/ETEBACFilesFR.Report.al new file mode 100644 index 0000000000..d65db322b6 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/ETEBACFilesFR.Report.al @@ -0,0 +1,339 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Customer; +using System.IO; +using System.Reflection; + +report 10840 "ETEBAC Files FR" +{ + Caption = 'ETEBAC Files'; + ProcessingOnly = true; + + dataset + { + dataitem("Payment Header"; "Payment Header FR") + { + DataItemTableView = sorting("No."); + MaxIteration = 1; + dataitem("Payment Line"; "Payment Line FR") + { + DataItemLink = "No." = field("No."); + DataItemTableView = sorting("No.", "Line No."); + + trigger OnAfterGetRecord() + var + Cust: Record Customer; + RecordCode: Text; + OperationCode: Text; + Numbering: Text; + BillReference: Text; + CustomerName: Text; + CustomerBankName: Text; + AcceptationCode: Text; + BankBranchNo: Text; + AgencyCode: Text; + BankAccountNo: Text; + PrintAmount: Text; + DueDate: Text; + CreationDate: Text; + ExportedText: Text; + begin + if (CurrencyUsed = '') and ("Currency Code" <> '') then + Error(Text004Lbl, GLSetup."LCY Code"); + + TestField("Account No."); + Cust.Get("Account No."); + + if StrLen("Bank Branch No.") > 5 then + Error(Text006Lbl, "Bank Account Code"); + + if StrLen("Agency Code") > 5 then + Error(Text006Lbl, "Bank Account Code"); + + if StrLen("Bank Account No.") > 11 then + Error(Text006Lbl, "Bank Account Code"); + + if not "RIB Checked" then + Error(Text007Lbl, "Bank Account Code", "Account No."); + + LineNo := LineNo + 1; + + RecordCode := '06'; + OperationCode := '60'; + Numbering := ConvertStr(Format(LineNo, 8), ' ', '0'); + + case "Drawee Reference" <> '' of + true: + BillReference := PADSTR2("Drawee Reference", 10, '0'); + false: + BillReference := PADSTR2('', 10, ' '); + end; + + CustomerName := PadStr(Cust.Name, 24); + CustomerBankName := PadStr("Bank Account Name", 24); + + case "Acceptation Code" of + "Acceptation Code"::"LCR NA": + AcceptationCode := '0'; + "Acceptation Code"::LCR: + AcceptationCode := '1'; + "Acceptation Code"::BOR: + AcceptationCode := '2' + end; + + BankBranchNo := PADSTR2("Bank Branch No.", 5, '0'); + AgencyCode := PADSTR2("Agency Code", 5, '0'); + BankAccountNo := PADSTR2("Bank Account No.", 11, '0'); + PrintAmount := FormatAmount(Amount, 12); + DueDate := Format("Due Date", 6, ''); + CreationDate := Format("Payment Header"."Posting Date", 6, ''); + ExportedText := + RecordCode + + OperationCode + + Numbering + + PadStr('', 8) + + BillReference + + CustomerName + + CustomerBankName + + AcceptationCode + + PadStr('', 2) + + BankBranchNo + + AgencyCode + + BankAccountNo + + PrintAmount + + PadStr('', 4) + + DueDate + + CreationDate; + + ExportFile.Write(PadStr(ExportedText, 160)); + end; + + trigger OnPostDataItem() + var + PaymentHeader: Record "Payment Header FR"; + RecordCode: Text; + OperationCode: Text; + Numbering: Text; + PrintAmount: Text; + ExportedText: Text; + begin + LineNo := LineNo + 1; + RecordCode := '08'; + OperationCode := '60'; + Numbering := ConvertStr(Format(LineNo, 8), ' ', '0'); + PrintAmount := FormatAmount("Payment Header".Amount, 12); + ExportedText := + RecordCode + + OperationCode + + Numbering + + PadStr('', 90) + + PrintAmount; + + ExportFile.Write(PadStr(ExportedText, 160)); + + PaymentHeader := "Payment Header"; + PaymentHeader."File Export Completed" := true; + PaymentHeader.Modify(); + end; + } + + trigger OnAfterGetRecord() + var + RecordCode: Text; + OperationCode: Text; + Numbering: Text; + FromPaymentNo: Text; + DeliveryDate: Text; + CompanyName: Text; + CompanyBankName: Text; + EntryCode: Text; + CurrencyIdentifier: Code[1]; + BankBranchNo: Text; + AgencyCode: Text; + BankAccountNo: Text; + ExportedText: Text; + begin + if StrLen("Bank Branch No.") > 5 then + Error(Text002Lbl, "Account No."); + + if StrLen("Agency Code") > 5 then + Error(Text002Lbl, "Account No."); + + if StrLen("Bank Account No.") > 11 then + Error(Text002Lbl, "Account No."); + + if not "RIB Checked" then + Error(Text003Lbl, "Account No."); + + case "Currency Code" = '' of + true: + CurrencyUsed := ''; + false: + CurrencyUsed := 'FRF'; + end; + + case CurrencyUsed = '' of + true: + CurrencyIdentifier := 'E'; + false: + CurrencyIdentifier := 'F'; + end; + + LineNo := 1; + + CalcFields(Amount); + + RecordCode := '03'; + OperationCode := '60'; + Numbering := ConvertStr(Format(LineNo, 8), ' ', '0'); + FromPaymentNo := PadStr("National Issuer No.", 6); + DeliveryDate := Format("Posting Date", 6, ''); + CompanyName := PadStr(CompanyInfo.Name, 24); + CompanyBankName := PadStr("Bank Name", 24); + EntryCode := Format(PaymentType + 1); + BankBranchNo := PADSTR2("Bank Branch No.", 5, '0'); + AgencyCode := PADSTR2("Agency Code", 5, '0'); + BankAccountNo := PADSTR2("Bank Account No.", 11, '0'); + ExportedText := + RecordCode + + OperationCode + + Numbering + + FromPaymentNo + + PadStr('', 6) + + DeliveryDate + + CompanyName + + CompanyBankName + + EntryCode + + PadStr('', 1) + + CurrencyIdentifier + + BankBranchNo + + AgencyCode + + BankAccountNo; + + ExportFile.Write(PadStr(ExportedText, 160)); + end; + } + } + + requestpage + { + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(Payment_Type; PaymentType) + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Type'; + OptionCaption = 'Discount,Discount in Value,Cash after Due Date,Cash after Unpaid Delay'; + ToolTip = 'Specifies the payment type for the ETEBAC file.'; + } + } + } + } + + actions + { + } + + trigger OnOpenPage() + begin + PaymentType := PaymentType::"Cash after Due Date"; + end; + } + + labels + { + } + + trigger OnPostReport() + var + FileMgt: Codeunit "File Management"; + ToFile: Text[260]; + begin + ExportFile.Close(); + ToFile := Text009Lbl; + FileMgt.DownloadHandler(ExportFileName, GetCaption(), '', Text008Lbl, ToFile); + end; + + trigger OnPreReport() + var + FileMgt: Codeunit "File Management"; + begin + CompanyInfo.Get(); + CompanyInfo.TestField(Name); + + GLSetup.Get(); + + ExportFileName := FileMgt.ServerTempFileName(''); + + ExportFile.TextMode := true; + ExportFile.WriteMode := true; + ExportFile.Create(ExportFileName); + end; + + var + GLSetup: Record "General Ledger Setup"; + CompanyInfo: Record "Company Information"; + ExportFile: File; + ExportFileName: Text; + CurrencyUsed: Code[10]; + PaymentType: Option Discount,"Discount in Value","Cash after Due Date","Cash after Unpaid Delay"; + Text002Lbl: Label 'Bank Account No. %1 is too long. Please verify before continuing.', Comment = '%1 = number'; + Text003Lbl: Label 'The RIB of the company''s bank account %1 is incorrect. Please verify before continuing.', Comment = '%1 = No.'; + Text004Lbl: Label 'You can only use %1.', Comment = '%1 - currency code'; + Text006Lbl: Label 'Bank Account No. %1 is too long. Please verify before continuing.', Comment = '%1 = number'; + Text007Lbl: Label 'The RIB of bank account %1 of customer %2 is incorrect. Please verify before continuing.', Comment = '%1 = Code, %2 = Account No.'; + Text008Lbl: Label 'Text Files|*.txt|All Files|*.*'; + Text009Lbl: Label 'default.txt'; + LineNo: Integer; + + local procedure GetCaption() Result: Text[50] + var + AllObjWithCaption: Record AllObjWithCaption; + ID: Integer; + begin + Result := ''; + if not Evaluate(ID, DelChr(CurrReport.ObjectId(false), '=', DelChr(CurrReport.ObjectId(false), '=', '0123456789'))) then + exit; + + if not AllObjWithCaption.Get(AllObjWithCaption."Object Type"::Report, ID) then + exit; + + exit(CopyStr(AllObjWithCaption."Object Caption", 1, MaxStrLen(Result))); + end; + + local procedure PADSTR2(String: Text; Length: Integer; FillCharacter: Text[1]): Text + var + PaddingLength: Integer; + begin + PaddingLength := Length - StrLen(String); + + case true of + PaddingLength <= 0: + exit(PadStr(String, Length, FillCharacter)); + PaddingLength > 0: + exit(PadStr('', PaddingLength, FillCharacter) + String); + end; + end; + + local procedure FormatAmount(Amount: Decimal; Width: Integer): Text + var + Format_Amount: Text; + begin + Format_Amount := ConvertStr(Format(Amount, Width, ''), ' ', '0'); + Format_Amount := '0' + CopyStr(Format_Amount, 1, Width - 3) + CopyStr(Format_Amount, Width - 1, 2); + exit(Format_Amount); + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.Report.al new file mode 100644 index 0000000000..6f351858e9 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.Report.al @@ -0,0 +1,263 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Sales.Customer; + +report 10841 "GL/Cust Ledger Reconciliation" +{ + DefaultLayout = RDLC; + RDLCLayout = './src/Reports/GLCustLedgerReconciliation.rdlc'; + ApplicationArea = Basic, Suite; + Caption = 'GL/Cust. Ledger Reconciliation'; + Permissions = TableData "G/L Account Net Change" = rimd; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem(Customer; Customer) + { + PrintOnlyIfDetail = true; + RequestFilterFields = "No.", "Date Filter"; + column(USERID; UserId) + { + } + column(FORMAT_TODAY_0_4_; Format(Today, 0, 4)) + { + } + column(COMPANYNAME; COMPANYPROPERTY.DisplayName()) + { + } + column(LastNo; LastNo) + { + } + column(FirstNo; FirstNo) + { + } + column(Customer__No__; "No.") + { + } + column(Customer_Name; Name) + { + } + column(TotalDebit; TotalDebit) + { + } + column(TotalCredit; TotalCredit) + { + } + column(TotalDebit_TotalCredit; TotalDebit - TotalCredit) + { + } + column(General_Customer_ledger_reconciliationCaption; General_Customer_ledger_reconciliationCaptionLbl) + { + } + column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl) + { + } + column(G_L_Entry__Debit_Amount_Caption; "G/L Entry".FieldCaption("Debit Amount")) + { + } + column(G_L_Entry__Credit_Amount_Caption; "G/L Entry".FieldCaption("Credit Amount")) + { + } + column(G_L_Entry_AmountCaption; "G/L Entry".FieldCaption(Amount)) + { + } + column(G_L_Entry_DescriptionCaption; "G/L Entry".FieldCaption(Description)) + { + } + column(G_L_Entry__Document_No__Caption; "G/L Entry".FieldCaption("Document No.")) + { + } + column(G_L_Entry__Document_Type_Caption; "G/L Entry".FieldCaption("Document Type")) + { + } + column(G_L_Entry__G_L_Account_No__Caption; "G/L Entry".FieldCaption("G/L Account No.")) + { + } + column(G_L_Entry__Posting_Date_Caption; G_L_Entry__Posting_Date_CaptionLbl) + { + } + column(General_AmountCaption; General_AmountCaptionLbl) + { + } + dataitem("Customer Posting Group"; "Customer Posting Group") + { + DataItemTableView = sorting(Code); + PrintOnlyIfDetail = true; + column(TotalDebit_TotalCredit_Control1120015; TotalDebit - TotalCredit) + { + } + column(TotalCredit_Control1120014; TotalCredit) + { + } + column(TotalDebit_Control1120013; TotalDebit) + { + } + column(Customer_Posting_Group_Code; Code) + { + } + column(Customer_Posting_Group_Receivables_Account; "Receivables Account") + { + } + column(Total_amount_for_the_customerCaption; Total_amount_for_the_customerCaptionLbl) + { + } + dataitem("G/L Entry"; "G/L Entry") + { + DataItemLink = "G/L Account No." = field("Receivables Account"); + DataItemTableView = sorting("G/L Account No.", "Source Type", "Source No.") where(Amount = filter(<> 0)); + column(G_L_Entry__Debit_Amount_; "Debit Amount") + { + } + column(G_L_Entry__Credit_Amount_; "Credit Amount") + { + } + column(G_L_Entry_Amount; Amount) + { + } + column(G_L_Entry__Posting_Date_; Format("Posting Date")) + { + } + column(G_L_Entry_Description; Description) + { + } + column(G_L_Entry__Document_Type_; "Document Type") + { + } + column(G_L_Entry__Document_No__; "Document No.") + { + } + column(G_L_Entry__G_L_Account_No__; "G/L Account No.") + { + } + column(G_L_Entry__Debit_Amount__Control1120036; "Debit Amount") + { + } + column(G_L_Entry__Credit_Amount__Control1120037; "Credit Amount") + { + } + column(G_L_Entry_Amount_Control1120038; Amount) + { + } + column(G_L_Entry_Entry_No_; "Entry No.") + { + } + column(Total_amount_for_the_general_ledgerCaption; Total_amount_for_the_general_ledgerCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + if ("Bal. Account Type" = "Bal. Account Type"::Customer) and ("Bal. Account No." = Customer."No.") then + CurrReport.Skip(); + TotalDebit := TotalDebit + "Debit Amount"; + TotalCredit := TotalCredit + "Credit Amount"; + GLAccountNetChange.Get("G/L Account No."); + GLAccountNetChange."Net Change in Jnl." += Amount; + GLAccountNetChange.Modify(); + HavingNoDetail := false; + end; + + trigger OnPreDataItem() + begin + SetRange("Source Type", "Source Type"::Customer); + SetRange("Source No.", Customer."No."); + SetRange("Posting Date", Customer.GetRangeMin("Date Filter"), Customer.GetRangeMax("Date Filter")); + end; + } + + trigger OnAfterGetRecord() + begin + Clear(TempPostingBuffer); + TempPostingBuffer."Account Type" := TempPostingBuffer."Account Type"::"G/L Account"; + TempPostingBuffer."Account No." := "Receivables Account"; + if not TempPostingBuffer.Insert() then + CurrReport.Skip(); + Clear(GLAccountNetChange); + GLAccountNetChange."No." := "Receivables Account"; + if not GLAccountNetChange.Insert() then; + end; + + trigger OnPostDataItem() + begin + TempPostingBuffer.DeleteAll(); + end; + } + + trigger OnAfterGetRecord() + begin + TotalDebit := 0; + TotalCredit := 0; + HavingNoDetail := true; + end; + + trigger OnPreDataItem() + begin + Clear(TotalDebit); + Clear(TotalCredit); + Customer.FindFirst(); + FirstNo := "No."; + Customer.FindLast(); + LastNo := "No."; + end; + } + dataitem("G/L Account Net Change"; "G/L Account Net Change") + { + column(HavingNoDetail; HavingNoDetail) + { + } + column(GL_Account_Net_Change; "Net Change in Jnl.") + { + } + column(GL_Account_No; "No.") + { + } + column(General_amount_for_the_general_ledgerCaption; General_amount_for_the_general_ledgerCaptionLbl) + { + } + } + } + + requestpage + { + + layout + { + } + + actions + { + } + } + + labels + { + } + + trigger OnPostReport() + begin + GLAccountNetChange.DeleteAll(); + end; + + var + TempPostingBuffer: Record "Payment Post. Buffer FR" temporary; + GLAccountNetChange: Record "G/L Account Net Change"; + TotalDebit: Decimal; + TotalCredit: Decimal; + FirstNo: Code[20]; + LastNo: Code[20]; + HavingNoDetail: Boolean; + General_Customer_ledger_reconciliationCaptionLbl: Label 'General/Customer ledger reconciliation'; + CurrReport_PAGENOCaptionLbl: Label 'Page'; + G_L_Entry__Posting_Date_CaptionLbl: Label 'Posting Date'; + General_AmountCaptionLbl: Label 'General Amount'; + Total_amount_for_the_customerCaptionLbl: Label 'Total amount for the customer'; + Total_amount_for_the_general_ledgerCaptionLbl: Label 'Total amount for the general ledger'; + General_amount_for_the_general_ledgerCaptionLbl: Label 'General amount for the general ledger'; +} \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.rdlc new file mode 100644 index 0000000000..9a95231ca7 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.rdlc @@ -0,0 +1,245 @@ + + + 0 + + + + SQL + + + None + + + + + + 2in + + + + + + 14 + + true + + + + + + + + + true + + + + + =Fields!Payments_LinesCaption.Value + + + + + + 13 + + true + + + + + + + + + true + + + + + =Fields!CurrReport_PAGENOCaption.Value + + + + + + 12 + + true + + + + + + + + + true + + + + + =Fields!FORMAT_TODAY_0_4_.Value + + + + + + 11 + + true + + + + 4 + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!Payment_Line__No___Control1120011Caption.Value) + + + + + + 20 + + + + + + + + true + + + + + =First(Fields!Payment_Line_AmountCaption.Value) + + + + + + + 19 + + + 2 + + + + + + + true + + + + + =First(Fields!Payment_Line__Account_Type_Caption.Value) + + + + + + 18 + + + + + + + + true + + + + + =First(Fields!Payment_Line__Account_No__Caption.Value) + + + + + + 17 + + + + + + + + true + + + + + =First(Fields!Payment_Line__Posting_Group_Caption.Value) + + + + + + 16 + + + + + + + + true + + + + + =First(Fields!Payment_Line__Due_Date_Caption.Value) + + + + + + 15 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox2 + + + 7 + + + + + + + + + + + + 0.846cm + + + + + true + + + + + =Code.IsHeaderShow() + + + + + + textbox9 + + true + + + + + + + + + true + + + + + + + + + + + textbox10 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!Payment_Line__No__Caption.Value) + + + + + + 10 + + + 2 + + + + + + + true + + + + + =First(Fields!Payment_Line__No__.Value) + + + + + + + 9 + + + 3 + + + + + + + + true + + + + + + + + 2 + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox1 + 7 + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Payment_Line__No__.Value + + + + + + + 5 + + + + + + + + true + true + + + + + =Fields!Payment_Line_Amount.Value + + + + + + + 4 + + + 2 + + + + + + + true + + + + + =Fields!Payment_Line__Account_Type_.Value + + + + + + + 3 + + + + + + + + true + + + + + =Fields!Payment_Line__Account_No__.Value + + + + + + + 2 + + + + + + + + true + + + + + =Fields!Payment_Line__Posting_Group_.Value + + + + + + + 1 + + + + + + + + true + + + + + =Fields!Payment_Line__Due_Date_.Value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + true + true + + + After + true + true + + + After + true + true + + + + + =Fields!Payment_Line__No__.Value + + + + + + =not(Code.footer) + + After + true + + + After + true + + + After + true + + + + Detail + + + + + Detail_Collection + Output + true + + + + + + DataSet_Result + 9.75cm + + + 3.46337cm + + 18.15cm + + + 1.692cm + true + true + + + true + + + + + =Globals!PageNumber + + + + + + + 0.423cm + 17.7cm + 0.423cm + 5 + + + + true + true + + + + + =User!UserID + + + + + + + 0.846cm + 14.9cm + 0.423cm + 4 + + + + true + + + + + =ReportItems!FORMAT_TODAY_0_4_.Value + + + + + + + 15cm + 0.423cm + 3 + + + + true + + + + + =ReportItems!COMPANYNAME.Value + + + + + + 0.423cm + 0.423cm + 7.5cm + 2 + + + + true + + + + + =ReportItems!Payments_LinesCaption.Value + + + + + + 0.423cm + 7.5cm + 1 + + + + true + + + + + =ReportItems!CurrReport_PAGENOCaption.Value + + + + + + 0.423cm + 16.95cm + 0.423cm + 0.75cm + + + + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + +Public Shared footer As Boolean +Public Function IsHeaderShow() + footer=true +End Function + =User!Language + true + Invalid + bd5c9901-bc30-4b2f-b650-4077c13d2f1d + + + + + FORMAT_TODAY_0_4_ + + + COMPANYNAME + + + USERID + + + Payment_Line__No__ + + + Payment_Line__No___Control1120011 + + + Payment_Line_Amount + + + Payment_Line_AmountFormat + + + Payment_Line__Account_Type_ + + + Payment_Line__Account_No__ + + + Payment_Line__Posting_Group_ + + + Payment_Line__Due_Date_ + + + Payment_Line_Line_No_ + + + Payments_LinesCaption + + + CurrReport_PAGENOCaption + + + Payment_Line__No___Control1120011Caption + + + Payment_Line_AmountCaption + + + Payment_Line__Account_Type_Caption + + + Payment_Line__Account_No__Caption + + + Payment_Line__Posting_Group_Caption + + + Payment_Line__Due_Date_Caption + + + Payment_Line__No__Caption + + + + DataSource + + + + + \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/PaymentListFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/PaymentListFR.Report.al new file mode 100644 index 0000000000..0fb9f4ec15 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/PaymentListFR.Report.al @@ -0,0 +1,104 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +report 10845 "Payment List FR" +{ + DefaultLayout = RDLC; + RDLCLayout = './src/Reports/PaymentList.rdlc'; + Caption = 'Payment List'; + + dataset + { + dataitem("Payment Line"; "Payment Line FR") + { + DataItemTableView = sorting("No.", "Line No."); + RequestFilterFields = "No."; + RequestFilterHeading = 'Payment lines'; + column(FORMAT_TODAY_0_4_; Format(Today, 0, 4)) + { + } + column(COMPANYNAME; COMPANYPROPERTY.DisplayName()) + { + } + column(USERID; UserId) + { + } + column(Payment_Line__No__; "No.") + { + } + column(Payment_Line__No___Control1120011; "No.") + { + } + column(Payment_Line_Amount; Amount) + { + } + column(Payment_Line__Account_Type_; "Account Type") + { + } + column(Payment_Line__Account_No__; "Account No.") + { + } + column(Payment_Line__Posting_Group_; "Posting Group") + { + } + column(Payment_Line__Due_Date_; Format("Due Date")) + { + } + column(Payment_Line_Line_No_; "Line No.") + { + } + column(Payments_LinesCaption; Payments_LinesCaptionLbl) + { + } + column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl) + { + } + column(Payment_Line__No___Control1120011Caption; FieldCaption("No.")) + { + } + column(Payment_Line_AmountCaption; FieldCaption(Amount)) + { + } + column(Payment_Line__Account_Type_Caption; FieldCaption("Account Type")) + { + } + column(Payment_Line__Account_No__Caption; FieldCaption("Account No.")) + { + } + column(Payment_Line__Posting_Group_Caption; FieldCaption("Posting Group")) + { + } + column(Payment_Line__Due_Date_Caption; Payment_Line__Due_Date_CaptionLbl) + { + } + column(Payment_Line__No__Caption; FieldCaption("No.")) + { + } + } + } + + requestpage + { + + layout + { + } + + actions + { + } + } + + labels + { + } + + var + Payments_LinesCaptionLbl: Label 'Payments Lines'; + CurrReport_PAGENOCaptionLbl: Label 'Page'; + Payment_Line__Due_Date_CaptionLbl: Label 'Due Date'; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.Report.al new file mode 100644 index 0000000000..4ab1587347 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.Report.al @@ -0,0 +1,315 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Customer; + +report 10846 "Recapitulation Form FR" +{ + DefaultLayout = RDLC; + RDLCLayout = './src/Reports/RecapitulationFormFR.rdlc'; + Caption = 'Recapitulation Form'; + + dataset + { + dataitem("Bank Account"; "Bank Account") + { + PrintOnlyIfDetail = true; + RequestFilterFields = "No."; + column(BankAccAddr_1_; BankAccAddr[1]) + { + } + column(BankAccAddr_2_; BankAccAddr[2]) + { + } + column(BankAccAddr_3_; BankAccAddr[3]) + { + } + column(BankAccAddr_4_; BankAccAddr[4]) + { + } + column(BankAccAddr_5_; BankAccAddr[5]) + { + } + column(BankAccAddr_6_; BankAccAddr[6]) + { + } + column(BankAccAddr_7_; BankAccAddr[7]) + { + } + column(BankAccAddr_8_; BankAccAddr[8]) + { + } + column(Bank_Account__Bank_Account_No__; "Bank Account No.") + { + } + column(Bank_Account__Bank_Branch_No__; "Bank Branch No.") + { + } + column(CompanyAddr_2_; CompanyAddr[2]) + { + } + column(CompanyAddr_3_; CompanyAddr[3]) + { + } + column(CompanyAddr_4_; CompanyAddr[4]) + { + } + column(CompanyAddr_5_; CompanyAddr[5]) + { + } + column(CompanyAddr_6_; CompanyAddr[6]) + { + } + column(CompanyAddr_1_; CompanyAddr[1]) + { + } + column(STRSUBSTNO_Text001_FORMAT_WORKDATE_0_4__; StrSubstNo(Text001Lbl, Format(WorkDate(), 0, 4))) + { + } + column(CONVERTSTR_FORMAT__RIB_Key__2_______0__; ConvertStr(Format("RIB Key FR", 2), ' ', '0')) + { + } + column(Bank_Account__Agency_Code_; "Agency Code FR") + { + } + column(Bank_Account__No__; "No.") + { + } + column(Bank_Account__Bank_Account_No__Caption; FieldCaption("Bank Account No.")) + { + } + column(Bank_Account__Bank_Branch_No__Caption; FieldCaption("Bank Branch No.")) + { + } + column(Checks_Caption; Checks_CaptionLbl) + { + } + column(No_Caption; No_CaptionLbl) + { + } + column(Customer_No_Caption; Customer_No_CaptionLbl) + { + } + column(Customer_NameCaption; Customer_NameCaptionLbl) + { + } + column(CustBankAccNoCaption; CustBankAccNoCaptionLbl) + { + } + column(CustBankAcc_CodeCaption; CustBankAcc_CodeCaptionLbl) + { + } + column(CustBankAcc_NameCaption; CustBankAcc_NameCaptionLbl) + { + } + column(Gen__Journal_Line__AmountCaption; Gen__Journal_Line__AmountCaptionLbl) + { + } + column(Recapitulation_FormCaption; Recapitulation_FormCaptionLbl) + { + } + column(Gen__Journal_Line___Currency_Code_Caption; Gen__Journal_Line___Currency_Code_CaptionLbl) + { + } + column(CONVERTSTR_FORMAT__RIB_Key__2_______0__Caption; CONVERTSTR_FORMAT__RIB_Key__2_______0__CaptionLbl) + { + } + column(Bank_Account__Agency_Code_Caption; FieldCaption("Agency Code FR")) + { + } + dataitem("Gen. Journal Line"; "Gen. Journal Line") + { + DataItemTableView = sorting("Journal Template Name", "Journal Batch Name", "Posting Date", "Document No.") where("Document Type" = const(Payment)); + RequestFilterFields = "Posting Date", "Document No."; + column(LineNum; LineNum) + { + } + column(GenJnlLine_Amount; "Gen. Journal Line".Amount) + { + } + column(CurrencyCode; CurrencyCode) + { + } + column(Gen__Journal_Line_Journal_Template_Name; "Journal Template Name") + { + } + column(Gen__Journal_Line_Journal_Batch_Name; "Journal Batch Name") + { + } + column(Gen__Journal_Line_Line_No_; "Line No.") + { + } + column(Gen__Journal_Line_Account_No_; "Account No.") + { + } + column(LineNumCaption; LineNumCaptionLbl) + { + } + column(GenJnlLine_AmountCaption; GenJnlLine_AmountCaptionLbl) + { + } + dataitem(Customer; Customer) + { + DataItemLink = "No." = field("Account No."); + DataItemTableView = sorting("No."); + column(Gen__Journal_Line___Currency_Code_; "Gen. Journal Line"."Currency Code") + { + } + column(Gen__Journal_Line__Amount; -"Gen. Journal Line".Amount) + { + } + column(CustBankAcc_Name; CustBankAcc.Name) + { + } + column(CustBankAccNo; CustBankAccNo) + { + } + column(CustBankAcc_Code; CustBankAcc.Code) + { + } + column(Customer_Name; Name) + { + } + column(Gen__Journal_Line___Account_No__; "Gen. Journal Line"."Account No.") + { + } + column(LineNum_Control1120037; LineNum) + { + } + column(Customer_No_; "No.") + { + } + + trigger OnAfterGetRecord() + begin + if CustBankAcc.Get(Customer."No.", "Gen. Journal Line"."Recipient Bank Account") then + CustBankAccNo := CustBankAcc."Bank Branch No." + ' ' + + CustBankAcc."Agency Code FR" + ' ' + + CustBankAcc."Bank Account No." + ' ' + + ConvertStr(Format(CustBankAcc."RIB Key FR", 2), ' ', '0') + else begin + CustBankAccNo := ''; + CustBankAcc.Code := ''; + CustBankAcc.Name := ''; + end; + end; + } + + trigger OnAfterGetRecord() + begin + if not ("Gen. Journal Line"."Account Type" in ["Gen. Journal Line"."Account Type"::Customer, + "Gen. Journal Line"."Account Type"::"G/L Account"]) + then + CurrReport.Skip(); + + if "Gen. Journal Line"."Account Type" = "Gen. Journal Line"."Account Type"::"G/L Account" then + LineNum := LineNum + else + LineNum := IncStr(LineNum); + + if GenJnlLine."Currency Code" = '' then + CurrencyCode := GLSetup."LCY Code" + else + CurrencyCode := GenJnlLine."Currency Code"; + end; + + trigger OnPostDataItem() + begin + if not GenJnlLine.FindFirst() then + CurrReport.Skip(); + + if BalanceAmount then + GenJnlLine."Amount (LCY)" := -GenJnlLine."Amount (LCY)"; + end; + + trigger OnPreDataItem() + begin + LineNum := '0'; + GenJnlLine.Copy("Gen. Journal Line"); + GenJnlLine.SetRange("Bal. Account Type", "Account Type"::"Bank Account"); + GenJnlLine.SetRange("Bal. Account No.", "Bank Account"."No."); + if GenJnlLine.FindFirst() then begin + BalanceAmount := true; + "Gen. Journal Line".SetRange("Bal. Account No.", "Bank Account"."No."); + "Gen. Journal Line".SetRange("Posting Date", GenJnlLine."Posting Date"); + end else begin + GenJnlLine.Copy("Gen. Journal Line"); + GenJnlLine.SetRange("Account Type", "Account Type"::"Bank Account"); + GenJnlLine.SetRange("Account No.", "Bank Account"."No."); + BalanceAmount := false; + if GenJnlLine.FindFirst() then begin + "Gen. Journal Line".SetRange("Document No.", GenJnlLine."Document No."); + "Gen. Journal Line".SetRange("Posting Date", GenJnlLine."Posting Date"); + end else + CurrReport.Break(); + end; + end; + } + + trigger OnAfterGetRecord() + begin + FormatAddr.BankAcc(BankAccAddr, "Bank Account"); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + FormatAddr.Company(CompanyAddr, CompanyInfo); + + GLSetup.Get(); + end; + } + } + + requestpage + { + + layout + { + } + + actions + { + } + } + + labels + { + } + + var + CompanyInfo: Record "Company Information"; + GLSetup: Record "General Ledger Setup"; + CustBankAcc: Record "Customer Bank Account"; + GenJnlLine: Record "Gen. Journal Line"; + FormatAddr: Codeunit "Format Address"; + CompanyAddr: array[8] of Text[100]; + BankAccAddr: array[8] of Text[100]; + CustBankAccNo: Text[250]; + LineNum: Code[10]; + CurrencyCode: Code[10]; + BalanceAmount: Boolean; + Checks_CaptionLbl: Label 'Checks:'; + No_CaptionLbl: Label 'No.'; + Customer_No_CaptionLbl: Label 'Customer No.'; + Customer_NameCaptionLbl: Label 'Customer Name'; + CustBankAccNoCaptionLbl: Label 'Cust. Bank Account No.'; + CustBankAcc_CodeCaptionLbl: Label 'Cust. Bank Account Code'; + CustBankAcc_NameCaptionLbl: Label 'Cust. Bank Account Name'; + Gen__Journal_Line__AmountCaptionLbl: Label 'Amount'; + Recapitulation_FormCaptionLbl: Label 'Recapitulation Form'; + Gen__Journal_Line___Currency_Code_CaptionLbl: Label 'Currency Code'; + CONVERTSTR_FORMAT__RIB_Key__2_______0__CaptionLbl: Label 'RIB Key'; + LineNumCaptionLbl: Label 'Total number of checks:'; + GenJnlLine_AmountCaptionLbl: Label 'Total Amount'; + Text001Lbl: Label 'The %1', Comment = '%1 = Work Date'; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.rdlc new file mode 100644 index 0000000000..bcdc74b6e2 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.rdlc @@ -0,0 +1,3117 @@ + + + 0 + + + + SQL + + + None + 24ecd37f-cab9-4f52-bd2b-aa209a2ef428 + + + + + + + + + + + 0.75cm + + + 1.95cm + + + 1.05cm + + + 0.6cm + + + 1.65cm + + + 1.65cm + + + 2.5cm + + + 1.25cm + + + 3.45cm + + + 0.45cm + + + 1.5cm + + + 1.65cm + + + + + 0.423cm + + + + + true + + + + + =First(Fields!Recapitulation_FormCaption.Value) + + + + + + 80 + + + 5 + + + + + + + + + + true + + + + + + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 12 + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + true + + + + + =First(Fields!STRSUBSTNO_Text001_FORMAT_WORKDATE_0_4__.Value) + + + + + + 76 + + + 3 + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_1_.Value) + + + + + + 74 + + + 5 + + + + + + + + + + true + + + + + + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_2_.Value) + + + + + + 72 + + + 5 + + + + + + + + + + true + + + + + + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_3_.Value) + + + + + + 70 + + + 5 + + + + + + + + + + true + + + + + + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_4_.Value) + + + + + + 68 + + + 5 + + + + + + + + + + true + + + + + + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_5_.Value) + + + + + + 66 + + + 5 + + + + + + + + + + true + + + + + + + + 2 + + + + + + + true + + + + + =First(Fields!BankAccAddr_1_.Value) + + + + + + 64 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CompanyAddr_6_.Value) + + + + + + 62 + + + 5 + + + + + + + + + + true + + + + + + + + 2 + + + + + + + true + + + + + =First(Fields!BankAccAddr_2_.Value) + + + + + + 60 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox245 + 58 + + + 7 + + + + + + + + + + + + true + + + + + =First(Fields!BankAccAddr_3_.Value) + + + + + + 57 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox237 + 55 + + + 7 + + + + + + + + + + + + true + + + + + =First(Fields!BankAccAddr_4_.Value) + + + + + + 54 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox229 + 52 + + + 7 + + + + + + + + + + + + true + + + + + =First(Fields!BankAccAddr_5_.Value) + + + + + + 51 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox221 + 49 + + + 7 + + + + + + + + + + + + true + + + + + =First(Fields!BankAccAddr_6_.Value) + + + + + + 48 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox213 + 46 + + + 7 + + + + + + + + + + + + true + + + + + =First(Fields!BankAccAddr_7_.Value) + + + + + + 45 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox205 + 43 + + + 7 + + + + + + + + + + + + true + + + + + =First(Fields!BankAccAddr_8_.Value) + + + + + + 42 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox107 + 40 + + + 12 + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!Bank_Account__Bank_Account_No__Caption.Value) + + + + + + 39 + + + 3 + + + + + + + + true + + + + + =First(Fields!Bank_Account__Bank_Account_No__.Value) + + + + + + 38 + + + 4 + + + + + + + + + true + + + + + + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!Bank_Account__Agency_Code_Caption.Value) + + + + + + 36 + + + 3 + + + + + + + + true + + + + + =First(Fields!Bank_Account__Agency_Code_.Value) + + + + + + 35 + + + 4 + + + + + + + + + true + + + + + + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!Bank_Account__Bank_Branch_No__Caption.Value) + + + + + + 33 + + + 3 + + + + + + + + true + + + + + =First(Fields!Bank_Account__Bank_Branch_No__.Value) + + + + + + 32 + + + 4 + + + + + + + + + true + + + + + + + + 5 + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!CONVERTSTR_FORMAT__RIB_Key__2_______0__Caption.Value) + + + + + + 30 + + + 3 + + + + + + + + true + + + + + =First(Fields!CONVERTSTR_FORMAT__RIB_Key__2_______0__.Value) + + + + + + 29 + + + 4 + + + + + + + + + true + + + + + + + + 5 + + + + + + + + + + 1.269cm + + + + + true + + + + + + + + + + + textbox269 + 27 + + + 12 + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!Checks_Caption.Value) + + + + + + 26 + + + 3 + + + + + + + + true + + + + + + + + 9 + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox287 + 24 + + + 12 + + + + + + + + + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!No_Caption.Value) + + + + + + + 23 + + + + + + + + true + + + + + =First(Fields!Customer_No_Caption.Value) + + + + + + 22 + + + + + + + + true + + + + + =First(Fields!Customer_NameCaption.Value) + + + + + + 21 + + + 3 + + + + + + + + true + + + + + =First(Fields!CustBankAcc_CodeCaption.Value) + + + + + + 20 + + + + + + + + true + + + + + =First(Fields!CustBankAccNoCaption.Value) + + + + + + 19 + + + 2 + + + + + + + true + + + + + =First(Fields!CustBankAcc_NameCaption.Value) + + + + + + 18 + + + + + + + + true + + + + + =First(Fields!Gen__Journal_Line__AmountCaption.Value) + + + + + + + 17 + + + 2 + + + + + + + true + + + + + =First(Fields!Gen__Journal_Line___Currency_Code_Caption.Value) + + + + + + 16 + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!LineNum_Control1120037.Value + + + + + + + textbox1 + 7 + + + + + + + + true + + + + + =Fields!Customer_No_.Value + + + + + + + textbox2 + 6 + + + + + + + + true + + + + + =Fields!Customer_Name.Value + + + + + + + textbox129 + 5 + + + 3 + + + + + + + + true + + + + + =Fields!CustBankAcc_Code.Value + + + + + + + textbox12 + 4 + + + + + + + + true + + + + + =Fields!CustBankAccNo.Value + + + + + + + textbox13 + 3 + + + 2 + + + + + + + true + + + + + =Fields!CustBankAcc_Name.Value + + + + + + + textbox14 + 2 + + + + + + + + true + true + + + + + =Fields!Gen__Journal_Line__Amount.Value + + + + + + + textbox160 + 1 + + + 2 + + + + + + + true + + + + + =Fields!Gen__Journal_Line___Currency_Code_.Value + + + + + + + textbox16 + + + + + + + + 1.269cm + + + + + true + + + + + + + + 12 + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!LineNumCaption.Value) + + + + + + 14 + + + 4 + + + + + + + + + true + + + + + =Last(Fields!LineNum.Value) + + + + + + + 13 + + + + + + + + true + + + + + + + + 3 + + + + + + + + true + + + + + =First(Fields!GenJnlLine_AmountCaption.Value) + + + + + + 11 + + + + + + + + true + true + + + + + =-Sum(Fields!GenJnlLine_Amount.Value) + + + + + + 10 + + + 2 + + + + + + + true + + + + + =First(Fields!CurrencyCode.Value) + + + + + + 9 + + + + + + + + 0.846cm + + + + + true + + + + + + + + 12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =Fields!Bank_Account__No__.Value + + + End + + + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + + Detail + + + + + Detail_Collection + Output + true + + + Before + true + + + Before + true + + + Before + true + + + + + + DataSet_Result + + + 14.382cm + + 18.45cm + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + + =User!Language + true + Invalid + ececd71d-2a15-4172-8b73-685b0408ecc4 + + + + + BankAccAddr_1_ + + + BankAccAddr_2_ + + + BankAccAddr_3_ + + + BankAccAddr_4_ + + + BankAccAddr_5_ + + + BankAccAddr_6_ + + + BankAccAddr_7_ + + + BankAccAddr_8_ + + + Bank_Account__Bank_Account_No__ + + + Bank_Account__Bank_Branch_No__ + + + CompanyAddr_2_ + + + CompanyAddr_3_ + + + CompanyAddr_4_ + + + CompanyAddr_5_ + + + CompanyAddr_6_ + + + CompanyAddr_1_ + + + STRSUBSTNO_Text001_FORMAT_WORKDATE_0_4__ + + + CONVERTSTR_FORMAT__RIB_Key__2_______0__ + + + Bank_Account__Agency_Code_ + + + Bank_Account__No__ + + + Bank_Account__Bank_Account_No__Caption + + + Bank_Account__Bank_Branch_No__Caption + + + Checks_Caption + + + No_Caption + + + Customer_No_Caption + + + Customer_NameCaption + + + CustBankAccNoCaption + + + CustBankAcc_CodeCaption + + + CustBankAcc_NameCaption + + + Gen__Journal_Line__AmountCaption + + + Recapitulation_FormCaption + + + Gen__Journal_Line___Currency_Code_Caption + + + CONVERTSTR_FORMAT__RIB_Key__2_______0__Caption + + + Bank_Account__Agency_Code_Caption + + + LineNum + + + GenJnlLine_Amount + + + GenJnlLine_AmountFormat + + + CurrencyCode + + + Gen__Journal_Line_Journal_Template_Name + + + Gen__Journal_Line_Journal_Batch_Name + + + Gen__Journal_Line_Line_No_ + + + Gen__Journal_Line_Account_No_ + + + LineNumCaption + + + GenJnlLine_AmountCaption + + + Gen__Journal_Line___Currency_Code_ + + + Gen__Journal_Line__Amount + + + Gen__Journal_Line__AmountFormat + + + CustBankAcc_Name + + + CustBankAccNo + + + CustBankAcc_Code + + + Customer_Name + + + Gen__Journal_Line___Account_No__ + + + LineNum_Control1120037 + + + Customer_No_ + + + + DataSource + + + + + \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Remittance.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Remittance.rdlc new file mode 100644 index 0000000000..94f78950d9 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Remittance.rdlc @@ -0,0 +1,3587 @@ + + + 0 + + + + SQL + + + None + fb5a3061-bc43-4772-8295-cd8cafc0a095 + + + + + + + + + + + 1.58727cm + + + 0.81602cm + + + 0.71711cm + + + 0.14837cm + + + 1.5873cm + + + 2.53968cm + + + 3.1746cm + + + 1.5873cm + + + 1.5873cm + + + 0.63492cm + + + 1.90476cm + + + 2.05302cm + + + 1.26984cm + + + + + 0.423cm + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + + + + + =iif(Fields!OutputNo.Value = 1, Fields!Text003.Value, Fields!Text003.Value + " " + Fields!Text000.Value) + + + + + + 98 + + + 5 + + + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + + 93 + + true + + + + 13 + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!CompanyAddr_1_.Value + + + + + + 92 + + + 6 + + + + + + + + + + + true + + + + + + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!CompanyAddr_2_.Value + + + + + + 90 + + + 6 + + + + + + + + + + + true + + + + + + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!CompanyAddr_3_.Value + + + + + + 88 + + + 6 + + + + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!BankAccAddr_1_.Value + + + + + + 82 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!CompanyAddr_4_.Value + + + + + + 86 + + + 6 + + + + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!BankAccAddr_2_.Value + + + + + + 78 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!CompanyAddr_5_.Value + + + + + + 84 + + + 6 + + + + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!BankAccAddr_3_.Value + + + + + + 73 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!CompanyAddr_6_.Value + + + + + + 80 + + + 6 + + + + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!BankAccAddr_4_.Value + + + + + + 68 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!CompanyInfo__Phone_No__Caption.Value + + + + + + 76 + + + 2 + + + + + + + true + + + + + =Fields!CompanyInfo__Phone_No__.Value + + + + + + 75 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!BankAccAddr_5_.Value + + + + + + 63 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!CompanyInfo__Fax_No__Caption.Value + + + + + + 71 + + + 2 + + + + + + + true + + + + + =Fields!CompanyInfo__Fax_No__.Value + + + + + + 70 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!BankAccAddr_6_.Value + + + + + + 60 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!CompanyInfo__VAT_Registration_No__Caption.Value + + + + + + 66 + + + 2 + + + + + + + true + + + + + =Fields!CompanyInfo__VAT_Registration_No__.Value + + + + + + 65 + + + 4 + + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!BankAccAddr_7_.Value + + + + + + 57 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 13 + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + + + + + =Fields!PaymtHeader__Bank_Branch_No__Caption.Value + + + + + + 50 + + + 2 + + + + + + + true + + + + + =Fields!PaymtHeader__Bank_Branch_No__.Value + + + + + + + 49 + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 7 + + + + + + + + + + + + true + + + + + =Fields!PaymtHeader__Agency_Code_Caption.Value + + + + + + 43 + + + 2 + + + + + + + true + + + + + =Fields!PaymtHeader__Agency_Code_.Value + + + + + + + 42 + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!PaymtHeader__No__Caption.Value + + + + + + 54 + + + 3 + + + + + + + + true + true + + + + + + + + + + + + + true + + + + + =Fields!PaymtHeader__No__.Value + + + + + + + 52 + + + 2 + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!PaymtHeader__Bank_Account_No__Caption.Value + + + + + + 38 + + + 2 + + + + + + + true + + + + + =Fields!PaymtHeader__Bank_Account_No__.Value + + + + + + + 37 + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!PrintCurrencyCodeCaption.Value + + + + + + 47 + + + 3 + + + + + + + + true + true + + + + + + + + + + + + + true + + + + + =Fields!PrintCurrencyCode.Value + + + + + + + 45 + + + 2 + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!PaymtHeader_IBANCaption.Value + + + + + + 38 + + + 2 + + + + + + + true + + + + + =Fields!PaymtHeader_IBAN.Value + + + + + + + 37 + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Operation.Value + + + + + + 40 + + + 4 + + + + + + + + + true + + + + + + + + 3 + + + + + + + + true + + + + + =Fields!PaymtHeader__SWIFT_Code_Caption.Value + + + + + + 38 + + + 2 + + + + + + + true + + + + + =Fields!PaymtHeader__SWIFT_Code_.Value + + + + + + + 37 + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 13 + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + true + + + + + =Fields!FORMAT_PostingDate_0_4_.Value + + + + + + + 33 + + + 4 + + + + + + + + + true + true + + + + + + + + + + + + + 0.846cm + + + + + true + + + + + + + + 13 + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + =Fields!All_amounts_are_in_company_currencyCaption.Value + + + + + + + textbox5 + + =iif(Fields!PrintAmountInLCYCode.Value, FALSE, TRUE) + + NoOutput + + + 13 + + + + + + + + + + + + + + + + + + 0.846cm + + + + + true + true + + + + + =First(Fields!Payment_Line__Due_Date_Caption.Value) + + + + + + + 28 + + + + + + + + true + true + + + + + =First(Fields!Payment_Line__No__Caption.Value) + + + + + + + 27 + + + 2 + + + + + + + true + true + + + + + + + + + + + 26 + + + + + + + + true + true + + + + + =First(Fields!Payment_Line__Drawee_Reference_Caption.Value) + + + + + + + 25 + + + + + + + + true + true + + + + + =First(Fields!Payment_Line__Account_No__Caption.Value) + + + + + + 24 + + + + + + + + true + true + + + + + =First(Fields!Cust_NameCaption.Value) + + + + + + 23 + + + + + + + + true + true + + + + + =First(Fields!Payment_Line__Bank_Branch_No__Caption.Value) + + + + + + 22 + + + + + + + + true + true + + + + + =First(Fields!Payment_Line__Agency_Code_Caption.Value) + + + + + + 21 + + + + + + + + true + true + + + + + =First(Fields!Payment_Line__Bank_Account_No__Caption.Value) + + + + + + 20 + + + 2 + + + + + + + true + true + + + + + =First(Fields!StatementAmount_Control1120031Caption.Value) + + + + + + + 19 + + + 2 + + + + + + + 0.63492cm + + + + + true + true + + + + + + + + + + + + textbox2 + + + 5 + + + + + + + + + + true + true + + + + + =First(Fields!Payment_Line__SWIFT_Code_Caption.Value) + + + + + + + + + + + + + true + true + + + + + + + + + + + + textbox23 + + + + + + + + true + true + + + + + =First(Fields!Payment_Line_IBANCaption.Value) + + + + + + + + 4 + + + + + + + + + true + true + + + + + + + + + + + + textbox28 + + + 2 + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + + textbox3 + 18 + + + 13 + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Payment_Line__Due_Date_.Value + + + + + + 17 + + + + + + + + true + true + + + + + =Fields!Payment_Line__No__.Value + + + + + + + 16 + + + 2 + + + + + + + true + + + + + =Fields!EmptyStringCaption.Value + + + + + + 15 + + + + + + + + true + + + + + =Fields!Payment_Line__Drawee_Reference_.Value + + + + + + 14 + + + + + + + + true + + + + + =Fields!Payment_Line__Account_No__.Value + + + + + + + 13 + + + + + + + + true + true + + + + + =Fields!Cust_Name.Value + + + + + + 12 + + + + + + + + true + + + + + =Fields!Payment_Line__Bank_Branch_No__.Value + + + + + + 11 + + + + + + + + true + + + + + =Fields!Payment_Line__Agency_Code_.Value + + + + + + 10 + + + + + + + + true + + + + + =Fields!Payment_Line__Bank_Account_No__.Value + + + + + + 9 + + + 2 + + + + + + + true + + + + + =Fields!StatementAmount.Value + + + + + + 8 + + + + + + + + true + + + + + =Fields!PrintCurrencyCode_Control1120060.Value + + + + + + 7 + + + + + + + + 0.423cm + + + + + true + + + + + + + + 5 + + + + + + + + + + true + + + + + =Fields!Payment_Line__SWIFT_Code_.Value + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + + + + + =Fields!Payment_Line_IBAN.Value + + + + + + + + 4 + + + + + + + + + true + true + + + + + + + + 2 + + + + + + + 0.423cm + + + + + true + + + + + + + + 13 + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Last(Fields!TotalCaption.Value) + + + + + + 6 + + + 5 + + + + + + + + + + true + + + + + + + + 2 + + + + + + + true + + + + + =Last(Fields!PrintCountingDelivery.Value) + + + + + + 4 + + + 4 + + + + + + + + + true + true + + + + + =Sum(Fields!StatementAmount.Value) + + + + + + 3 + + + + + + + + true + + + + + =First(Fields!PrintCurrencyCode_Control1120060.Value) + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =Fields!OutputNo.Value + + + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + After + true + + + + + =Fields!Payment_Lines1_No_.Value + + + End + + + + + After + true + true + + + After + true + true + + + After + true + true + + + After + true + true + + + + Detail + + + + + + Detail_Collection + Output + true + + + Before + true + + + Before + true + + + + + + + + DataSet_Result + 5.24669in + + + 13.32659cm + + 19.6075cm + + + 0.16654in + true + true + + + true + + + + + =Globals!PageNumber + + + + + + + + + + + 29.7cm + 21cm + 11in + 8.5in + 1cm + 0cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + +Shared Data as Object + +Public Function SetData(NewData as Object) + If NewData <> "" Then + Data = NewData + End If +End Function + +Public Function GetData(Num as Integer) as Object + Return Cstr(Choose(Num, Split(Cstr(Data),Chr(177)))) +End Function + =User!Language + true + Invalid + cb321b4b-8d75-426c-81ba-15ee989d1b8b + + + + + Payment_Lines1_No_ + + + Payment_Lines1_Line_No_ + + + Operation + + + PaymtHeader__No__ + + + STRSUBSTNO_Text003____1__CopyText_ + + + CompanyAddr_1_ + + + CompanyAddr_2_ + + + CompanyAddr_3_ + + + CompanyAddr_4_ + + + CompanyAddr_5_ + + + CompanyAddr_6_ + + + CompanyInfo__Phone_No__ + + + CompanyInfo__Fax_No__ + + + CompanyInfo__VAT_Registration_No__ + + + FORMAT_PostingDate_0_4_ + + + BankAccAddr_4_ + + + BankAccAddr_5_ + + + BankAccAddr_6_ + + + BankAccAddr_7_ + + + BankAccAddr_3_ + + + BankAccAddr_2_ + + + BankAccAddr_1_ + + + PrintCurrencyCode + + + PaymtHeader__Bank_Branch_No__ + + + PaymtHeader__Agency_Code_ + + + PaymtHeader__Bank_Account_No__ + + + OutputNo + + + Text003 + + + Text000 + + + PaymtHeader_IBAN + + + PaymtHeader__SWIFT_Code_ + + + PageLoop_Number + + + PaymtHeader__No__Caption + + + CompanyInfo__Phone_No__Caption + + + CompanyInfo__Fax_No__Caption + + + CompanyInfo__VAT_Registration_No__Caption + + + PrintCurrencyCodeCaption + + + PaymtHeader__Bank_Branch_No__Caption + + + PaymtHeader__Agency_Code_Caption + + + PaymtHeader__Bank_Account_No__Caption + + + PaymtHeader_IBANCaption + + + PaymtHeader__SWIFT_Code_Caption + + + PrintAmountInLCYCode + + + StatementAmount + + + StatementAmountFormat + + + PrintCurrencyCode_Control1120060 + + + Cust_Name + + + StatementAmount_Control1120031 + + + StatementAmount_Control1120031Format + + + PrintCurrencyCode_Control1120061 + + + Payment_Line__Due_Date_ + + + Payment_Line__No__ + + + Payment_Line__Account_No__ + + + Payment_Line__Drawee_Reference_ + + + Payment_Line__Bank_Branch_No__ + + + Payment_Line__Agency_Code_ + + + Payment_Line__Bank_Account_No__ + + + Payment_Line__SWIFT_Code_ + + + Payment_Line_IBAN + + + StatementAmount_Control1120036 + + + StatementAmount_Control1120036Format + + + PrintCurrencyCode_Control1120063 + + + StatementAmount_Control1120039 + + + StatementAmount_Control1120039Format + + + PrintCountingDelivery + + + PrintCurrencyCode_Control1120064 + + + Payment_Line_Line_No_ + + + All_amounts_are_in_company_currencyCaption + + + Cust_NameCaption + + + StatementAmount_Control1120031Caption + + + Payment_Line__Drawee_Reference_Caption + + + Payment_Line__No__Caption + + + Payment_Line__Due_Date_Caption + + + Payment_Line__Account_No__Caption + + + Payment_Line__Bank_Branch_No__Caption + + + Payment_Line__Agency_Code_Caption + + + Payment_Line__Bank_Account_No__Caption + + + Payment_Line__SWIFT_Code_Caption + + + Payment_Line_IBANCaption + + + ReportCaption + + + EmptyStringCaption + + + ReportCaption_Control1120015 + + + TotalCaption + + + + DataSource + + + + + \ No newline at end of file diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/RemittanceFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/RemittanceFR.Report.al new file mode 100644 index 0000000000..92efd08b33 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/RemittanceFR.Report.al @@ -0,0 +1,457 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Customer; +using System.Utilities; + +report 10847 "Remittance FR" +{ + DefaultLayout = RDLC; + RDLCLayout = './src/Reports/Remittance.rdlc'; + Caption = 'Remittance'; + + dataset + { + dataitem("Payment Lines1"; "Payment Line FR") + { + DataItemTableView = sorting("No.", "Line No.") where("Account Type" = const(Customer)); + MaxIteration = 1; + PrintOnlyIfDetail = true; + RequestFilterFields = "No."; + RequestFilterHeading = 'Payment lines'; + column(Payment_Lines1_No_; "No.") + { + } + column(Payment_Lines1_Line_No_; "Line No.") + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem(PageLoop; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(Operation; Operation) + { + } + column(PaymtHeader__No__; PaymtHeader."No.") + { + } + column(STRSUBSTNO_Text003____1__CopyText_; StrSubstNo(Text003Lbl + ' %1', CopyText)) + { + } + column(CompanyAddr_1_; CompanyAddr[1]) + { + } + column(CompanyAddr_2_; CompanyAddr[2]) + { + } + column(CompanyAddr_3_; CompanyAddr[3]) + { + } + column(CompanyAddr_4_; CompanyAddr[4]) + { + } + column(CompanyAddr_5_; CompanyAddr[5]) + { + } + column(CompanyAddr_6_; CompanyAddr[6]) + { + } + column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") + { + } + column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") + { + } + column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") + { + } + column(FORMAT_PostingDate_0_4_; Format(PostingDate, 0, 4)) + { + } + column(BankAccAddr_4_; BankAccAddr[4]) + { + } + column(BankAccAddr_5_; BankAccAddr[5]) + { + } + column(BankAccAddr_6_; BankAccAddr[6]) + { + } + column(BankAccAddr_7_; BankAccAddr[7]) + { + } + column(BankAccAddr_3_; BankAccAddr[3]) + { + } + column(BankAccAddr_2_; BankAccAddr[2]) + { + } + column(BankAccAddr_1_; BankAccAddr[1]) + { + } + column(PrintCurrencyCode; PrintCurrencyCode()) + { + } + column(PaymtHeader__Bank_Branch_No__; PaymtHeader."Bank Branch No.") + { + } + column(PaymtHeader__Agency_Code_; PaymtHeader."Agency Code") + { + } + column(PaymtHeader__Bank_Account_No__; PaymtHeader."Bank Account No.") + { + } + column(OutputNo; OutputNo) + { + } + column(Text003; Text003Lbl) + { + } + column(Text000; Text000Lbl) + { + } + column(PaymtHeader_IBAN; PaymtHeader.IBAN) + { + } + column(PaymtHeader__SWIFT_Code_; PaymtHeader."SWIFT Code") + { + } + column(PageLoop_Number; Number) + { + } + column(PaymtHeader__No__Caption; PaymtHeader__No__CaptionLbl) + { + } + column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) + { + } + column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) + { + } + column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) + { + } + column(PrintCurrencyCodeCaption; PrintCurrencyCodeCaptionLbl) + { + } + column(PaymtHeader__Bank_Branch_No__Caption; PaymtHeader__Bank_Branch_No__CaptionLbl) + { + } + column(PaymtHeader__Agency_Code_Caption; PaymtHeader__Agency_Code_CaptionLbl) + { + } + column(PaymtHeader__Bank_Account_No__Caption; PaymtHeader__Bank_Account_No__CaptionLbl) + { + } + column(PaymtHeader_IBANCaption; PaymtHeader_IBANCaptionLbl) + { + } + column(PaymtHeader__SWIFT_Code_Caption; PaymtHeader__SWIFT_Code_CaptionLbl) + { + } + dataitem("Payment Line"; "Payment Line FR") + { + DataItemLink = "No." = field("No."); + DataItemLinkReference = "Payment Lines1"; + DataItemTableView = sorting("No.", "Line No."); + column(PrintAmountInLCYCode; PrintAmountInLCYCode) + { + } + column(StatementAmount; StatementAmount) + { + AutoFormatExpression = ExtrCurrencyCode(); + AutoFormatType = 1; + } + column(PrintCurrencyCode_Control1120060; PrintCurrencyCode()) + { + } + column(Cust_Name; Cust.Name) + { + } + column(StatementAmount_Control1120031; StatementAmount) + { + AutoFormatExpression = ExtrCurrencyCode(); + AutoFormatType = 1; + } + column(PrintCurrencyCode_Control1120061; PrintCurrencyCode()) + { + } + column(Payment_Line__Due_Date_; Format("Due Date")) + { + } + column(Payment_Line__No__; "No.") + { + } + column(Payment_Line__Account_No__; "Account No.") + { + } + column(Payment_Line__Drawee_Reference_; "Drawee Reference") + { + } + column(Payment_Line__Bank_Branch_No__; "Bank Branch No.") + { + } + column(Payment_Line__Agency_Code_; "Agency Code") + { + } + column(Payment_Line__Bank_Account_No__; "Bank Account No.") + { + } + column(Payment_Line__SWIFT_Code_; "SWIFT Code") + { + } + column(Payment_Line_IBAN; IBAN) + { + } + column(StatementAmount_Control1120036; StatementAmount) + { + AutoFormatExpression = ExtrCurrencyCode(); + AutoFormatType = 1; + } + column(PrintCurrencyCode_Control1120063; PrintCurrencyCode()) + { + } + column(StatementAmount_Control1120039; StatementAmount) + { + AutoFormatExpression = ExtrCurrencyCode(); + AutoFormatType = 1; + } + column(PrintCountingDelivery; PrintCountingDelivery()) + { + } + column(PrintCurrencyCode_Control1120064; PrintCurrencyCode()) + { + } + column(Payment_Line_Line_No_; "Line No.") + { + } + column(All_amounts_are_in_company_currencyCaption; All_amounts_are_in_company_currencyCaptionLbl) + { + } + column(Cust_NameCaption; Cust_NameCaptionLbl) + { + } + column(StatementAmount_Control1120031Caption; StatementAmount_Control1120031CaptionLbl) + { + } + column(Payment_Line__Drawee_Reference_Caption; FieldCaption("Drawee Reference")) + { + } + column(Payment_Line__No__Caption; Payment_Line__No__CaptionLbl) + { + } + column(Payment_Line__Due_Date_Caption; Payment_Line__Due_Date_CaptionLbl) + { + } + column(Payment_Line__Account_No__Caption; FieldCaption("Account No.")) + { + } + column(Payment_Line__Bank_Branch_No__Caption; FieldCaption("Bank Branch No.")) + { + } + column(Payment_Line__Agency_Code_Caption; FieldCaption("Agency Code")) + { + } + column(Payment_Line__Bank_Account_No__Caption; FieldCaption("Bank Account No.")) + { + } + column(Payment_Line__SWIFT_Code_Caption; FieldCaption("SWIFT Code")) + { + } + column(Payment_Line_IBANCaption; Payment_Line_IBANCaptionLbl) + { + } + column(ReportCaption; ReportCaptionLbl) + { + } + column(EmptyStringCaption; EmptyStringCaptionLbl) + { + } + column(ReportCaption_Control1120015; ReportCaption_Control1120015Lbl) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + Cust.Get("Account No."); + + if PrintAmountInLCYCode then + StatementAmount := Amount + else + StatementAmount := Amount; + StatementAmount := Abs(Amount); + end; + + trigger OnPreDataItem() + begin + Clear(StatementAmount); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then begin + OutputNo := OutputNo + 1; + CopyText := Text000Lbl; + end; + end; + + trigger OnPreDataItem() + begin + LoopsNumber := Abs(CopiesNumber) + 1; + CopyText := ''; + SetRange(Number, 1, LoopsNumber); + + OutputNo := 1; + end; + } + + trigger OnAfterGetRecord() + begin + PaymtHeader.Get("No."); + PostingDate := PaymtHeader."Posting Date"; + + PaymtHeader.CalcFields("No. of Lines"); + CountStatement := PaymtHeader."No. of Lines"; + + PaymtHeader.TestField("Account Type", PaymtHeader."Account Type"::"Bank Account"); + + FormatAddress.FormatAddr( + BankAccAddr, PaymtHeader."Bank Name", PaymtHeader."Bank Name 2", '', PaymtHeader."Bank Address", PaymtHeader."Bank Address 2", + PaymtHeader."Bank City", PaymtHeader."Bank Post Code", '', ''); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + FormatAddress.Company(CompanyAddr, CompanyInfo); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(Copies_Number; CopiesNumber) + { + ApplicationArea = Basic, Suite; + Caption = 'Number of Copies'; + ToolTip = 'Specifies the number of copies to print.'; + } + field(PrintAmountIn_LCYCode; PrintAmountInLCYCode) + { + ApplicationArea = Basic, Suite; + Caption = 'Print Amounts in LCY'; + ToolTip = 'Specifies whether to print amounts in the local currency.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + CompanyInfo: Record "Company Information"; + Cust: Record Customer; + GLSetup: Record "General Ledger Setup"; + PaymtHeader: Record "Payment Header FR"; + FormatAddress: Codeunit "Format Address"; + BankAccAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + Operation: Text[80]; + LoopsNumber: Integer; + CopiesNumber: Integer; + CopyText: Text[30]; + PrintAmountInLCYCode: Boolean; + StatementAmount: Decimal; + CountStatement: Integer; + PostingDate: Date; + Text001Lbl: Label ' BILL'; + Text002Lbl: Label ' BILLS'; + OutputNo: Integer; + Text003Lbl: Label 'Remittance'; + Text000Lbl: Label 'COPY'; + PaymtHeader__No__CaptionLbl: Label 'Remittance No.'; + CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; + CompanyInfo__Fax_No__CaptionLbl: Label 'FAX No.'; + CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Registration No.'; + PrintCurrencyCodeCaptionLbl: Label 'Currency Code'; + PaymtHeader__Bank_Branch_No__CaptionLbl: Label 'Bank Branch No.'; + PaymtHeader__Agency_Code_CaptionLbl: Label 'Agency Code'; + PaymtHeader__Bank_Account_No__CaptionLbl: Label 'Bank Account No.'; + PaymtHeader_IBANCaptionLbl: Label 'IBAN', Locked = true; + PaymtHeader__SWIFT_Code_CaptionLbl: Label 'SWIFT Code'; + All_amounts_are_in_company_currencyCaptionLbl: Label 'All amounts are in company currency'; + Cust_NameCaptionLbl: Label 'Name'; + StatementAmount_Control1120031CaptionLbl: Label 'Remaining Amount'; + Payment_Line__No__CaptionLbl: Label 'Document No.'; + Payment_Line__Due_Date_CaptionLbl: Label 'Due Date'; + Payment_Line_IBANCaptionLbl: Label 'IBAN', Locked = true; + ReportCaptionLbl: Label 'Report'; + EmptyStringCaptionLbl: Label '/', Locked = true; + ReportCaption_Control1120015Lbl: Label 'Report'; + TotalCaptionLbl: Label 'Total'; + + + procedure ExtrCurrencyCode(): Code[10] + begin + if PrintAmountInLCYCode then + exit(''); + + exit("Payment Lines1"."Currency Code"); + end; + + + procedure PrintCurrencyCode(): Code[10] + begin + if ("Payment Lines1"."Currency Code" = '') or PrintAmountInLCYCode then begin + GLSetup.Get(); + exit(GLSetup."LCY Code"); + end; + exit("Payment Lines1"."Currency Code"); + end; + + + procedure PrintCountingDelivery(): Text[30] + begin + if CountStatement > 1 then + exit(Format(CountStatement) + Text002Lbl); + + exit(Format(CountStatement) + Text001Lbl); + end; + + + procedure InitRequest(InitCopies: Integer; InitAmountInLCYCode: Boolean) + begin + CopiesNumber := InitCopies; + PrintAmountInLCYCode := InitAmountInLCYCode; + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/SEPAISO20022FR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/SEPAISO20022FR.Report.al new file mode 100644 index 0000000000..3c4028fc45 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/SEPAISO20022FR.Report.al @@ -0,0 +1,534 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using Microsoft.Sales.Receivables; +using System; +using System.IO; +using System.Text; +using System.Xml; + +report 10848 "SEPA ISO20022 FR" +{ + Caption = 'SEPA ISO20022'; + ProcessingOnly = true; + + dataset + { + dataitem("Payment Header"; "Payment Header FR") + { + + trigger OnAfterGetRecord() + begin + TestField(IBAN); + TestField("SWIFT Code"); + TestField("Bank Country/Region Code"); + if not CheckBankCountrySEPAAllowed("Bank Country/Region Code") then + Error(SEPANotEnabledForPaymentErr, "Bank Country/Region Code"); + PaymentLineFR.Reset(); + PaymentLineFR.SetRange("No.", "No."); + CheckPaymentLines(); + ExportSEPAFile(); + end; + + trigger OnPostDataItem() + begin + PaymentHeader := "Payment Header"; + PaymentHeader."File Export Completed" := true; + PaymentHeader.Modify(); + end; + } + } + + requestpage + { + + layout + { + } + + actions + { + } + } + + labels + { + } + + trigger OnPostReport() + var + FileMgt: Codeunit "File Management"; + ToFile: Text; + begin + ToFile := Text009Lbl; + OnPostReportOnAfterSetToFile(ToFile); + + if ServerFileName <> '' then + FileMgt.CopyServerFile(FileName, ServerFileName, true) + else + if not FileMgt.DownloadHandler(FileName, Text000Lbl, '', Text001Lbl, ToFile) then + Error(Text010Lbl); + end; + + trigger OnPreReport() + var + FileMgt: Codeunit "File Management"; + begin + // Perform Checks + CompanyInfo.Get(); + CompanyInfo.TestField("Country/Region Code"); + CompanyInfo.TestField("VAT Registration No."); + + FileName := FileMgt.ServerTempFileName(''); + + if DelChr(FileName, '<>') = '' then + Error(Text002Lbl); + end; + + var + PaymentHeader: Record "Payment Header FR"; + PaymentLineFR: Record "Payment Line FR"; + CompanyInfo: Record "Company Information"; + SEPACountry: Record "Country/Region"; + XMLDomDoc: DotNet XmlDocument; + FileName: Text; + Text000Lbl: Label 'Save As'; + Text001Lbl: Label 'XML Files (*.xml)|*.xml|All Files|*.*', Comment = 'Only translate ''XML Files'' and ''All Files'' {Split=r"[\|\(]\*\.[^ |)]*[|) ]?"}'; + Text002Lbl: Label 'File name must be specified.'; + SEPANotEnabledForVendorErr: Label 'The SEPA Allowed field is not enabled for the Country/Region: %1 of the Vendor Bank Account: %2.', Comment = '%1 = code, %2 = No. and Code'; + ServerFileName: Text; + PaymentLineCount: Integer; + SEPANotEnabledForPaymentErr: Label 'The SEPA Allowed field is not enabled for the Country/Region: %1 of the Payment Header: Bank Country/Region Code.', Comment = '%1= Number'; + Text004Lbl: Label 'Currency is not Euro in the %1, %2: %3.', Comment = '%1 = table caption, %2 = field caption, %3 = Line No.'; + Text005Lbl: Label 'Payment Lines can only be of type Customer or Vendor for SEPA.'; + Text009Lbl: Label 'default.xml'; + Text010Lbl: Label 'File download failed.'; + Text011Lbl: Label 'Amount cannot be negative in the %1, %2: %3.', Comment = '%1 = table caption, %2 = field caption, %3 = Line No.'; + + local procedure ExportSEPAFile() + var + XMLDOMManagement: Codeunit "XML DOM Management"; + XMLRootElement: DotNet XmlElement; + XMLNodeCurr: DotNet XmlNode; + XMLNewChild: DotNet XmlNode; + begin + XMLDOMManagement.LoadXMLDocumentFromText('', XMLDomDoc); + XMLRootElement := XMLDomDoc.DocumentElement; + XMLRootElement.SetAttribute('xmlns', 'urn:iso:std:iso:20022:tech:xsd:pain.001.001.02'); + XMLRootElement.SetAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchemainstance'); + XMLNodeCurr := XMLDomDoc.SelectSingleNode('Document'); + AddElement(XMLNodeCurr, 'pain.001.001.02', '', '', XMLNewChild); + + ExportGroupHeader(XMLNewChild); + ExportPaymentInformation(XMLNewChild); + + XMLDomDoc.Save(FileName); + Clear(XMLDomDoc); + end; + + local procedure ExportGroupHeader(XMLNodeCurr: DotNet XmlNode) + var + XMLNewChild: DotNet XmlNode; + MessageId: Text; + begin + AddElement(XMLNodeCurr, 'GrpHdr', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + MessageId := "Payment Header"."No."; + if StrLen(MessageId) > 35 then + MessageId := CopyStr(MessageId, StrLen(MessageId) - 34); + + AddElement(XMLNodeCurr, 'MsgId', MessageId, '', XMLNewChild); + AddElement(XMLNodeCurr, 'CreDtTm', Format(CurrentDateTime, 19, 9), '', XMLNewChild); + + PaymentLineFR.Reset(); + PaymentLineFR.SetRange("No.", "Payment Header"."No."); + AddElement(XMLNodeCurr, 'NbOfTxs', Format(PaymentLineCount, 0, 9), '', XMLNewChild); + "Payment Header".CalcFields(Amount); + AddElement(XMLNodeCurr, 'CtrlSum', Format("Payment Header".Amount, 0, ''), '', XMLNewChild); + AddElement(XMLNodeCurr, 'Grpg', 'MIXD', '', XMLNewChild); + AddElement(XMLNodeCurr, 'InitgPty', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'Nm', CompanyInfo.Name, '', XMLNewChild); + AddElement(XMLNodeCurr, 'Id', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'OrgId', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'TaxIdNb', Format(DelChr(CompanyInfo."VAT Registration No."), 0, 9), '', XMLNewChild); + + XMLNodeCurr := XMLNodeCurr.ParentNode; + XMLNodeCurr := XMLNodeCurr.ParentNode; + XMLNodeCurr := XMLNodeCurr.ParentNode; + XMLNodeCurr := XMLNodeCurr.ParentNode; + end; + + local procedure ExportPaymentInformation(XMLNodeCurr: DotNet XmlNode) + var + XMLNewChild: DotNet XmlNode; + AddressLine1: Text[151]; + AddressLine2: Text[60]; + UstrdRemitInfo: Text; + begin + AddElement(XMLNodeCurr, 'PmtInf', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'PmtInfId', "Payment Header"."No.", '', XMLNewChild); + AddElement(XMLNodeCurr, 'PmtMtd', 'TRF', '', XMLNewChild); + AddElement(XMLNodeCurr, 'PmtTpInf', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'SvcLvl', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'Cd', 'SEPA', '', XMLNewChild); + XMLNodeCurr := XMLNodeCurr.ParentNode; + XMLNodeCurr := XMLNodeCurr.ParentNode; + + AddElement(XMLNodeCurr, 'ReqdExctnDt', Format("Payment Header"."Posting Date", 0, 9), '', XMLNewChild); + AddElement(XMLNodeCurr, 'Dbtr', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'Nm', CompanyInfo.Name, '', XMLNewChild); + + AddElement(XMLNodeCurr, 'PstlAdr', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddressLine1 := DelChr(CompanyInfo.Address, '<>') + ' ' + DelChr(CompanyInfo."Address 2", '<>'); + if DelChr(AddressLine1) <> '' then + AddElement(XMLNodeCurr, 'AdrLine', CopyStr(AddressLine1, 1, 70), '', XMLNewChild); + + AddressLine2 := DelChr(CompanyInfo."Post Code", '<>') + ' ' + DelChr(CompanyInfo.City, '<>'); + if DelChr(AddressLine2) <> '' then + AddElement(XMLNodeCurr, 'AdrLine', CopyStr(AddressLine2, 1, 70), '', XMLNewChild); + + AddElement(XMLNodeCurr, 'Ctry', CopyStr(CompanyInfo."Country/Region Code", 1, 2), '', XMLNewChild); + XMLNodeCurr := XMLNodeCurr.ParentNode; + XMLNodeCurr := XMLNodeCurr.ParentNode; + + AddElement(XMLNodeCurr, 'DbtrAcct', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'Id', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'IBAN', CopyStr(DelChr("Payment Header".IBAN), 1, 34), '', XMLNewChild); + XMLNodeCurr := XMLNodeCurr.ParentNode; + + AddElement(XMLNodeCurr, 'Ccy', 'EUR', '', XMLNewChild); + XMLNodeCurr := XMLNodeCurr.ParentNode; + + AddElement(XMLNodeCurr, 'DbtrAgt', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'FinInstnId', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'BIC', CopyStr(DelChr("Payment Header"."SWIFT Code"), 1, 11), '', XMLNewChild); + XMLNodeCurr := XMLNodeCurr.ParentNode; + XMLNodeCurr := XMLNodeCurr.ParentNode; + + AddElement(XMLNodeCurr, 'ChrgBr', 'SLEV', '', XMLNewChild); + + if PaymentLineFR.Find('-') then + repeat + AddElement(XMLNodeCurr, 'CdtTrfTxInf', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'PmtId', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'EndToEndId', GetEndToEndId(PaymentLineFR), '', XMLNewChild); + XMLNodeCurr := XMLNodeCurr.ParentNode; + + AddElement(XMLNodeCurr, 'Amt', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + if PaymentLineFR.Amount < 0 then + Error(Text011Lbl, PaymentLineFR.TableCaption(), PaymentLineFR.FieldCaption("Line No."), PaymentLineFR."Line No."); + AddElement(XMLNodeCurr, 'InstdAmt', Format(PaymentLineFR.Amount, 0, ''), '', XMLNewChild); + AddAttribute(XMLDomDoc, XMLNewChild, 'Ccy', 'EUR'); + XMLNodeCurr := XMLNodeCurr.ParentNode; + + AddElement(XMLNodeCurr, 'CdtrAgt', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'FinInstnId', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'BIC', CopyStr(DelChr(PaymentLineFR."SWIFT Code"), 1, 11), '', XMLNewChild); + XMLNodeCurr := XMLNodeCurr.ParentNode; + XMLNodeCurr := XMLNodeCurr.ParentNode; + + AddElement(XMLNodeCurr, 'Cdtr', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddAccountInformation(XMLNodeCurr); + + AddElement(XMLNodeCurr, 'CdtrAcct', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'Id', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddElement(XMLNodeCurr, 'IBAN', CopyStr(DelChr(PaymentLineFR.IBAN), 1, 34), '', XMLNewChild); + XMLNodeCurr := XMLNodeCurr.ParentNode; + XMLNodeCurr := XMLNodeCurr.ParentNode; + + UstrdRemitInfo := CreateUstrdRemitInfo(); + if DelChr(UstrdRemitInfo) <> '' then begin + AddElement(XMLNodeCurr, 'RmtInf', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + AddElement(XMLNodeCurr, 'Ustrd', UstrdRemitInfo, '', XMLNewChild); + XMLNodeCurr := XMLNodeCurr.ParentNode; + end; + + XMLNodeCurr := XMLNodeCurr.ParentNode; + until PaymentLineFR.Next() = 0; + + XMLNodeCurr := XMLNodeCurr.ParentNode; + end; + + local procedure AddElement(var XMLNode: DotNet XmlNode; NodeName: Text; + NodeText: Text; NameSpace: Text[250]; var CreatedXMLNode: DotNet XmlNode): Boolean + var + StringConversionMgt: Codeunit StringConversionManagement; + NewChildNode: DotNet XmlNode; + begin + NewChildNode := XMLNode.OwnerDocument.CreateNode('element', NodeName, NameSpace); + if IsNull(NewChildNode) then + exit(false); + + if NodeText <> '' then + NewChildNode.InnerText := StringConversionMgt.WindowsToASCII(NodeText); + XMLNode.AppendChild(NewChildNode); + CreatedXMLNode := NewChildNode; + Clear(NewChildNode); + exit(true); + end; + + local procedure AddAttribute(var XMLDomDocParam: DotNet XmlDocument; + + var + XMLDomNode: DotNet XmlNode; + AttribName: Text[250]; + AttribValue: Text[250]): Boolean + var + XMLDomAttribute: DotNet XmlAttribute; + begin + XMLDomAttribute := XMLDomDocParam.CreateAttribute(AttribName); + if IsNull(XMLDomAttribute) then + exit(false); + + if AttribValue <> '' then + XMLDomAttribute.Value := AttribValue; + XMLDomNode.Attributes.SetNamedItem(XMLDomAttribute); + Clear(XMLDomAttribute); + exit(true); + end; + + local procedure AddAccountInformation(var XMLNodeCurr: DotNet XmlNode) + var + Cust: Record Customer; + Vend: Record Vendor; + begin + case PaymentLineFR."Account Type" of + PaymentLineFR."Account Type"::Customer: + begin + Cust.Get(PaymentLineFR."Account No."); + AddAccountTags(XMLNodeCurr, Cust.Name, Cust.Address, Cust."Address 2", Cust."Post Code", Cust.City, Cust."Country/Region Code"); + end; + PaymentLineFR."Account Type"::Vendor: + begin + Vend.Get(PaymentLineFR."Account No."); + AddAccountTags(XMLNodeCurr, Vend.Name, Vend.Address, Vend."Address 2", Vend."Post Code", Vend.City, Vend."Country/Region Code"); + end; + end; + end; + + local procedure AddAccountTags(var XMLNodeCurr: DotNet XmlNode; AccountName: Text; + Address: Text; + Address2: Text[70]; + PostCode: Text[70]; + City: Text[70]; + CountryCode: Text[10]) + var + XMLNewChild: DotNet XmlNode; + AddressLine1: Text[150]; + AddressLine2: Text[150]; + begin + AddElement(XMLNodeCurr, 'Nm', AccountName, '', XMLNewChild); + AddElement(XMLNodeCurr, 'PstlAdr', '', '', XMLNewChild); + XMLNodeCurr := XMLNewChild; + + AddressLine1 := DelChr(Address, '<>') + ' ' + DelChr(Address2, '<>'); + if DelChr(AddressLine1) <> '' then + AddElement(XMLNodeCurr, 'AdrLine', CopyStr(AddressLine1, 1, 70), '', XMLNewChild); + AddressLine2 := DelChr(PostCode, '<>') + ' ' + DelChr(City, '<>'); + if DelChr(AddressLine2) <> '' then + AddElement(XMLNodeCurr, 'AdrLine', CopyStr(AddressLine2, 1, 70), '', XMLNewChild); + AddElement(XMLNodeCurr, 'Ctry', CopyStr(CountryCode, 1, 2), '', XMLNewChild); + XMLNodeCurr := XMLNodeCurr.ParentNode; + XMLNodeCurr := XMLNodeCurr.ParentNode; + end; + + local procedure CheckBankCountrySEPAAllowed(CountryCode: Code[10]): Boolean + begin + if SEPACountry.Code <> CountryCode then + SEPACountry.Get(CountryCode); + exit(SEPACountry."SEPA Allowed"); + end; + + local procedure CheckPaymentLines() + var + VendorBankAcc: Record "Vendor Bank Account"; + CustomerBankAcc: Record "Customer Bank Account"; + begin + // Loop through all Payment lines and perform validations + PaymentLineCount := 0; + if PaymentLineFR.Find('-') then + repeat + PaymentLineFR.TestField(IBAN); + PaymentLineFR.TestField("SWIFT Code"); + case PaymentLineFR."Account Type" of + PaymentLineFR."Account Type"::Vendor: + begin + VendorBankAcc.Get(PaymentLineFR."Account No.", PaymentLineFR."Bank Account Code"); + VendorBankAcc.TestField("Country/Region Code"); + if not CheckBankCountrySEPAAllowed(VendorBankAcc."Country/Region Code") then + Error(SEPANotEnabledForVendorErr, SEPACountry.Code, + VendorBankAcc."Vendor No." + ',' + VendorBankAcc.Code); + end; + PaymentLineFR."Account Type"::Customer: + begin + CustomerBankAcc.Get(PaymentLineFR."Account No.", PaymentLineFR."Bank Account Code"); + CustomerBankAcc.TestField("Country/Region Code"); + if not CheckBankCountrySEPAAllowed(CustomerBankAcc."Country/Region Code") then + Error(SEPANotEnabledForVendorErr, SEPACountry.Code, + CustomerBankAcc."Customer No." + ',' + CustomerBankAcc.Code); + end; + end; + CheckEUCurrencyInLines(PaymentLineFR."Currency Code"); + if not (PaymentLineFR."Account Type" in [PaymentLineFR."Account Type"::Customer, PaymentLineFR."Account Type"::Vendor]) then + Error(Text005Lbl); + PaymentLineCount := PaymentLineCount + 1; + until PaymentLineFR.Next() = 0; + end; + + local procedure CheckEUCurrencyInLines(CurrencyCode: Code[10]) + var + GLSetup: Record "General Ledger Setup"; + begin + // Check whether the currency being used is Euro + GLSetup.Get(); + case GLSetup."Local Currency" of + GLSetup."Local Currency"::Euro: + if CurrencyCode <> '' then + Error(Text004Lbl, PaymentLineFR.TableCaption(), PaymentLineFR.FieldCaption("Line No."), PaymentLineFR."Line No."); + GLSetup."Local Currency"::Other: + begin + GLSetup.TestField("Currency Euro"); + if CurrencyCode <> GLSetup."Currency Euro" then + Error(Text004Lbl, PaymentLineFR.TableCaption(), PaymentLineFR.FieldCaption("Line No."), PaymentLineFR."Line No."); + end; + end; + end; + + + procedure CreateUstrdRemitInfo(): Text + var + VendLedgEntry: Record "Vendor Ledger Entry"; + CustLedgEntry: Record "Cust. Ledger Entry"; + UstrdRemitInfo: Text; + Separator: Text[1]; + LoopBreak: Boolean; + begin + UstrdRemitInfo := ''; + LoopBreak := false; + if ((DelChr(PaymentLineFR."Applies-to Doc. No.") = '') and + (DelChr(PaymentLineFR."Applies-to ID") = '')) + then + exit(UstrdRemitInfo); + case PaymentLineFR."Account Type" of + PaymentLineFR."Account Type"::Vendor: + if DelChr(PaymentLineFR."Applies-to Doc. No.") <> '' then + UstrdRemitInfo := DelChr(PaymentLineFR."Applies-to Doc. No.") + else begin + VendLedgEntry.SetCurrentKey("Vendor No.", "Applies-to ID"); + VendLedgEntry.SetRange("Vendor No.", PaymentLineFR."Account No."); + VendLedgEntry.SetRange("Applies-to ID", PaymentLineFR."Applies-to ID"); + if VendLedgEntry.FindSet() then + repeat + if UstrdRemitInfo = '' then + Separator := '' + else + Separator := ','; + if DelChr(VendLedgEntry."External Document No.") <> '' then + if StrLen(UstrdRemitInfo + Separator + DelChr(VendLedgEntry."External Document No.")) <= 140 then + UstrdRemitInfo := UstrdRemitInfo + Separator + DelChr(VendLedgEntry."External Document No.") + else + LoopBreak := true; + until (VendLedgEntry.Next() = 0) or LoopBreak; + end; + PaymentLineFR."Account Type"::Customer: + if DelChr(PaymentLineFR."Applies-to Doc. No.") <> '' then + UstrdRemitInfo := PaymentLineFR."Applies-to Doc. No." + else begin + CustLedgEntry.SetCurrentKey("Customer No.", "Applies-to ID"); + CustLedgEntry.SetRange("Customer No.", PaymentLineFR."Account No."); + CustLedgEntry.SetRange("Applies-to ID", PaymentLineFR."Applies-to ID"); + if CustLedgEntry.FindSet() then + repeat + if UstrdRemitInfo = '' then + Separator := '' + else + Separator := ','; + if DelChr(CustLedgEntry."Document No.") <> '' then + if StrLen(UstrdRemitInfo + Separator + DelChr(CustLedgEntry."Document No.")) <= 140 then + UstrdRemitInfo := UstrdRemitInfo + Separator + DelChr(CustLedgEntry."Document No.") + else + LoopBreak := true; + until (CustLedgEntry.Next() = 0) or LoopBreak; + end; + end; + exit(UstrdRemitInfo); + end; + + local procedure GetEndToEndId(PaymentLine: Record "Payment Line FR") EndtoEndIdTxt: Text + begin + EndtoEndIdTxt := PaymentLine."Document No."; + if DelChr(EndtoEndIdTxt, '<>') = '' then + EndtoEndIdTxt := 'NOTPROVIDED'; + + OnAfterGetEndToEndId(PaymentLine, EndtoEndIdTxt); + + exit(CopyStr(EndtoEndIdTxt, 1, 35)); + end; + + + procedure SetFilePath(FilePath: Text) + begin + ServerFileName := FilePath; + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterGetEndToEndId(PaymentLine: Record "Payment Line FR"; var EndtoEndIdTxt: Text) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnPostReportOnAfterSetToFile(var ToFile: Text) + begin + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestCustPayments.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestCustPayments.Report.al new file mode 100644 index 0000000000..065fde00dc --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestCustPayments.Report.al @@ -0,0 +1,461 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Bank.DirectDebit; +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Foundation.NoSeries; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.Customer; +using Microsoft.Sales.Receivables; + +report 10849 "Suggest Cust. Payments" +{ + Caption = 'Suggest Customer Payments'; + Permissions = TableData "Cust. Ledger Entry" = rm; + ProcessingOnly = true; + + dataset + { + dataitem(Customer; Customer) + { + DataItemTableView = sorting("No."); + RequestFilterFields = "No.", "Payment Method Code"; + + trigger OnAfterGetRecord() + begin + Window.Update(1, "No."); + GetCustLedgEntries(true, false); + GetCustLedgEntries(false, false); + CheckAmounts(false); + end; + + trigger OnPostDataItem() + begin + if PaymentDisc then begin + Reset(); + CopyFilters(Cust2); + Window.Open(Text007Lbl); + if Find('-') then + repeat + Window.Update(1, "No."); + TempPayableCustLedgEntry.SetRange("Vendor No.", "No."); + GetCustLedgEntries(true, true); + GetCustLedgEntries(false, true); + CheckAmounts(true); + until Next() = 0; + end; + + GenPayLine.LockTable(); + GenPayLine.SetRange("No.", GenPayLine."No."); + if GenPayLine.FindLast() then begin + LastLineNo := GenPayLine."Line No."; + GenPayLine.Init(); + end; + + Window.Open(Text008Lbl); + + TempPayableCustLedgEntry.Reset(); + TempPayableCustLedgEntry.SetRange(Priority, 1, 2147483647); + MakeGenPayLines(); + TempPayableCustLedgEntry.Reset(); + TempPayableCustLedgEntry.SetRange(Priority, 0); + MakeGenPayLines(); + TempPayableCustLedgEntry.Reset(); + TempPayableCustLedgEntry.DeleteAll(); + Window.Close(); + + if GenPayLineInserted and (Customer.GetFilter("Partner Type") <> '') then begin + GenPayHead."Partner Type" := Customer."Partner Type"; + GenPayHead.Modify(); + end; + ShowMessage(MessageText); + end; + + trigger OnPreDataItem() + begin + if LastDueDateToPayReq = 0D then + Error(Text000Lbl); + if PostingDate = 0D then + Error(Text001Lbl); + + GenPayLineInserted := false; + MessageText := ''; + + if PaymentDisc and (LastDueDateToPayReq < WorkDate()) then + if not + Confirm( + Text003Lbl + + Text004Lbl, false, + WorkDate()) + then + Error(Text005Lbl); + + Cust2.CopyFilters(Customer); + Window.Open(Text006Lbl); + + NextEntryNo := 1; + end; + } + } + + requestpage + { + SaveValues = false; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(LastPaymentDate; LastDueDateToPayReq) + { + ApplicationArea = Basic, Suite; + Caption = 'Last Payment Date'; + ToolTip = 'Specifies the latest payment date that can appear on the customer ledger entries to include in the batch job. '; + } + field(UsePaymentDisc; PaymentDisc) + { + ApplicationArea = Basic, Suite; + Caption = 'Find Payment Discounts'; + MultiLine = true; + ToolTip = 'Specifies whether to include customer ledger entries for which you can receive a payment discount.'; + } + field(Summarize_Per; SummarizePer) + { + ApplicationArea = Basic, Suite; + Caption = 'Summarize per'; + OptionCaption = ' ,Customer,Due date'; + ToolTip = 'Specifies how to summarize. Choose the Customer option for one summarized line per customer for open ledger entries. Choose the Due Date option for one summarized line per due date per customer for open ledger entries. Choose the empty option if you want each open customer ledger entry to result in an individual payment line.'; + } + field(Currency_Filter; CurrencyFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Currency Filter'; + Editable = false; + TableRelation = Currency; + ToolTip = 'Specifies the currencies to include in the transfer. To see the available currencies, choose the Filter field.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + Cust2: Record Customer; + GenPayHead: Record "Payment Header FR"; + GenPayLine: Record "Payment Line FR"; + CustLedgEntry: Record "Cust. Ledger Entry"; + TempPayableCustLedgEntry: Record "Payable Vendor Ledger Entry" temporary; + TempPaymentPostBuffer: Record "Payment Post. Buffer FR" temporary; + TempOldTempPaymentPostBuffer: Record "Payment Post. Buffer FR" temporary; + PaymentClass: Record "Payment Class FR"; + Window: Dialog; + PaymentDisc: Boolean; + PostingDate: Date; + LastDueDateToPayReq: Date; + NextDocNo: Code[20]; + SummarizePer: Option " ",Customer,"Due date"; + LastLineNo: Integer; + NextEntryNo: Integer; + MessageText: Text[250]; + GenPayLineInserted: Boolean; + CurrencyFilter: Code[10]; + Text000Lbl: Label 'Please enter the last payment date.'; + Text001Lbl: Label 'Please enter the posting date.'; + Text003Lbl: Label 'The selected last due date is earlier than %1.\\', Comment = '%1 = work date'; + Text004Lbl: Label 'Do you still want to run the batch job?'; + Text005Lbl: Label 'The batch job was interrupted.'; + Text006Lbl: Label 'Processing customers #1##########', Comment = '%1='; + Text007Lbl: Label 'Processing customers for payment discounts #1##########', Comment = '%1='; + Text008Lbl: Label 'Inserting payment journal lines #1##########', Comment = '%1='; + Text016Lbl: Label ' is already applied to %1 %2 for customer %3.', Comment = '%1 = Document Type, %2 = No., %3 = No.'; + + procedure SetGenPayLine(NewGenPayLine: Record "Payment Header FR") + begin + GenPayHead := NewGenPayLine; + GenPayLine."No." := NewGenPayLine."No."; + PaymentClass.Get(GenPayHead."Payment Class"); + PostingDate := GenPayHead."Posting Date"; + CurrencyFilter := GenPayHead."Currency Code"; + end; + + + procedure GetCustLedgEntries(Positive: Boolean; Future: Boolean) + begin + CustLedgEntry.Reset(); + CustLedgEntry.SetCurrentKey("Customer No.", Open, Positive, "Due Date"); + CustLedgEntry.SetRange("Customer No.", Customer."No."); + CustLedgEntry.SetRange(Open, true); + CustLedgEntry.SetRange(Positive, Positive); + CustLedgEntry.SetRange("Currency Code", CurrencyFilter); + CustLedgEntry.SetRange("Applies-to ID", ''); + if Future then begin + CustLedgEntry.SetRange("Due Date", LastDueDateToPayReq + 1, 99991231D); + CustLedgEntry.SetRange("Pmt. Discount Date", PostingDate, LastDueDateToPayReq); + CustLedgEntry.SetFilter("Original Pmt. Disc. Possible", '<0'); + end else + CustLedgEntry.SetRange("Due Date", 0D, LastDueDateToPayReq); + CustLedgEntry.SetRange("On Hold", ''); + OnGetCustLedgEntriesOnAfterSetFilters(CustLedgEntry); + + if CustLedgEntry.FindSet() then + repeat + SaveAmount(); + until CustLedgEntry.Next() = 0; + end; + + local procedure SaveAmount() + begin + GenPayLine."Account Type" := GenPayLine."Account Type"::Customer; + GenPayLine.Validate("Account No.", CustLedgEntry."Customer No."); + GenPayLine."Posting Date" := CustLedgEntry."Posting Date"; + GenPayLine."Currency Factor" := CustLedgEntry."Adjusted Currency Factor"; + if GenPayLine."Currency Factor" = 0 then + GenPayLine."Currency Factor" := 1; + GenPayLine.Validate("Currency Code", CustLedgEntry."Currency Code"); + CustLedgEntry.CalcFields("Remaining Amount"); + if ((CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::"Credit Memo") and + (CustLedgEntry."Remaining Pmt. Disc. Possible" <> 0) or + (CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Invoice)) and + (PostingDate <= CustLedgEntry."Pmt. Discount Date") and PaymentDisc + then + GenPayLine.Amount := -(CustLedgEntry."Remaining Amount" - CustLedgEntry."Original Pmt. Disc. Possible") + else + GenPayLine.Amount := -CustLedgEntry."Remaining Amount"; + GenPayLine.Validate(Amount); + + TempPayableCustLedgEntry."Vendor No." := CustLedgEntry."Customer No."; + TempPayableCustLedgEntry."Entry No." := NextEntryNo; + TempPayableCustLedgEntry."Vendor Ledg. Entry No." := CustLedgEntry."Entry No."; + TempPayableCustLedgEntry.Amount := GenPayLine.Amount; + TempPayableCustLedgEntry."Amount (LCY)" := GenPayLine."Amount (LCY)"; + TempPayableCustLedgEntry.Positive := (TempPayableCustLedgEntry.Amount > 0); + TempPayableCustLedgEntry.Future := (CustLedgEntry."Due Date" > LastDueDateToPayReq); + TempPayableCustLedgEntry."Currency Code" := CustLedgEntry."Currency Code"; + TempPayableCustLedgEntry."Due Date" := CustLedgEntry."Due Date"; + TempPayableCustLedgEntry.Insert(); + NextEntryNo := NextEntryNo + 1; + end; + + + procedure CheckAmounts(Future: Boolean) + var + CurrencyBalance: Decimal; + PrevCurrency: Code[10]; + begin + CurrencyBalance := 0; + TempPayableCustLedgEntry.SetRange("Vendor No.", Customer."No."); + TempPayableCustLedgEntry.SetRange(Future, Future); + if TempPayableCustLedgEntry.Find('-') then begin + PrevCurrency := TempPayableCustLedgEntry."Currency Code"; + repeat + if TempPayableCustLedgEntry."Currency Code" <> PrevCurrency then begin + if CurrencyBalance < 0 then begin + TempPayableCustLedgEntry.SetRange("Currency Code", PrevCurrency); + TempPayableCustLedgEntry.DeleteAll(); + TempPayableCustLedgEntry.SetRange("Currency Code"); + end; + CurrencyBalance := 0; + PrevCurrency := TempPayableCustLedgEntry."Currency Code"; + end; + CurrencyBalance := CurrencyBalance + TempPayableCustLedgEntry."Amount (LCY)" + until TempPayableCustLedgEntry.Next() = 0; + if CurrencyBalance > 0 then begin + TempPayableCustLedgEntry.SetRange("Currency Code", PrevCurrency); + TempPayableCustLedgEntry.DeleteAll(); + TempPayableCustLedgEntry.SetRange("Currency Code"); + end; + end; + TempPayableCustLedgEntry.Reset(); + end; + + local procedure InsertTempPaymentPostBuffer(var PaymentPostBufferTemp: Record "Payment Post. Buffer FR" temporary; var CustLedgerEntry: Record "Cust. Ledger Entry") + begin + PaymentPostBufferTemp."Applies-to Doc. Type" := CustLedgerEntry."Document Type"; + PaymentPostBufferTemp."Applies-to Doc. No." := CustLedgerEntry."Document No."; + PaymentPostBufferTemp."Currency Factor" := CustLedgerEntry."Adjusted Currency Factor"; + PaymentPostBufferTemp.Amount := TempPayableCustLedgEntry.Amount; + PaymentPostBufferTemp."Amount (LCY)" := TempPayableCustLedgEntry."Amount (LCY)"; + PaymentPostBufferTemp."Global Dimension 1 Code" := CustLedgerEntry."Global Dimension 1 Code"; + PaymentPostBufferTemp."Global Dimension 2 Code" := CustLedgerEntry."Global Dimension 2 Code"; + PaymentPostBufferTemp."Auxiliary Entry No." := CustLedgerEntry."Entry No."; + PaymentPostBufferTemp.Insert(); + end; + + local procedure MakeGenPayLines() + var + SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate"; + GenPayLine3: Record "Gen. Journal Line"; + NoSeries: Codeunit "No. Series"; + begin + TempPaymentPostBuffer.DeleteAll(); + + if TempPayableCustLedgEntry.Find('-') then + repeat + TempPayableCustLedgEntry.SetRange("Vendor No.", TempPayableCustLedgEntry."Vendor No."); + TempPayableCustLedgEntry.Find('-'); + repeat + CustLedgEntry.Get(TempPayableCustLedgEntry."Vendor Ledg. Entry No."); + TempPaymentPostBuffer."Account No." := CustLedgEntry."Customer No."; + TempPaymentPostBuffer."Currency Code" := CustLedgEntry."Currency Code"; + if SummarizePer = SummarizePer::"Due date" then + TempPaymentPostBuffer."Due Date" := CustLedgEntry."Due Date"; + + TempPaymentPostBuffer."Dimension Entry No." := 0; + TempPaymentPostBuffer."Global Dimension 1 Code" := ''; + TempPaymentPostBuffer."Global Dimension 2 Code" := ''; + + if SummarizePer in [SummarizePer::Customer, SummarizePer::"Due date"] then begin + TempPaymentPostBuffer."Auxiliary Entry No." := 0; + if TempPaymentPostBuffer.Find() then begin + TempPaymentPostBuffer.Amount := TempPaymentPostBuffer.Amount + TempPayableCustLedgEntry.Amount; + TempPaymentPostBuffer."Amount (LCY)" := TempPaymentPostBuffer."Amount (LCY)" + TempPayableCustLedgEntry."Amount (LCY)"; + TempPaymentPostBuffer.Modify(); + end else begin + LastLineNo := LastLineNo + 10000; + TempPaymentPostBuffer."Payment Line No." := LastLineNo; + if PaymentClass."Line No. Series" = '' then begin + NextDocNo := CopyStr(GenPayHead."No." + '/' + Format(LastLineNo), 1, MaxStrLen(NextDocNo)); + TempPaymentPostBuffer."Applies-to ID" := NextDocNo; + end else begin + NextDocNo := NoSeries.GetNextNo(PaymentClass."Line No. Series", PostingDate); + TempPaymentPostBuffer."Applies-to ID" := GenPayHead."No." + '/' + NextDocNo; + end; + TempPaymentPostBuffer."Document No." := NextDocNo; + NextDocNo := IncStr(NextDocNo); + TempPaymentPostBuffer.Amount := TempPayableCustLedgEntry.Amount; + TempPaymentPostBuffer."Amount (LCY)" := TempPayableCustLedgEntry."Amount (LCY)"; + Window.Update(1, CustLedgEntry."Customer No."); + TempPaymentPostBuffer.Insert(); + end; + CustLedgEntry."Applies-to ID" := TempPaymentPostBuffer."Applies-to ID"; + CODEUNIT.Run(CODEUNIT::"Cust. Entry-Edit", CustLedgEntry) + end else begin + GenPayLine3.Reset(); + GenPayLine3.SetCurrentKey( + "Account Type", "Account No.", "Applies-to Doc. Type", "Applies-to Doc. No."); + GenPayLine3.SetRange("Account Type", GenPayLine3."Account Type"::Customer); + GenPayLine3.SetRange("Account No.", CustLedgEntry."Customer No."); + GenPayLine3.SetRange("Applies-to Doc. Type", CustLedgEntry."Document Type"); + GenPayLine3.SetRange("Applies-to Doc. No.", CustLedgEntry."Document No."); + if GenPayLine3.FindFirst() then + GenPayLine3.FieldError( + "Applies-to Doc. No.", + StrSubstNo( + Text016Lbl, + CustLedgEntry."Document Type", CustLedgEntry."Document No.", + CustLedgEntry."Customer No.")); + InsertTempPaymentPostBuffer(TempPaymentPostBuffer, CustLedgEntry); + Window.Update(1, CustLedgEntry."Customer No."); + end; + CustLedgEntry.CalcFields("Remaining Amount"); + CustLedgEntry."Amount to Apply" := CustLedgEntry."Remaining Amount"; + CODEUNIT.Run(CODEUNIT::"Cust. Entry-Edit", CustLedgEntry) + until TempPayableCustLedgEntry.Next() = 0; + TempPayableCustLedgEntry.SetFilter("Vendor No.", '>%1', TempPayableCustLedgEntry."Vendor No."); + until not TempPayableCustLedgEntry.Find('-'); + + Clear(TempOldTempPaymentPostBuffer); + TempPaymentPostBuffer.SetCurrentKey("Document No."); + if TempPaymentPostBuffer.FindSet() then + repeat + GenPayLine.Init(); + Window.Update(1, TempPaymentPostBuffer."Account No."); + if SummarizePer = SummarizePer::" " then begin + LastLineNo := LastLineNo + 10000; + GenPayLine."Line No." := LastLineNo; + if PaymentClass."Line No. Series" = '' then begin + NextDocNo := CopyStr(GenPayHead."No." + '/' + Format(GenPayLine."Line No."), 1, MaxStrLen(NextDocNo)); + GenPayLine."Applies-to ID" := NextDocNo; + end else begin + NextDocNo := NoSeries.GetNextNo(PaymentClass."Line No. Series", PostingDate); + GenPayLine."Applies-to ID" := GenPayHead."No." + '/' + NextDocNo; + end; + end else begin + GenPayLine."Line No." := TempPaymentPostBuffer."Payment Line No."; + NextDocNo := TempPaymentPostBuffer."Document No."; + GenPayLine."Applies-to ID" := TempPaymentPostBuffer."Applies-to ID"; + end; + GenPayLine."Document No." := NextDocNo; + TempOldTempPaymentPostBuffer := TempPaymentPostBuffer; + TempOldTempPaymentPostBuffer."Document No." := GenPayLine."Document No."; + if SummarizePer = SummarizePer::" " then begin + CustLedgEntry.Get(TempPaymentPostBuffer."Auxiliary Entry No."); + CustLedgEntry."Applies-to ID" := GenPayLine."Applies-to ID"; + CustLedgEntry.Modify(); + end; + GenPayLine."Account Type" := GenPayLine."Account Type"::Customer; + GenPayLine.Validate("Account No.", TempPaymentPostBuffer."Account No."); + GenPayLine."Currency Code" := TempPaymentPostBuffer."Currency Code"; + GenPayLine.Amount := TempPaymentPostBuffer.Amount; + if GenPayLine.Amount > 0 then + GenPayLine."Debit Amount" := GenPayLine.Amount + else + GenPayLine."Credit Amount" := -GenPayLine.Amount; + GenPayLine."Amount (LCY)" := TempPaymentPostBuffer."Amount (LCY)"; + GenPayLine."Currency Factor" := TempPaymentPostBuffer."Currency Factor"; + if (GenPayLine."Currency Factor" = 0) and (GenPayLine.Amount <> 0) then + GenPayLine."Currency Factor" := GenPayLine.Amount / GenPayLine."Amount (LCY)"; + Cust2.Get(GenPayLine."Account No."); + GenPayLine.Validate("Bank Account Code", Cust2."Preferred Bank Account Code"); + GenPayLine."Payment Class" := GenPayHead."Payment Class"; + GenPayLine.Validate("Status No."); + GenPayLine."Posting Date" := PostingDate; + if SummarizePer = SummarizePer::" " then begin + GenPayLine."Applies-to Doc. Type" := CustLedgEntry."Document Type"; + GenPayLine."Applies-to Doc. No." := CustLedgEntry."Document No."; + GenPayLine."Dimension Set ID" := CustLedgEntry."Dimension Set ID"; + if SEPADirectDebitMandate.Get(CustLedgEntry."Direct Debit Mandate ID") then + GenPayLine.Validate("Bank Account Code", SEPADirectDebitMandate."Customer Bank Account Code"); + GenPayLine."Direct Debit Mandate ID" := CustLedgEntry."Direct Debit Mandate ID"; + end; + case SummarizePer of + SummarizePer::" ": + GenPayLine."Due Date" := CustLedgEntry."Due Date"; + SummarizePer::Customer: + begin + TempPayableCustLedgEntry.SetCurrentKey("Vendor No.", "Due Date"); + TempPayableCustLedgEntry.SetRange("Vendor No.", TempPaymentPostBuffer."Account No."); + TempPayableCustLedgEntry.Find('+'); + GenPayLine."Due Date" := TempPayableCustLedgEntry."Due Date"; + TempPayableCustLedgEntry.DeleteAll(); + end; + SummarizePer::"Due date": + GenPayLine."Due Date" := TempPaymentPostBuffer."Due Date"; + end; + if GenPayLine.Amount <> 0 then begin + if GenPayLine."Dimension Set ID" = 0 then + GenPayLine.DimensionSetup(); + // per "Vendor", per "Due Date" + GenPayLine.Insert(true); + end; + GenPayLineInserted := true; + until TempPaymentPostBuffer.Next() = 0; + end; + + local procedure ShowMessage(Text: Text) + begin + if (Text <> '') and GenPayLineInserted then + Message(Text); + end; + + [IntegrationEvent(true, false)] + local procedure OnGetCustLedgEntriesOnAfterSetFilters(var CustLedgEntry: Record "Cust. Ledger Entry") + begin + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestVendPayments.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestVendPayments.Report.al new file mode 100644 index 0000000000..b9a1db98a9 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestVendPayments.Report.al @@ -0,0 +1,526 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Foundation.NoSeries; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Vendor; + +report 10850 "Suggest Vend. Payments" +{ + Caption = 'Suggest Vendor Payments'; + Permissions = TableData "Vendor Ledger Entry" = rm; + ProcessingOnly = true; + + dataset + { + dataitem(Vendor; Vendor) + { + DataItemTableView = sorting("No."); + RequestFilterFields = "No.", "Payment Method Code"; + + trigger OnAfterGetRecord() + begin + if StopPayments then + CurrReport.Break(); + Window.Update(1, "No."); + GetVendLedgEntries(true, false); + GetVendLedgEntries(false, false); + CheckAmounts(false); + end; + + trigger OnPostDataItem() + begin + if UsePriority and not StopPayments then begin + Reset(); + CopyFilters(Vend2); + SetCurrentKey(Priority); + SetRange(Priority, 0); + if Find('-') then + repeat + Window.Update(1, "No."); + GetVendLedgEntries(true, false); + GetVendLedgEntries(false, false); + CheckAmounts(false); + until (Next() = 0) or StopPayments; + end; + + if UsePaymentDisc and not StopPayments then begin + Reset(); + CopyFilters(Vend2); + Window.Open(Text007Lbl); + if Find('-') then + repeat + Window.Update(1, "No."); + TempPayableVendLedgEntry.SetRange("Vendor No.", "No."); + GetVendLedgEntries(true, true); + GetVendLedgEntries(false, true); + CheckAmounts(true); + until (Next() = 0) or StopPayments; + end; + + GenPayLine.LockTable(); + GenPayLine.SetRange("No.", GenPayLine."No."); + if GenPayLine.FindLast() then begin + LastLineNo := GenPayLine."Line No."; + GenPayLine.Init(); + end; + + Window.Open(Text008Lbl); + + TempPayableVendLedgEntry.Reset(); + TempPayableVendLedgEntry.SetRange(Priority, 1, 2147483647); + MakeGenPayLines(); + TempPayableVendLedgEntry.Reset(); + TempPayableVendLedgEntry.SetRange(Priority, 0); + MakeGenPayLines(); + TempPayableVendLedgEntry.Reset(); + TempPayableVendLedgEntry.DeleteAll(); + + Window.Close(); + ShowMessage(MessageText); + end; + + trigger OnPreDataItem() + begin + if LastDueDateToPayReq = 0D then + Error(Text000Lbl); + if PostingDate = 0D then + Error(Text001Lbl); + + GenPayLineInserted := false; + MessageText := ''; + + if UsePaymentDisc and (LastDueDateToPayReq < WorkDate()) then + if not + Confirm( + Text003Lbl + + Text004Lbl, false, + WorkDate()) + then + Error(Text005Lbl); + + Vend2.CopyFilters(Vendor); + + OriginalAmtAvailable := AmountAvailable; + if UsePriority then begin + SetCurrentKey(Priority); + SetRange(Priority, 1, 2147483647); + UsePriority := true; + end; + Window.Open(Text006Lbl); + + NextEntryNo := 1; + end; + } + } + + requestpage + { + SaveValues = false; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(LastPaymentDate; LastDueDateToPayReq) + { + ApplicationArea = Basic, Suite; + Caption = 'Last Payment Date'; + ToolTip = 'Specifies the latest payment date that can appear on the vendor ledger entries to include in the batch job. '; + } + field(UsePayment_Disc; UsePaymentDisc) + { + ApplicationArea = Basic, Suite; + Caption = 'Find Payment Discounts'; + MultiLine = true; + ToolTip = 'Specifies whether to include vendor ledger entries for which you can receive a payment discount.'; + } + field(Summarize_Per; SummarizePer) + { + ApplicationArea = Basic, Suite; + Caption = 'Summarize per'; + OptionCaption = ' ,Vendor,Due date'; + ToolTip = 'Specifies how to summarize. Choose the Vendor option for one summarized line per vendor for open ledger entries. Choose the Due Date option for one summarized line per due date per vendor for open ledger entries. Choose the empty option if you want each open vendor ledger entry to result in an individual payment line.'; + } + field(Use_Priority; UsePriority) + { + ApplicationArea = Basic, Suite; + Caption = 'Use Vendor Priority'; + ToolTip = 'Specifies whether to order suggested payments based on the priority that is specified for the vendor on the Vendor card.'; + + trigger OnValidate() + begin + if not UsePriority and (AmountAvailable <> 0) then + Error(Text011Lbl); + end; + } + field(AvailableAmountLCY; AmountAvailable) + { + ApplicationArea = Basic, Suite; + Caption = 'Available Amount (LCY)'; + AutoFormatType = 1; + AutoFormatExpression = VendLedgEntry."Currency Code"; + ToolTip = 'Specifies a maximum amount available in local currency for payments. '; + + trigger OnValidate() + begin + AmountAvailableOnAfterValidate(); + end; + } + field(Currency_Filter; CurrencyFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Currency Filter'; + Editable = false; + TableRelation = Currency; + ToolTip = 'Specifies the currencies to include in the transfer. To see the available currencies, choose the Filter field.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + Vend2: Record Vendor; + GenPayHead: Record "Payment Header FR"; + GenPayLine: Record "Payment Line FR"; + VendLedgEntry: Record "Vendor Ledger Entry"; + TempPayableVendLedgEntry: Record "Payable Vendor Ledger Entry" temporary; + TempPaymentPostBuffer: Record "Payment Post. Buffer FR" temporary; + TempOldTempPaymentPostBuffer: Record "Payment Post. Buffer FR" temporary; + PaymentClass: Record "Payment Class FR"; + Window: Dialog; + UsePaymentDisc: Boolean; + PostingDate: Date; + LastDueDateToPayReq: Date; + NextDocNo: Code[20]; + AmountAvailable: Decimal; + OriginalAmtAvailable: Decimal; + UsePriority: Boolean; + SummarizePer: Option " ",Vendor,"Due date"; + LastLineNo: Integer; + NextEntryNo: Integer; + StopPayments: Boolean; + MessageText: Text; + GenPayLineInserted: Boolean; + CurrencyFilter: Code[10]; + Text000Lbl: Label 'Please enter the last payment date.'; + Text001Lbl: Label 'Please enter the posting date.'; + Text003Lbl: Label 'The selected last due date is earlier than %1.\\', Comment = '%1 = work date'; + Text004Lbl: Label 'Do you still want to run the batch job?'; + Text005Lbl: Label 'The batch job was interrupted.'; + Text006Lbl: Label 'Processing vendors #1##########', Comment = '%1='; + Text007Lbl: Label 'Processing vendors for payment discounts #1##########', Comment = '%1='; + Text008Lbl: Label 'Inserting payment journal lines #1##########', Comment = '%1='; + Text011Lbl: Label 'Use Vendor Priority must be activated when the value in the Amount Available field is not 0.'; + Text016Lbl: Label ' is already applied to %1 %2 for vendor %3.', Comment = '%1 = Document Type, %2 = No., %3 = No.'; + + procedure SetGenPayLine(NewGenPayLine: Record "Payment Header FR") + begin + GenPayHead := NewGenPayLine; + GenPayLine."No." := NewGenPayLine."No."; + PaymentClass.Get(GenPayHead."Payment Class"); + PostingDate := GenPayHead."Posting Date"; + CurrencyFilter := GenPayHead."Currency Code"; + end; + + + procedure GetVendLedgEntries(Positive: Boolean; Future: Boolean) + begin + VendLedgEntry.Reset(); + VendLedgEntry.SetCurrentKey("Vendor No.", Open, Positive, "Due Date"); + VendLedgEntry.SetRange("Vendor No.", Vendor."No."); + VendLedgEntry.SetRange(Open, true); + VendLedgEntry.SetRange(Positive, Positive); + VendLedgEntry.SetRange("Currency Code", CurrencyFilter); + VendLedgEntry.SetRange("Applies-to ID", ''); + if Future then begin + VendLedgEntry.SetRange("Due Date", LastDueDateToPayReq + 1, 99991231D); + VendLedgEntry.SetRange("Pmt. Discount Date", PostingDate, LastDueDateToPayReq); + VendLedgEntry.SetFilter("Original Pmt. Disc. Possible", '<0'); + end else + VendLedgEntry.SetRange("Due Date", 0D, LastDueDateToPayReq); + VendLedgEntry.SetRange("On Hold", ''); + if VendLedgEntry.Find('-') then + repeat + SaveAmount(); + until VendLedgEntry.Next() = 0; + end; + + local procedure SaveAmount() + begin + GenPayLine."Account Type" := GenPayLine."Account Type"::Vendor; + GenPayLine.Validate("Account No.", VendLedgEntry."Vendor No."); + GenPayLine."Posting Date" := VendLedgEntry."Posting Date"; + GenPayLine."Currency Factor" := VendLedgEntry."Adjusted Currency Factor"; + if GenPayLine."Currency Factor" = 0 then + GenPayLine."Currency Factor" := 1; + GenPayLine.Validate("Currency Code", VendLedgEntry."Currency Code"); + VendLedgEntry.CalcFields("Remaining Amount"); + if ((VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::"Credit Memo") and + (VendLedgEntry."Remaining Pmt. Disc. Possible" <> 0) or + (VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::Invoice)) and + (PostingDate <= VendLedgEntry."Pmt. Discount Date") + then + GenPayLine.Amount := -(VendLedgEntry."Remaining Amount" - VendLedgEntry."Original Pmt. Disc. Possible") + else + GenPayLine.Amount := -VendLedgEntry."Remaining Amount"; + GenPayLine.Validate(Amount); + + if UsePriority then + TempPayableVendLedgEntry.Priority := Vendor.Priority + else + TempPayableVendLedgEntry.Priority := 0; + TempPayableVendLedgEntry."Vendor No." := VendLedgEntry."Vendor No."; + TempPayableVendLedgEntry."Entry No." := NextEntryNo; + TempPayableVendLedgEntry."Vendor Ledg. Entry No." := VendLedgEntry."Entry No."; + TempPayableVendLedgEntry.Amount := GenPayLine.Amount; + TempPayableVendLedgEntry."Amount (LCY)" := GenPayLine."Amount (LCY)"; + TempPayableVendLedgEntry.Positive := (TempPayableVendLedgEntry.Amount > 0); + TempPayableVendLedgEntry.Future := (VendLedgEntry."Due Date" > LastDueDateToPayReq); + TempPayableVendLedgEntry."Currency Code" := VendLedgEntry."Currency Code"; + TempPayableVendLedgEntry."Due Date" := VendLedgEntry."Due Date"; + TempPayableVendLedgEntry.Insert(); + NextEntryNo := NextEntryNo + 1; + end; + + + procedure CheckAmounts(Future: Boolean) + var + CurrencyBalance: Decimal; + PrevCurrency: Code[10]; + begin + CurrencyBalance := 0; + TempPayableVendLedgEntry.SetRange("Vendor No.", Vendor."No."); + TempPayableVendLedgEntry.SetRange(Future, Future); + if TempPayableVendLedgEntry.Find('-') then begin + PrevCurrency := TempPayableVendLedgEntry."Currency Code"; + repeat + if TempPayableVendLedgEntry."Currency Code" <> PrevCurrency then begin + if CurrencyBalance < 0 then begin + TempPayableVendLedgEntry.SetRange("Currency Code", PrevCurrency); + TempPayableVendLedgEntry.DeleteAll(); + TempPayableVendLedgEntry.SetRange("Currency Code"); + end else + AmountAvailable := AmountAvailable - CurrencyBalance; + CurrencyBalance := 0; + PrevCurrency := TempPayableVendLedgEntry."Currency Code"; + end; + if (OriginalAmtAvailable = 0) or + (AmountAvailable >= CurrencyBalance + TempPayableVendLedgEntry."Amount (LCY)") + then + CurrencyBalance := CurrencyBalance + TempPayableVendLedgEntry."Amount (LCY)" + else + TempPayableVendLedgEntry.Delete(); + until TempPayableVendLedgEntry.Next() = 0; + if CurrencyBalance < 0 then begin + TempPayableVendLedgEntry.SetRange("Currency Code", PrevCurrency); + TempPayableVendLedgEntry.DeleteAll(); + TempPayableVendLedgEntry.SetRange("Currency Code"); + end else + if OriginalAmtAvailable > 0 then + AmountAvailable := AmountAvailable - CurrencyBalance; + if (OriginalAmtAvailable > 0) and (AmountAvailable <= 0) then + StopPayments := true; + end; + TempPayableVendLedgEntry.Reset(); + end; + + local procedure InsertTempPaymentPostBuffer(var PaymentPostBufferTemp: Record "Payment Post. Buffer FR" temporary; var VendorLedgEntry: Record "Vendor Ledger Entry") + begin + PaymentPostBufferTemp."Applies-to Doc. Type" := VendorLedgEntry."Document Type"; + PaymentPostBufferTemp."Applies-to Doc. No." := VendorLedgEntry."Document No."; + PaymentPostBufferTemp."Currency Factor" := VendorLedgEntry."Adjusted Currency Factor"; + PaymentPostBufferTemp.Amount := TempPayableVendLedgEntry.Amount; + PaymentPostBufferTemp."Amount (LCY)" := TempPayableVendLedgEntry."Amount (LCY)"; + PaymentPostBufferTemp."Global Dimension 1 Code" := VendorLedgEntry."Global Dimension 1 Code"; + PaymentPostBufferTemp."Global Dimension 2 Code" := VendorLedgEntry."Global Dimension 2 Code"; + PaymentPostBufferTemp."Auxiliary Entry No." := VendorLedgEntry."Entry No."; + PaymentPostBufferTemp.Insert(); + end; + + local procedure MakeGenPayLines() + var + GenPayLine3: Record "Gen. Journal Line"; + NoSeries: Codeunit "No. Series"; + begin + TempPaymentPostBuffer.DeleteAll(); + + if TempPayableVendLedgEntry.Find('-') then + repeat + TempPayableVendLedgEntry.SetRange("Vendor No.", TempPayableVendLedgEntry."Vendor No."); + TempPayableVendLedgEntry.Find('-'); + repeat + VendLedgEntry.Get(TempPayableVendLedgEntry."Vendor Ledg. Entry No."); + TempPaymentPostBuffer."Account No." := VendLedgEntry."Vendor No."; + TempPaymentPostBuffer."Currency Code" := VendLedgEntry."Currency Code"; + if SummarizePer = SummarizePer::"Due date" then + TempPaymentPostBuffer."Due Date" := VendLedgEntry."Due Date"; + + TempPaymentPostBuffer."Dimension Entry No." := 0; + TempPaymentPostBuffer."Global Dimension 1 Code" := ''; + TempPaymentPostBuffer."Global Dimension 2 Code" := ''; + + if SummarizePer in [SummarizePer::Vendor, SummarizePer::"Due date"] then begin + TempPaymentPostBuffer."Auxiliary Entry No." := 0; + if TempPaymentPostBuffer.Find() then begin + TempPaymentPostBuffer.Amount := TempPaymentPostBuffer.Amount + TempPayableVendLedgEntry.Amount; + TempPaymentPostBuffer."Amount (LCY)" := TempPaymentPostBuffer."Amount (LCY)" + TempPayableVendLedgEntry."Amount (LCY)"; + TempPaymentPostBuffer.Modify(); + end else begin + LastLineNo := LastLineNo + 10000; + TempPaymentPostBuffer."Payment Line No." := LastLineNo; + if PaymentClass."Line No. Series" = '' then begin + NextDocNo := CopyStr(GenPayHead."No." + '/' + Format(LastLineNo), 1, MaxStrLen(NextDocNo)); + TempPaymentPostBuffer."Applies-to ID" := NextDocNo; + end else begin + NextDocNo := NoSeries.GetNextNo(PaymentClass."Line No. Series", PostingDate); + TempPaymentPostBuffer."Applies-to ID" := GenPayHead."No." + '/' + NextDocNo; + end; + TempPaymentPostBuffer."Document No." := NextDocNo; + NextDocNo := IncStr(NextDocNo); + TempPaymentPostBuffer.Amount := TempPayableVendLedgEntry.Amount; + TempPaymentPostBuffer."Amount (LCY)" := TempPayableVendLedgEntry."Amount (LCY)"; + Window.Update(1, VendLedgEntry."Vendor No."); + TempPaymentPostBuffer.Insert(); + end; + VendLedgEntry."Applies-to ID" := TempPaymentPostBuffer."Applies-to ID"; + CODEUNIT.Run(CODEUNIT::"Vend. Entry-Edit", VendLedgEntry); + end else begin + GenPayLine3.Reset(); + GenPayLine3.SetCurrentKey( + "Account Type", "Account No.", "Applies-to Doc. Type", "Applies-to Doc. No."); + GenPayLine3.SetRange("Account Type", GenPayLine3."Account Type"::Vendor); + GenPayLine3.SetRange("Account No.", VendLedgEntry."Vendor No."); + GenPayLine3.SetRange("Applies-to Doc. Type", VendLedgEntry."Document Type"); + GenPayLine3.SetRange("Applies-to Doc. No.", VendLedgEntry."Document No."); + if GenPayLine3.FindFirst() then + GenPayLine3.FieldError( + "Applies-to Doc. No.", + StrSubstNo( + Text016Lbl, + VendLedgEntry."Document Type", VendLedgEntry."Document No.", + VendLedgEntry."Vendor No.")); + InsertTempPaymentPostBuffer(TempPaymentPostBuffer, VendLedgEntry); + Window.Update(1, VendLedgEntry."Vendor No."); + end; + VendLedgEntry.CalcFields("Remaining Amount"); + VendLedgEntry."Amount to Apply" := VendLedgEntry."Remaining Amount"; + CODEUNIT.Run(CODEUNIT::"Vend. Entry-Edit", VendLedgEntry); + until TempPayableVendLedgEntry.Next() = 0; + TempPayableVendLedgEntry.SetFilter("Vendor No.", '>%1', TempPayableVendLedgEntry."Vendor No."); + until not TempPayableVendLedgEntry.FindFirst(); + + Clear(TempOldTempPaymentPostBuffer); + TempPaymentPostBuffer.SetCurrentKey("Document No."); + if TempPaymentPostBuffer.Find('-') then + repeat + GenPayLine.Init(); + Window.Update(1, TempPaymentPostBuffer."Account No."); + if SummarizePer = SummarizePer::" " then begin + LastLineNo := LastLineNo + 10000; + GenPayLine."Line No." := LastLineNo; + if PaymentClass."Line No. Series" = '' then begin + NextDocNo := CopyStr(GenPayHead."No." + '/' + Format(GenPayLine."Line No."), 1, MaxStrLen(NextDocNo)); + GenPayLine."Applies-to ID" := NextDocNo; + end else begin + NextDocNo := NoSeries.GetNextNo(PaymentClass."Line No. Series", PostingDate); + GenPayLine."Applies-to ID" := GenPayHead."No." + '/' + NextDocNo; + end; + end else begin + GenPayLine."Line No." := TempPaymentPostBuffer."Payment Line No."; + NextDocNo := TempPaymentPostBuffer."Document No."; + GenPayLine."Applies-to ID" := TempPaymentPostBuffer."Applies-to ID"; + end; + GenPayLine."Document No." := NextDocNo; + TempOldTempPaymentPostBuffer := TempPaymentPostBuffer; + TempOldTempPaymentPostBuffer."Document No." := GenPayLine."Document No."; + if SummarizePer = SummarizePer::" " then begin + VendLedgEntry.Get(TempPaymentPostBuffer."Auxiliary Entry No."); + VendLedgEntry."Applies-to ID" := GenPayLine."Applies-to ID"; + VendLedgEntry.Modify(); + end; + GenPayLine."Account Type" := GenPayLine."Account Type"::Vendor; + GenPayLine.Validate("Account No.", TempPaymentPostBuffer."Account No."); + GenPayLine."Currency Code" := TempPaymentPostBuffer."Currency Code"; + GenPayLine."Currency Factor" := GenPayHead."Currency Factor"; + if GenPayLine."Currency Factor" = 0 then + GenPayLine."Currency Factor" := 1; + GenPayLine.Validate(Amount, TempPaymentPostBuffer.Amount); + Vend2.Get(GenPayLine."Account No."); + GenPayLine.Validate("Bank Account Code", Vend2."Preferred Bank Account Code"); + GenPayLine."Payment Class" := GenPayHead."Payment Class"; + GenPayLine.Validate("Status No."); + GenPayLine."Posting Date" := PostingDate; + if SummarizePer = SummarizePer::" " then begin + GenPayLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; + GenPayLine."Applies-to Doc. No." := VendLedgEntry."Document No."; + GenPayLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; + end; + case SummarizePer of + SummarizePer::" ": + GenPayLine."Due Date" := VendLedgEntry."Due Date"; + SummarizePer::Vendor: + begin + if GenPayLine.Amount = 0 then + SetAppliesToIDBlank(VendLedgEntry, TempPayableVendLedgEntry, TempPaymentPostBuffer); + TempPayableVendLedgEntry.SetCurrentKey("Vendor No.", "Due Date"); + TempPayableVendLedgEntry.SetRange("Vendor No.", TempPaymentPostBuffer."Account No."); + TempPayableVendLedgEntry.Find('-'); + GenPayLine."Due Date" := TempPayableVendLedgEntry."Due Date"; + TempPayableVendLedgEntry.DeleteAll(); + end; + SummarizePer::"Due date": + GenPayLine."Due Date" := TempPaymentPostBuffer."Due Date"; + end; + if GenPayLine.Amount <> 0 then begin + if GenPayLine."Dimension Set ID" = 0 then + // per "Customer", per "Due Date" + GenPayLine.DimensionSetup(); + GenPayLine.Insert(true); + end; + GenPayLineInserted := true; + until TempPaymentPostBuffer.Next() = 0; + end; + + local procedure ShowMessage(Text: Text) + begin + if (Text <> '') and GenPayLineInserted then + Message(Text); + end; + + local procedure AmountAvailableOnAfterValidate() + begin + if AmountAvailable <> 0 then + UsePriority := true; + end; + + local procedure SetAppliesToIDBlank(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var TempPayableVendorLedgEntry: Record "Payable Vendor Ledger Entry" temporary; TempPmtPostBuffer: Record "Payment Post. Buffer FR" temporary) + begin + TempPayableVendorLedgEntry.SetRange("Vendor No.", TempPmtPostBuffer."Account No."); + if TempPayableVendorLedgEntry.FindSet() then + repeat + VendorLedgerEntry.Get(TempPayableVendorLedgEntry."Vendor Ledg. Entry No."); + VendorLedgerEntry."Applies-to ID" := ''; + VendorLedgerEntry.Modify(); + until TempPayableVendorLedgEntry.Next() = 0; + TempPayableVendorLedgEntry.SetRange("Vendor No."); + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawFR.Report.al new file mode 100644 index 0000000000..bef399fdbe --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawFR.Report.al @@ -0,0 +1,341 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Payment; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.GeneralLedger.Account; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.FixedAssets.FixedAsset; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using System.IO; +using System.Reflection; + +report 10851 "Withdraw FR" +{ + Caption = 'Withdraw'; + ProcessingOnly = true; + + dataset + { + dataitem("Payment Header"; "Payment Header FR") + { + DataItemTableView = sorting("No."); + MaxIteration = 1; + dataitem("Payment Line"; "Payment Line FR") + { + DataItemLink = "No." = field("No."); + DataItemTableView = sorting("No.", "Line No."); + + trigger OnAfterGetRecord() + var + GLAcct: Record "G/L Account"; + Cust: Record Customer; + Vend: Record Vendor; + BankAcct: Record "Bank Account"; + FixedAsset: Record "Fixed Asset"; + PaymentClass: Record "Payment Class FR"; + RecordCode: Text; + OperationCode: Text; + FromPaymentNo: Text; + CustName: Text; + CustBankName: Text; + BankBranchNo: Text; + AgencyCode: Text; + BankAccountNo: Text; + Designation: Text; + PrintAmount: Text; + ExportedText: Text; + begin + TestField("Account No."); + + if StrLen("Bank Branch No.") > 5 then + Error(Text008Lbl, "Bank Account Name"); + + if StrLen("Agency Code") > 5 then + Error(Text008Lbl, "Bank Account Name"); + + if StrLen("Bank Account No.") > 11 then + Error(Text008Lbl, "Bank Account Name"); + + if not "RIB Checked" then + Error(Text009Lbl, "Bank Account Name", "Account No."); + + if "Currency Code" <> "Payment Header"."Currency Code" then + Error(Text010Lbl); + + if "Due Date" <> DueDate then + Error(Text011Lbl); + + PaymentClass.Get("Payment Header"."Payment Class"); + if (PaymentClass."Line No. Series" <> '') and ("Document No." = '') then + Error(Text012Lbl); + + RecordCode := '06'; + OperationCode := '08'; + FromPaymentNo := PadStr("Payment Header"."National Issuer No.", 6); + + case "Account Type" of + "Account Type"::"G/L Account": + begin + GLAcct.Get("Account No."); + CustName := PadStr(GLAcct.Name, 24); + end; + "Account Type"::Customer: + begin + Cust.Get("Account No."); + CustName := PadStr(Cust.Name, 24); + end; + "Account Type"::Vendor: + begin + Vend.Get("Account No."); + CustName := PadStr(Vend.Name, 24); + end; + "Account Type"::"Bank Account": + begin + BankAcct.Get("Account No."); + CustName := PadStr(BankAcct.Name, 24); + end; + "Account Type"::"Fixed Asset": + begin + FixedAsset.Get("Account No."); + CustName := PadStr(FixedAsset.Description, 24); + end; + end; + + "Payment Header".CalcFields("Status Name"); + + CustBankName := PadStr("Bank Account Name", 20); + BankBranchNo := PADSTR2("Bank Branch No.", 5, '0'); + AgencyCode := PADSTR2("Agency Code", 5, '0'); + BankAccountNo := PADSTR2("Bank Account No.", 11, '0'); + Designation := PadStr("Payment Header"."Status Name", 31); + PrintAmount := FormatAmount(Amount, 16); + ExportedText := + RecordCode + + OperationCode + + PadStr('', 8) + + FromPaymentNo + + PadStr('', 12) + + CustName + + CustBankName + + PadStr('', 12) + + AgencyCode + + BankAccountNo + + PrintAmount + + Designation + + BankBranchNo; + + ExportFile.Write(PadStr(ExportedText, 160)); + end; + + trigger OnPostDataItem() + var + PaymentHeader: Record "Payment Header FR"; + RecordCode: Text; + OperationCode: Text; + FromPaymentNo: Text; + PrintAmount: Text; + ExportedText: Text; + begin + RecordCode := '08'; + OperationCode := '08'; + FromPaymentNo := PadStr("Payment Header"."National Issuer No.", 6); + PrintAmount := FormatAmount("Payment Header".Amount, 16); + ExportedText := + RecordCode + + OperationCode + + PadStr('', 8) + + FromPaymentNo + + PadStr('', 84) + + PrintAmount; + + ExportFile.Write(PadStr(ExportedText, 160)); + + PaymentHeader := "Payment Header"; + PaymentHeader."File Export Completed" := true; + PaymentHeader.Modify(); + end; + } + + trigger OnAfterGetRecord() + var + RecordCode: Text; + OperationCode: Text; + FromPaymentNo: Text; + ExecutionDate: Text; + CompanyName: Text; + CurrencyIdentifier: Code[1]; + BankBranchNo: Text; + AgencyCode: Text; + BankAccountNo: Text; + ExportedText: Text; + begin + TestField("National Issuer No."); + TestField("No."); + + if StrLen("Bank Branch No.") > 5 then + Error(Text003Lbl, "Bank Account No."); + + if StrLen("Agency Code") > 5 then + Error(Text003Lbl, "Bank Account No."); + + if StrLen("Bank Account No.") > 11 then + Error(Text003Lbl, "Bank Account No."); + + if not "RIB Checked" then + Error(Text004Lbl, "No."); + + if ("Currency Code" <> '') and ("Currency Code" <> GLSetup."LCY Code") then + Error(Text006Lbl, GLSetup."LCY Code"); + + case "Currency Code" = '' of + true: + CurrencyIdentifier := 'E'; + false: + CurrencyIdentifier := 'F'; + end; + + CalcFields(Amount); + + RecordCode := '03'; + OperationCode := '08'; + FromPaymentNo := PadStr("National Issuer No.", 6); + ExecutionDate := Format(DueDate, 4, '') + CopyStr(Format(DueDate, 2, ''), 2, 1); + CompanyName := PadStr(CompanyInfo.Name, 24); + BankBranchNo := PADSTR2("Bank Branch No.", 5, '0'); + AgencyCode := PADSTR2("Agency Code", 5, '0'); + BankAccountNo := PADSTR2("Bank Account No.", 11, '0'); + ExportedText := + RecordCode + + OperationCode + + PadStr('', 8) + + FromPaymentNo + + PadStr('', 7) + + ExecutionDate + + CompanyName + + PadStr('', 26) + + CurrencyIdentifier + + PadStr('', 5) + + AgencyCode + + BankAccountNo + + PadStr('', 47) + + BankBranchNo; + + ExportFile.Write(PadStr(ExportedText, 160)); + end; + } + } + + requestpage + { + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(Due_Date; DueDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Due Date'; + ToolTip = 'Specifies the due date on the entry.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + trigger OnPostReport() + var + ToFile: Text; + begin + ExportFile.Close(); + ToFile := Text013Lbl; + Download(ExportFileName, GetCaption(), '', Text014Lbl, ToFile); + end; + + trigger OnPreReport() + var + FileMgt: Codeunit "File Management"; + begin + CompanyInfo.Get(); + CompanyInfo.TestField(Name); + + GLSetup.Get(); + ExportFileName := FileMgt.ServerTempFileName(''); + + ExportFile.TextMode := true; + ExportFile.WriteMode := true; + ExportFile.Create(ExportFileName); + end; + + var + GLSetup: Record "General Ledger Setup"; + CompanyInfo: Record "Company Information"; + ExportFile: File; + ExportFileName: Text; + DueDate: Date; + Text003Lbl: Label 'Bank Account No. %1 is too long. Please verify before continuing.', Comment = '%1 = number'; + Text004Lbl: Label 'The RIB of the company''s bank account %1 is incorrect. Please verify before continuing.', Comment = '%1 = No.'; + Text006Lbl: Label 'You can only use currency code %1.', Comment = '%1 = LCY Code'; + Text008Lbl: Label 'Bank Account No. %1 is too long. Please verify before continuing.', Comment = '%1 = Name'; + Text009Lbl: Label 'The RIB of bank account %1 of customer %2 is incorrect. Please verify before continuing.', Comment = '%1 = Name, %2 = Account No.'; + Text010Lbl: Label 'All withdraws must refer to the same currency.'; + Text011Lbl: Label 'All withdraws must have the same due date.'; + Text012Lbl: Label 'All withdraws must have the same document number.'; + Text013Lbl: Label 'default.txt'; + Text014Lbl: Label 'Text Files|*.txt|All Files|*.*'; + + local procedure GetCaption() Result: Text[50] + var + AllObjWithCaption: Record AllObjWithCaption; + ID: Integer; + begin + Result := ''; + if not Evaluate(ID, DelChr(CurrReport.ObjectId(false), '=', DelChr(CurrReport.ObjectId(false), '=', '0123456789'))) then + exit; + + if not AllObjWithCaption.Get(AllObjWithCaption."Object Type"::Report, ID) then + exit; + + exit(CopyStr(AllObjWithCaption."Object Caption", 1, MaxStrLen(Result))); + end; + + local procedure FormatAmount(Amount: Decimal; Width: Integer): Text + var + Format_Amount: Text; + begin + Format_Amount := ConvertStr(Format(Amount, Width, ''), ' ', '0'); + Format_Amount := '0' + CopyStr(Format_Amount, 1, Width - 3) + CopyStr(Format_Amount, Width - 1, 2); + exit(Format_Amount); + end; + + local procedure PADSTR2(String: Text; Length: Integer; FillCharacter: Text[1]): Text + var + PaddingLength: Integer; + begin + PaddingLength := Length - StrLen(String); + + case true of + PaddingLength <= 0: + exit(PadStr(String, Length, FillCharacter)); + PaddingLength > 0: + exit(PadStr('', PaddingLength, FillCharacter) + String); + end; + end; +} + diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawnotice.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawnotice.rdlc new file mode 100644 index 0000000000..a3ae6c3576 --- /dev/null +++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawnotice.rdlc @@ -0,0 +1,3382 @@ + + + 0 + + + + SQL + + + None + c9f80d2a-2ece-4755-ae61-8a906cb9cd22 + + + + + + + + + + + 16.7988cm + + + + + 14.91643cm + + + + + + + + + + 2.1cm + + + 4.35cm + + + 2.55cm + + + 2.25cm + + + 2.25cm + + + 2.4cm + + + 0.9cm + + + + + 0.846cm + + + + + true + + + + + =First(Fields!HeaderText1.Value) + + + + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + Direct Debit Mandate ID Payment Line + + + + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Payment_Line__Document_No__.Value + + + + + + + 75 + + + + + + + + true + + + + + =Fields!PaymtHeader__Payment_Class_Name_.Value + + + + + + + + + + + true + + + + + =Fields!Payment_Line__External_Document_No__.Value + + + + + + + 73 + + + + + + + + true + + + + + =Fields!PostingDate.Value + + + + + + + + + + + true + + + + + =Fields!Payment_Line__Due_Date_.Value + + + + + + + + + + + true + + + + + =Fields!ABS_Amount_.Value + + + + + + + + + + + true + + + + + =Fields!PrintCurrencyCode.Value + + + + + + + 69 + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!DirectDebitMandateID_PaymentLine.Value + + + + + + + 75 + + + 2 + + + + + + + true + + + + + =Fields!SWIFTCode_PaymentLine.Value + + + + + + + 73 + + + 2 + + + + + + + true + + + + + =Fields!IBAN_PaymentLine.Value + + + + + + 2 + true + + + + + + + true + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!HeaderText2.Value) + + + + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + 57 + + + + + + + + true + true + + + + + + + + + + + + 56 + + + + + + + + true + true + + + + + + + + + + + + 55 + + + + + + + + true + true + + + + + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!Cust__Ledger_Entry__Document_No__Caption.Value) + + + + + + + + + + + true + + + + + =First(Fields!Cust__Ledger_Entry_DescriptionCaption.Value) + + + + + + + + + + + true + + + + + =First(Fields!Cust__Ledger_Entry__External_Document_No__Caption.Value) + + + + + + + + + + + true + + + + + =First(Fields!Cust__Ledger_Entry__Posting_Date_Caption.Value) + + + + + + + 50 + + + + + + + + true + + + + + =First(Fields!Cust__Ledger_Entry__Due_Date_Caption.Value) + + + + + + + 49 + + + + + + + + true + + + + + =First(Fields!ABS__Remaining_Amount___Control1120031Caption.Value) + + + + + + + 48 + + + 2 + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + + + + + + + + + + + + + true + + + + + + + + + + + + + true + + + + + + + + + + + + + true + + + + + + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Cust__Ledger_Entry__Document_No__.Value + + + + + + + 33 + + + + + + + + true + + + + + =Fields!Cust__Ledger_Entry_Description.Value + + + + + + + + + + + true + + + + + =Fields!Cust__Ledger_Entry__External_Document_No__.Value + + + + + + + 31 + + + + + + + + true + + + + + =Fields!Cust__Ledger_Entry__Posting_Date_.Value + + + + + + + + + + + true + + + + + =Fields!Cust__Ledger_Entry__Due_Date_.Value + + + + + + + + + + + true + true + + + + + =Fields!ABS__Remaining_Amount__.Value + + + + + + + + + + + true + + + + + =Fields!Cust__Ledger_Entry__Currency_Code_.Value + + + + + + + 27 + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + + textbox44 + 6 + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + textbox56 + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Last(Fields!Withdraw_Notice_AmountCaption.Value) + + + + + + 2 + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + =Last(Fields!TotalWithdrawAmount.Value) + + + + + + + + + + + true + + + + + =Last(Fields!PrintCurrencyCode.Value) + + + + + + + 14 + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + true + + + After + true + + + + + =Fields!Payment_Line___No__.Value + =Fields!Payment_Line_Line_No_.Value + + + + + After + true + + + + =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False) + + After + true + + + + =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False) + + After + true + + + + =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False) + + After + true + + + + =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False) + + After + true + + + + =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False) + + After + true + + + + Detail + + + + + =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False) + + + + + =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False) + + + + Detail_Collection + Output + true + + + + + Before + true + + + Before + true + + + Before + true + + + + DataSet_Result + + + =Fields!PageCaption.Value + GreaterThan + + + + + + 8.57143cm + 6.345cm + 16.8cm + + =IIF(Fields!PageCaption.Value = "",True,False) + + NoOutput + + + + + + + true + + + + + =First(Fields!CompanyAddr_2_.Value) + + + + + + + true + + + + + =First(Fields!CompanyAddr_3_.Value) + + + + + + + true + + + + + =First(Fields!CompanyAddr_4_.Value) + + + + + + + true + + + + + =First(Fields!CompanyAddr_5_.Value) + + + + + + + true + + + + + =First(Fields!CompanyAddr_6_.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__Phone_No__Caption.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__Phone_No__.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__Fax_No__Caption.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__Fax_No__.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__VAT_Registration_No__Caption.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__VAT_Registration_No__.Value) + + + + + + + true + + + + + =First(Fields!STRSUBSTNO_Text003_CopyText_.Value) + + + + + + + true + + + + + =First(Fields!CustAddr_1_.Value) + + + + + + + true + + + + + =First(Fields!CustAddr_2_.Value) + + + + + + + true + + + + + =First(Fields!CustAddr_3_.Value) + + + + + + + true + + + + + =First(Fields!CustAddr_4_.Value) + + + + + + + true + + + + + =First(Fields!CustAddr_5_.Value) + + + + + + + true + + + + + =First(Fields!CustAddr_6_.Value) + + + + + + + true + + + + + =First(Fields!CustAddr_7_.Value) + + + + + + + true + + + + + =First(Fields!PaymtHeader__Bank_Branch_No__Caption.Value) + + + + + + + true + + + + + =First(Fields!PaymtHeader__Bank_Branch_No__.Value) + + + + + + + true + + + + + =First(Fields!PaymtHeader__Agency_Code_Caption.Value) + + + + + + + true + + + + + =First(Fields!PaymtHeader__Agency_Code_.Value) + + + + + + + true + + + + + =First(Fields!PaymtHeader__Bank_Account_No__Caption.Value) + + + + + + + true + + + + + =First(Fields!PaymtHeader__Bank_Account_No__.Value) + + + + + + + true + + + + + =First(Fields!Payment_Lines1___No__Caption.Value) + + + + + + + true + + + + + =First(Fields!Payment_Lines1___No__.Value) + + + + + + + true + + + + + =First(Fields!PrintCurrencyCodeCaption.Value) + + + + + + + true + + + + + =First(Fields!PrintCurrencyCode.Value) + + + + + + + true + + + + + =First(Fields!FORMAT_PostingDate_0_4_.Value) + + + + + + + true + + + + + + + + + + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + + + + true + + + + + =Fields!PaymtHeader__RIB_Key_Caption.Value + + + + + + + true + + + + + =Fields!PaymtHeader__Bank_Account_No__Caption.Value + + + + + + + true + + + + + =Fields!PaymtHeader__Agency_Code_Caption.Value + + + + + + + true + + + + + =Fields!PaymtHeader__Bank_Branch_No__Caption.Value + + + + + + + true + + + + + =First(Fields!PrintCurrencyCodeCaption.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__VAT_Registration_No__Caption.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__Fax_No__Caption.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__Phone_No__Caption.Value) + + + + + + + true + + + + + =First(Fields!PaymtHeader__No__Caption.Value) + + + + + + + true + + + + + =Fields!PaymtHeader__National_Issuer_No__.Value + + + + + + + 7.61737cm + 11.42857cm + 0.423cm + 5.07937cm + 10 + + + + true + + + + + =FORMAT(Fields!PaymtHeader__RIB_Key_.Value) + + + + + + + 7.19437cm + 11.42857cm + 0.423cm + 5.07937cm + 11 + + + + true + + + + + =Fields!PaymtHeader__Bank_Account_No__.Value + + + + + + + 5.92537cm + 11.42857cm + 0.423cm + 5.07937cm + 12 + + + + true + + + + + =Fields!PaymtHeader__Agency_Code_.Value + + + + + + + 5.50236cm + 11.42857cm + 0.423cm + 5.07937cm + 13 + + + + true + + + + + =Fields!PaymtHeader__Bank_Branch_No__.Value + + + + + + + 5.07937cm + 11.42857cm + 0.423cm + 5.07937cm + 14 + + + + true + + + + + =First(Fields!PrintCurrencyCode.Value) + + + + + + + 8.883cm + 3.25873cm + 0.423cm + 3.15cm + 15 + + + + true + + + + + =First(Fields!BankAccountAddr_1_.Value) + + + + + + + true + + + + + =First(Fields!BankAccountAddr_2_.Value) + + + + + + + true + + + + + =First(Fields!BankAccountAddr_3_.Value) + + + + + + + true + + + + + =First(Fields!BankAccountAddr_7_.Value) + + + + + + + true + + + + + =First(Fields!BankAccountAddr_6_.Value) + + + + + + + true + + + + + =First(Fields!BankAccountAddr_5_.Value) + + + + + + + true + + + + + =First(Fields!BankAccountAddr_4_.Value) + + + + + + + true + + + + + =Fields!FORMAT_PostingDate_0_4_.Value + + + + + + + 8.57143cm + 11.42857cm + 0.423cm + 5.07937cm + 23 + + + + true + + + + + =First(Fields!CompanyInformation__VAT_Registration_No__.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__Fax_No__.Value) + + + + + + + true + + + + + =First(Fields!CompanyInformation__Phone_No__.Value) + + + + + + + true + + + + + =First(Fields!CompanyAddr_6_.Value ) + + + + + + + true + + + + + =First(Fields!CompanyAddr_5_.Value ) + + + + + + + true + + + + + =First(Fields!CompanyAddr_4_.Value ) + + + + + + + true + + + + + =First(Fields!CompanyAddr_3_.Value ) + + + + + + + true + + + + + =First(Fields!CompanyAddr_2_.Value ) + + + + + + + true + + + + + =First(Fields!CompanyAddr_1_.Value ) + + + + + + + true + + + + + =First(Fields!PaymtHeader__No__.Value) + + + + + + + 8.45999cm + 3.25873cm + 0.423cm + 3.15cm + 34 + + + + true + + + + + =Fields!STRSUBSTNO_Text005_CopyText_.Value + + + + + + + + + + 1.65cm + + + 3.35cm + + + 3.45cm + + + 1.35cm + + + 1.5873cm + + + 0.63492cm + + + 1.5873cm + + + 2.3cm + + + 0.825cm + + + 0.07937cm + + + + + 0.63492cm + + + + + true + true + + + + + =First(Fields!Payment_Lines__Account_No__Caption.Value) + + + + + + + 34 + + + + + + + + true + + + + + =First(Fields!Customer_NameCaption.Value) + + + + + + + + + + + true + + + + + =First(Fields!Payment_Lines__Bank_Account_Name_Caption.Value) + + + + + + + + + + + true + + + + + =First(Fields!Bank_AccountCaption.Value) + + + + + + 4 + + + + + + + + + true + + + + + =First(Fields!ABS_Amount__Control1120031Caption.Value) + + + + + + + 30 + + + 2 + + + + + + + true + true + + + + + + + + + + + + textbox12 + 29 + + + + + + + + 0.63492cm + + + + + true + true + + + + + =First(Fields!DirectDebitMandateID_PaymentLines_Caption.Value) + + + + + + 2 + true + + + + + + + true + true + + + + + =First(Fields!Payment_Lines__SWIFT_Code_Caption.Value) + + + + + + + + + + + true + true + + + + + =First(Fields!Payment_Lines_IBANCaption.Value) + + + + + + 4 + + + + + + + + + true + true + + + + + + + + + + + + textbox18 + + + 2 + + + + + + + true + true + + + + + + + + + + + + textbox20 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + + textbox2 + 28 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Payment_Lines__Account_No__.Value + + + + + + + 8 + + + + + + + + true + + + + + =Fields!Customer_Name.Value + + + + + + + + + + + true + + + + + =Fields!Payment_Lines__Bank_Account_Name_.Value + + + + + + + + + + + true + + + + + =Fields!Payment_Lines__Bank_Branch_No__.Value + + + + + + + + + + + true + + + + + =Fields!Payment_Lines__Agency_Code_.Value + + + + + + + + + + + true + + + + + =Fields!Payment_Lines__Bank_Account_No__.Value + + + + + + 2 + + + + + + + true + true + + + + + =Fields!ABS_Amount_.Value + + + + + + + + + + + true + + + + + =Fields!PrintCurrencyCode_Control1120060.Value + + + + + + + 1 + + + + + + + + true + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!DirectDebitMandateID_PaymentLines.Value + + + + + + + + + 2 + + + + + + + true + + + + + =Fields!Payment_Lines__SWIFT_Code_.Value + + + + + + + + + + + + + + true + + + + + =Fields!Payment_Lines_IBAN.Value + + + + + + 4 + + + + + + + + + true + true + + + + + + + + + + + 2 + + + + + + + true + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!TotalCaption.Value) + + + + + + 2 + + + + + + + true + true + + + + + =Format(Sum(Fields!WithdrawCounting.Value)) + IIF(Sum(Fields!WithdrawCounting.Value) > 1,Fields!Text001.Value,Fields!Text002.Value) + + + + + + 5 + + + + + + + + + + true + true + + + + + =Sum(Fields!WithdrawAmount.Value) + + + + + + + + + + + true + + + + + =First(Fields!PrintCurrencyCode_Control1120060.Value) + + + + + + + 11 + + + + + + + + true + true + + + + + =iif(Code.IsNewPage(Fields!OutputNo.Value),TRUE,FALSE) + + + + + + + 10 + + true + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + 4 + + + + + + + + + true + + + + + =First(Fields!Done_at__Caption.Value) + + + + + + 2 + + + + + + + true + + + + + =First(Fields!CompanyInformation_City.Value) + + + + + + + 18 + + + 2 + + + + + + + true + + + + + + + + 2 + + + + + + + 0.423cm + + + + + true + + + + + + + + 4 + + + + + + + + + true + + + + + =First(Fields!On__Caption.Value) + + + + + + 2 + + + + + + + true + + + + + =First(Fields!FORMAT_PostingDate_0_4__Control1120034.Value) + + + + + + + 22 + + + 2 + + + + + + + true + + + + + + + + 2 + + + + + + + 0.423cm + + + + + true + + + + + + + + 4 + + + + + + + + + true + + + + + =First(Fields!Signature__Caption.Value) + + + + + + 2 + + + + + + + true + + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =Fields!Payment_Lines1_No_.Value + + + + + After + true + true + + + After + true + true + + + After + true + true + + + + Detail + + + + + + Detail_Collection + Output + true + + + Before + true + + + Before + true + + + Before + true + + + Before + true + + + Before + true + + + Before + true + + + Before + true + + + + + + DataSet_Result + 9.84127cm + 5.49984cm + 16.81389cm + 36 + + + + + + + true + + + + + =Fields!PaymtHeader__SWIFT_Code_.Value + + + + + + + 6.77137cm + 11.42857cm + 0.423cm + 5.07937cm + 38 + + + + true + + + + + =Fields!PaymtHeader_IBANCaption.Value + + + + + + + true + + + + + =Fields!PaymtHeader_IBAN.Value + + + + + + + 6.34837cm + 11.42857cm + 0.423cm + 5.07937cm + 40 + + + + true + + + + + + + 8.27857cm + 0.423cm + 1.68cm + + + + + + + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm +