Codeunit 131332 Library - Cash Flow Helper
src/Layers/W1/Tests/ApplicationTestLibrary/LibraryCashFlowHelper.Codeunit.al93 procedures and triggers, in source order. Copyright (c) Microsoft Corporation. MIT
AddAndPostSOPrepaymentInvoice line 28
AddSOPrepayment line 34
- 36validatesTable 36 Sales Header Prepayment %
- 37writesTable 36 Sales Header Modify(true)
PostSOPrepaymentInvoice line 40
- 44callsCodeunit 442 Sales-Post Prepayments Invoice
AddAndPostPOPrepaymentInvoice line 48
AddPOPrepayment line 54
- 56validatesTable 38 Purchase Header Prepayment %
- 57writesTable 38 Purchase Header Modify(true)
PostPOPrepaymentInvoice line 60
- 64callsCodeunit 444 Purchase-Post Prepayments Invoice
AssignCFPaymentTermToCustomer line 68
- 71validatesTable 18 Customer Cash Flow Payment Terms Code
- 71callsGetPaymentTermsCode
- 72writesTable 18 Customer Modify(true)
AssignPaymentTermToCustomer line 75
- 78validatesTable 18 Customer Payment Terms Code
- 78callsGetPaymentTermsCode
- 79writesTable 18 Customer Modify(true)
AssignCFPaymentTermToVendor line 82
- 85validatesTable 23 Vendor Cash Flow Payment Terms Code
- 85callsGetPaymentTermsCode
- 86writesTable 23 Vendor Modify(true)
AssignPaymentTermToVendor line 89
- 92validatesTable 23 Vendor Payment Terms Code
- 92callsGetPaymentTermsCode
- 93writesTable 23 Vendor Modify(true)
ApplyInvoicePayment line 96
- 100callsSelectAndClearGenJournalBatch
- 101callsCodeunit 131300 Library - ERM CreateGeneralJnlLine
- 106validatesTable 81 Gen. Journal Line Applies-to Doc. Type
- 107validatesTable 81 Gen. Journal Line Applies-to Doc. No.
- 108writesTable 81 Gen. Journal Line Modify(true)
- 109callsCodeunit 131300 Library - ERM PostGeneralJnlLine
CalcDiscAmtFromGenJnlLine line 112
CalcCustDiscAmtLCY line 119
- 122callsCalcCustDiscAmt
- 122callsCodeunit 131300 Library - ERM GetAmountRoundingPrecision
CalcVendDiscAmtLCY line 125
- 128callsCalcVendDiscAmt
- 128callsCodeunit 131300 Library - ERM GetAmountRoundingPrecision
CalcCustDiscAmt line 131
- 134callsCodeunit 131300 Library - ERM GetAmountRoundingPrecision
CalcVendDiscAmt line 137
- 140callsCodeunit 131300 Library - ERM GetAmountRoundingPrecision
CalcSalesExpectedPrepmtAmounts line 143
CalcPurchExpectedPrepmtAmounts line 156
CalculateDiscountAmount line 169
- 171callsCodeunit 131300 Library - ERM GetAmountRoundingPrecision
CreateLedgerEntry line 185
- 189callsSelectAndClearGenJournalBatch
- 190callsCodeunit 131300 Library - ERM CreateGeneralJnlLine
- 193callsCodeunit 131300 Library - ERM PostGeneralJnlLine
CreateAndApplySalesInvPayment line 196
- 201callsGenerateDateFromFormulas
- 202callsSelectAndClearGenJournalBatch
- 203callsCodeunit 131300 Library - ERM CreateGeneralJnlLine
- 206callsCodeunit 131300 Library - ERM CreateGeneralJnlLine
- 209validatesTable 81 Gen. Journal Line Posting Date
- 210validatesTable 81 Gen. Journal Line Document Date
- 211validatesTable 81 Gen. Journal Line Applies-to Doc. Type
- 212validatesTable 81 Gen. Journal Line Applies-to Doc. No.
- 213writesTable 81 Gen. Journal Line Modify(true)
- 214callsCodeunit 131300 Library - ERM PostGeneralJnlLine
CreateAndApplyVendorInvPmt line 217
- 222callsGenerateDateFromFormulas
- 223callsSelectAndClearGenJournalBatch
- 224callsCodeunit 131300 Library - ERM CreateGeneralJnlLine
- 227callsCodeunit 131300 Library - ERM CreateGeneralJnlLine
- 230validatesTable 81 Gen. Journal Line Posting Date
- 231validatesTable 81 Gen. Journal Line Document Date
- 232validatesTable 81 Gen. Journal Line Applies-to Doc. Type
- 233validatesTable 81 Gen. Journal Line Applies-to Doc. No.
- 234writesTable 81 Gen. Journal Line Modify(true)
- 235callsCodeunit 131300 Library - ERM PostGeneralJnlLine
CreateBudgetEntry line 238
- 244callsCodeunit 131300 Library - ERM CreateGLBudgetName
- 245callsFindCFBudgetAccount
- 246callsFindFirstGLAccFromCFAcc
- 247callsCodeunit 131300 Library - ERM CreateGLBudgetEntry
- 248validatesTable 96 G/L Budget Entry Amount
- 248callsCodeunit 130440 Library - Random RandDec
- 249writesTable 96 G/L Budget Entry Modify(true)
CreateDefaultPaymentTerms line 252
- 254callsCodeunit 131300 Library - ERM CreatePaymentTerms
- 257validatesTable 3 Payment Terms Discount %
- 258writesTable 3 Payment Terms Modify(true)
CreateCustWithCFDsctPmtTerm line 261
- 263callsCodeunit 130509 Library - Sales CreateCustomer
- 264callsCodeunit 131300 Library - ERM GetDiscountPaymentTerm
- 265callsAssignCFPaymentTermToCustomer
CreateVendorWithCFDsctPmtTerm line 268
- 270callsCodeunit 130512 Library - Purchase CreateVendor
- 271callsCodeunit 131300 Library - ERM GetDiscountPaymentTerm
- 272callsAssignCFPaymentTermToVendor
CreateFixedAssetForInvestment line 275
- 284callsCodeunit 131330 Library - Fixed Asset CreateFixedAsset
- 285validatesTable 5600 Fixed Asset Budgeted Asset
- 286writesTable 5600 Fixed Asset Modify(true)
- 287callsCodeunit 131330 Library - Fixed Asset CreateFADepreciationBook
- 289callsCodeunit 131330 Library - Fixed Asset FindFAJournalTemplate
- 290callsCodeunit 131330 Library - Fixed Asset CreateFAJournalBatch
- 291validatesTable 5620 FA Journal Batch No. Series
- 291callsCodeunit 131000 Library - Utility GetGlobalNoSeriesCode
- 292writesTable 5620 FA Journal Batch Modify(true)
- 293callsCodeunit 131330 Library - Fixed Asset CreateFAJournalLine
- 296validatesTable 5621 FA Journal Line Document No.
- 296callsCodeunit 310 No. Series PeekNextNo
- 297validatesTable 5621 FA Journal Line FA No.
- 298validatesTable 5621 FA Journal Line Depreciation Book Code
- 299validatesTable 5621 FA Journal Line Amount
- 300validatesTable 5621 FA Journal Line FA Posting Date
- 301writesTable 5621 FA Journal Line Modify(true)
- 302callsCodeunit 131330 Library - Fixed Asset PostFAJournalLine
CreateFixedAssetForDisposal line 305
- 309callsCodeunit 131330 Library - Fixed Asset CreateFixedAsset
- 310callsCodeunit 131330 Library - Fixed Asset CreateFADepreciationBook
- 315writesTable 5612 FA Depreciation Book Modify(true)
CreateManualPayment line 318
- 322callsCodeunit 131331 Library - Cash Flow CreateCashFlowAccount
- 323callsCodeunit 131331 Library - Cash Flow CreateManualLinePayment
- 327validatesTable 850 Cash Flow Manual Expense Amount
- 327callsCodeunit 130440 Library - Random RandInt
- 328writesTable 850 Cash Flow Manual Expense Modify(true)
CreateManualRevenue line 331
- 335callsCodeunit 131331 Library - Cash Flow CreateCashFlowAccount
- 336callsCodeunit 131331 Library - Cash Flow CreateManualLineRevenue
- 340validatesTable 849 Cash Flow Manual Revenue Amount
- 340callsCodeunit 130440 Library - Random RandInt
- 341writesTable 849 Cash Flow Manual Revenue Modify(true)
CreateRandomDateFormula line 344
- 346callsCodeunit 130440 Library - Random RandInt
CreateSpecificCashFlowCard line 349
- 351callsCodeunit 131331 Library - Cash Flow CreateCashFlowCard
- 353validatesTable 840 Cash Flow Forecast Consider Discount
- 354validatesTable 840 Cash Flow Forecast Consider CF Payment Terms
- 355writesTable 840 Cash Flow Forecast Modify(true)
CreateCashFlowForecastDefault line 358
CreateCashFlowForecastConsiderDiscount line 363
CreateCashFlowForecastConsiderCFPmtTerms line 368
CreateCashFlowForecastConsiderDiscountAndCFPmtTerms line 373
CreateSalesOrder line 378
- 383callsCodeunit 130509 Library - Sales CreateCustomerWithBusPostingGroups
- 385callsAssignPaymentTermToCustomer
- 386callsAssignCFPaymentTermToCustomer
- 388callsCodeunit 130509 Library - Sales CreateSalesHeader
- 390callsCreateSalesLine
- 391callsCreateSalesLine
- 392callsCreateSalesLine
CreateSpecificSalesOrder line 395
- 399callsCodeunit 131300 Library - ERM CreateGLAccountWithSalesSetup
- 400callsCreateSalesOrder
CreateDefaultSalesOrder line 403
CreatePrepmtSalesOrder line 408
- 413callsCodeunit 130509 Library - Sales CreatePrepaymentVATSetup
- 414callsCreateSalesOrder
CreateSalesLine line 417
- 429callsCodeunit 131300 Library - ERM CreateGLAccountWithVATPostingSetup
- 431callsCodeunit 130509 Library - Sales CreateSalesLine
- 432callsCodeunit 130440 Library - Random RandInt
- 433validatesTable 37 Sales Line Unit Price
- 433callsCodeunit 130440 Library - Random RandInt
- 434writesTable 37 Sales Line Modify(true)
CreatePurchaseOrder line 437
- 442callsCodeunit 130512 Library - Purchase CreateVendorWithBusPostingGroups
- 444callsAssignPaymentTermToVendor
- 445callsAssignCFPaymentTermToVendor
- 447callsCodeunit 130512 Library - Purchase CreatePurchHeader
- 449callsCreatePurchaseLine
- 450callsCreatePurchaseLine
- 451callsCreatePurchaseLine
CreateSpecificPurchaseOrder line 454
- 458callsCodeunit 131300 Library - ERM CreateGLAccountWithPurchSetup
- 459callsCreatePurchaseOrder
CreateDefaultPurchaseOrder line 462
CreatePrepmtPurchaseOrder line 467
- 472callsCodeunit 130512 Library - Purchase CreatePrepaymentVATSetup
- 473callsCreatePurchaseOrder
CreatePurchaseLine line 476
- 483raisesOnBeforeCreatePurchaseLine
- 489callsCodeunit 131300 Library - ERM CreateVATPostingSetupWithAccounts
- 490callsCodeunit 130440 Library - Random RandIntInRange
- 492writesTable 325 VAT Posting Setup Insert
- 493callsCodeunit 131300 Library - ERM CreateGLAccountWithVATPostingSetup
- 495callsCodeunit 130512 Library - Purchase CreatePurchaseLine
- 496callsCodeunit 130440 Library - Random RandInt
- 497validatesTable 39 Purchase Line Direct Unit Cost
- 497callsCodeunit 130440 Library - Random RandInt
- 498writesTable 39 Purchase Line Modify(true)
- 500raisesOnAfterCreatePurchaseLine
CreateSpecificServiceOrder line 505
- 509callsCodeunit 131902 Library - Service CreateSpecificServiceOrder
CreateDefaultServiceOrder line 515
CreateServiceLines line 525
- 529callsCodeunit 131902 Library - Service CreateServiceLines
CreatePrepaymentAccount line 533
- 537callsCodeunit 131300 Library - ERM CreateGLAccount
- 538validatesTable 15 G/L Account Gen. Bus. Posting Group
- 539validatesTable 15 G/L Account Gen. Prod. Posting Group
- 540validatesTable 15 G/L Account VAT Bus. Posting Group
- 541validatesTable 15 G/L Account VAT Prod. Posting Group
- 542writesTable 15 G/L Account Modify(true)
CreateDefaultJob line 546
- 551callsCodeunit 131920 Library - Job CreateJob
- 552callsCodeunit 131920 Library - Job CreateJobTask
- 554callsCreateDefaultJobPlanningLine
- 555callsCreateDefaultJobPlanningLine
- 556callsCreateDefaultJobPlanningLine
CreateDefaultJobForCustomer line 559
- 564callsCodeunit 131920 Library - Job CreateJob
- 565callsCodeunit 131920 Library - Job CreateJobTask
- 567callsCreateDefaultJobPlanningLine
- 568callsCreateDefaultJobPlanningLine
- 569callsCreateDefaultJobPlanningLine
CreateJobPlanningLine line 572
CreateDefaultJobPlanningLine line 581, local
- 583callsCodeunit 131920 Library - Job CreateJobPlanningLine
FillJournal line 586
- 588callsCodeunit 131331 Library - Cash Flow ClearJournal
- 589callsCodeunit 131331 Library - Cash Flow FillJournal
FillJnlOnCertDateFormulas line 592
- 596callsGenerateDateFromFormulas
- 597callsFillJournalOnCertainDate
FillJournalOnCertainDate line 600
- 604callsChangeWorkdate
- 605callsFillJournal
GetDifferentDsctPaymentTerms line 708
- 713callsCodeunit 131300 Library - ERM CreatePaymentTerms
- 716validatesTable 3 Payment Terms Discount %
- 717writesTable 3 Payment Terms Modify(true)
GetTotalSalesAmount line 720
GetTotalPurchaseAmount line 742
GetTotalServiceAmount line 763
GetTotalAmountForSalesOrderWithCashFlowPaymentTermsDiscount line 786
GetTotalAmountForPurchaseOrderWithCashFlowPaymentTermsDiscount line 810
GetTotalAmountForServiceOrderWithCashFlowPaymentTermsDiscount line 834
GetTotalTaxAmount line 885
- 898callsTable 843 Cash Flow Setup GetTaxPeriodStartEndDates
GetPaymentTermsCode line 926, local
InsertCFLedgerEntry line 948
- 963callsGetCFAccountNo
- 965validatesTable 847 Cash Flow Forecast Entry Amount (LCY)
- 966writesTable 847 Cash Flow Forecast Entry Insert
SelectAndClearGenJournalBatch line 969
- 971callsCodeunit 131300 Library - ERM SelectGenJnlBatch
- 972callsCodeunit 131300 Library - ERM ClearGenJournalLines
SetExpectedDsctAPmtTermValues line 975
- 988callsFindCustomerCFPaymentTerms
- 989callsGetTotalSalesAmount
- 994callsFindCustomerCFPaymentTerms
- 995callsGetTotalServiceAmount
- 1002callsGetTotalPurchaseAmount
- 1010callsCalculateDiscountAmount
SetDefaultDepreciationBook line 1020
- 1026validatesTable 5603 FA Setup Default Depr. Book
- 1027writesTable 5603 FA Setup Modify(true)
SetPmtToleranceOptionsOnCashFlowForecast line 1030
- 1032validatesTable 840 Cash Flow Forecast Consider Pmt. Disc. Tol. Date
- 1033validatesTable 840 Cash Flow Forecast Consider Pmt. Tol. Amount
- 1034writesTable 840 Cash Flow Forecast Modify(true)
SetupPmtDsctGracePeriod line 1037
- 1042validatesTable 98 General Ledger Setup Payment Discount Grace Period
- 1043writesTable 98 General Ledger Setup Modify(true)
SetupPmtTolPercentage line 1046
- 1051validatesTable 98 General Ledger Setup Payment Tolerance %
- 1052writesTable 98 General Ledger Setup Modify(true)
SetupPmtTolAmount line 1055
- 1060validatesTable 98 General Ledger Setup Max. Payment Tolerance Amount
- 1061writesTable 98 General Ledger Setup Modify(true)
SetupCustomerPmtTolAmtTestCase line 1064
- 1066callsCodeunit 130509 Library - Sales CreateCustomer
- 1067callsSetupPmtTolAmtTestCase
SetupVendorPmtTolAmtTestCase line 1070
- 1072callsCodeunit 130512 Library - Purchase CreateVendor
- 1073callsSetupPmtTolAmtTestCase
SetupPmtTolAmtTestCase line 1076, local
SetupPmtDsctTolCustLETest line 1085
SetupPmtDsctTolVendorLETest line 1095
SetupDsctPmtTermsCustLETest line 1105
VerifyCFDateOnCFJnlLine line 1113
- 1115callsCodeunit 130000 Assert AreEqual
VerifyExpectedCFAmount line 1118
- 1120callsCodeunit 130000 Assert AreEqual
VerifyExpectedCFAmtNearlyEqual line 1123
- 1125callsCodeunit 130000 Assert AreNearlyEqual
VerifyCFDataOnSnglJnlLine line 1128
VerifyCFDataOnSnglJnlLineWithDates line 1134
- 1136callsFilterSingleJournalLine
- 1144callsVerifyExpectedCFAmtNearlyEqual
- 1144callsCodeunit 131300 Library - ERM GetAmountRoundingPrecision
- 1145callsVerifyCFDateOnCFJnlLine
UpdateDueDateOnCustomerLedgerEntry line 1148
- 1150validatesTable 21 Cust. Ledger Entry Due Date
- 1150callsGetAnyDateAfter
- 1151writesTable 21 Cust. Ledger Entry Modify(true)
UpdatePmtDiscountDateOnCustomerLedgerEntry line 1154
- 1156validatesTable 21 Cust. Ledger Entry Pmt. Discount Date
- 1156callsGetAnyDateAfter
- 1157writesTable 21 Cust. Ledger Entry Modify(true)
UpdateDueDateOnVendorLedgerEntry line 1160
- 1162validatesTable 25 Vendor Ledger Entry Due Date
- 1162callsGetAnyDateAfter
- 1163writesTable 25 Vendor Ledger Entry Modify(true)
UpdatePmtDiscountDateOnVendorLedgerEntry line 1166
- 1168validatesTable 25 Vendor Ledger Entry Pmt. Discount Date
- 1168callsGetAnyDateAfter
- 1169writesTable 25 Vendor Ledger Entry Modify(true)
GetAnyDateAfter line 1172, local
- 1176callsCodeunit 130440 Library - Random RandInt