Codeunit 131340 Library - Cost Accounting

Application Test Library

src/Layers/W1/Tests/ApplicationTestLibrary/LibraryCostAccounting.Codeunit.al65 procedures and triggers, in source order. Copyright (c) Microsoft Corporation. MIT

CheckAllocTargetSharePercent line 37

  1. 49callsCodeunit 130000 Assert AreEqual

CheckBlockedDimCombination line 57

  1. 61callsCostCenterDimension
  2. 61callsCostObjectDimension
  3. 62callsDeleteBlockedDimCombinations
  4. 65callsCostCenterDimension
  5. 65callsCostObjectDimension
  6. 66callsDeleteBlockedDimCombinations

CheckBlockedDimensionValues line 69

  1. 76callsCodeunit 131001 Library - Dimension FindDefaultDimension
  2. 81validatesTable 349 Dimension Value Blocked
  3. 82writesTable 349 Dimension Value Modify(true)

CheckCostJnlLineConsistency line 87

  1. 93callsCreateCostCenter
  2. 94validatesTable 1101 Cost Journal Line Cost Center Code
  3. 99callsCreateCostCenter
  4. 100validatesTable 1101 Cost Journal Line Bal. Cost Center Code
  5. 105validatesTable 1101 Cost Journal Line Cost Object Code
  6. 109validatesTable 1101 Cost Journal Line Bal. Cost Object Code
  7. 111writesTable 1101 Cost Journal Line Modify(true)

ClearCostJournalLines line 114

  1. 120writesTable 1101 Cost Journal Line DeleteAll(true)

CreateAllocSource line 163

  1. 167callsFindCostType
  2. 171validatesTable 1106 Cost Allocation Source ID
  3. 171callsLastAllocSourceID
  4. 172validatesTable 1106 Cost Allocation Source Level
  5. 172callsCodeunit 130440 Library - Random RandInt
  6. 173validatesTable 1106 Cost Allocation Source Credit to Cost Type
  7. 174writesTable 1106 Cost Allocation Source Insert(true)

CreateAllocSourceWithCCenter line 177

  1. 179callsCreateAllocSource
  2. 180callsUpdateAllocSourceWithCCenter

CreateAllocSourceWithCObject line 183

  1. 185callsCreateAllocSource
  2. 186callsUpdateAllocSourceWithCObject

CreateAllocTarget line 189

  1. 193callsLastAllocTargetID
  2. 196validatesTable 1107 Cost Allocation Target ID
  3. 197validatesTable 1107 Cost Allocation Target Line No.
  4. 198validatesTable 1107 Cost Allocation Target Target Cost Type
  5. 199validatesTable 1107 Cost Allocation Target Base
  6. 200validatesTable 1107 Cost Allocation Target Allocation Target Type
  7. 201writesTable 1107 Cost Allocation Target Insert(true)
  8. 206validatesTable 1107 Cost Allocation Target Share
  9. 207writesTable 1107 Cost Allocation Target Modify(true)

CreateAllocTargetWithCCenter line 210

  1. 212callsCreateAllocTarget
  2. 213callsUpdateAllocTargetWithCCenter

CreateAllocTargetWithCObject line 216

  1. 218callsCreateAllocTarget
  2. 219callsUpdateAllocTargetWithCObject

CreateBalanceSheetGLAccount line 222

  1. 229validatesTable 1108 Cost Accounting Setup Align G/L Account
  2. 230writesTable 1108 Cost Accounting Setup Modify(true)
  3. 232callsCodeunit 131300 Library - ERM CreateGLAccount
  4. 234validatesTable 15 G/L Account Income/Balance
  5. 235writesTable 15 G/L Account Modify(true)
  6. 238validatesTable 1108 Cost Accounting Setup Align G/L Account
  7. 239writesTable 1108 Cost Accounting Setup Modify(true)

CreateCostBudgetEntry line 242

  1. 247callsFindCostType
  2. 248callsFindCostCenter
  3. 251validatesTable 1109 Cost Budget Entry Date
  4. 252validatesTable 1109 Cost Budget Entry Budget Name
  5. 253validatesTable 1109 Cost Budget Entry Cost Type No.
  6. 254validatesTable 1109 Cost Budget Entry Cost Center Code
  7. 255validatesTable 1109 Cost Budget Entry Amount
  8. 255callsCodeunit 130440 Library - Random RandDec
  9. 256writesTable 1109 Cost Budget Entry Insert(true)

CreateCostBudgetName line 259

  1. 262validatesTable 1110 Cost Budget Name Name
  2. 263callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 264validatesTable 1110 Cost Budget Name Description
  4. 265writesTable 1110 Cost Budget Name Insert(true)

CreateCostCenter line 268

  1. 271validatesTable 1112 Cost Center Code
  2. 271callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 272validatesTable 1112 Cost Center Line Type
  4. 273writesTable 1112 Cost Center Insert(true)

CreateCostCenterFromDimension line 276

  1. 282callsSetAlignment
  2. 284callsCodeunit 131001 Library - Dimension CreateDimensionValue

CreateCostJournalBatch line 288

  1. 290callsCreateCostJnlBatchWithDelOpt

CreateCostJournalTemplate line 293

  1. 296validatesTable 1100 Cost Journal Template Name
  2. 297callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 298writesTable 1100 Cost Journal Template Insert(true)

CreateCostJnlBatchWithDelOpt line 301

  1. 304validatesTable 1102 Cost Journal Batch Journal Template Name
  2. 305validatesTable 1102 Cost Journal Batch Delete after Posting
  3. 306validatesTable 1102 Cost Journal Batch Name
  4. 306callsCodeunit 131000 Library - Utility GenerateRandomCode
  5. 307validatesTable 1102 Cost Journal Batch Description
  6. 308writesTable 1102 Cost Journal Batch Insert(true)

CreateCostJournalLine line 311

  1. 316callsFindCostType
  2. 317callsFindCostType
  3. 319callsCreateCostJournalLineBasic
  4. 322callsCheckCostJnlLineConsistency

CreateCostJournalLineBasic line 325

  1. 330validatesTable 1101 Cost Journal Line Journal Template Name
  2. 331validatesTable 1101 Cost Journal Line Journal Batch Name
  3. 333validatesTable 1101 Cost Journal Line Line No.
  4. 333callsCodeunit 131000 Library - Utility GetNewLineNo
  5. 334writesTable 1101 Cost Journal Line Insert(true)
  6. 336validatesTable 1101 Cost Journal Line Posting Date
  7. 337validatesTable 1101 Cost Journal Line Document No.
  8. 338validatesTable 1101 Cost Journal Line Cost Type No.
  9. 339validatesTable 1101 Cost Journal Line Bal. Cost Type No.
  10. 340validatesTable 1101 Cost Journal Line Amount
  11. 340callsCodeunit 130440 Library - Random RandInt
  12. 341writesTable 1101 Cost Journal Line Modify(true)

CreateCostObject line 344

  1. 347validatesTable 1113 Cost Object Code
  2. 347callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 348validatesTable 1113 Cost Object Line Type
  4. 349writesTable 1113 Cost Object Insert(true)

CreateCostObjectFromDimension line 352

  1. 358callsSetAlignment
  2. 360callsCodeunit 131001 Library - Dimension CreateDimensionValue

CreateCostType line 365

  1. 367callsCreateCostTypeWithGLRange

CreateCostTypeNoGLRange line 370

  1. 373validatesTable 1103 Cost Type No.
  2. 373callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 374validatesTable 1103 Cost Type Type
  4. 375validatesTable 1103 Cost Type Combine Entries
  5. 376writesTable 1103 Cost Type Insert(true)

CreateCostTypeWithCombine line 379

  1. 381callsCreateCostTypeWithGLRange
  2. 382validatesTable 1103 Cost Type Combine Entries
  3. 383writesTable 1103 Cost Type Modify(true)

CreateCostTypeWithGLRange line 386

  1. 393callsSetAlignment
  2. 394callsCreateIncomeStmtGLAccount
  3. 400callsSetAlignment
  4. 402callsCodeunit 130440 Library - Random RandInt
  5. 404callsCreateIncomeStmtGLAccount
  6. 408callsCodeunit 130000 Assert AreEqual
  7. 409validatesTable 1103 Cost Type G/L Account Range
  8. 410writesTable 1103 Cost Type Modify(true)

CreateIncomeStmtGLAccount line 414

  1. 418callsCodeunit 131300 Library - ERM CreateGLAccount
  2. 419validatesTable 15 G/L Account Income/Balance
  3. 420writesTable 15 G/L Account Modify(true)
  4. 425validatesTable 1103 Cost Type G/L Account Range
  5. 426writesTable 1103 Cost Type Modify(true)

CreateJnlLine line 431

  1. 435callsSetupGeneralJnlBatch
  2. 438callsCodeunit 131300 Library - ERM CreateGeneralJnlLine
  3. 440callsCodeunit 130440 Library - Random RandDec
  4. 443validatesTable 81 Gen. Journal Line Gen. Posting Type
  5. 444validatesTable 81 Gen. Journal Line Gen. Bus. Posting Group
  6. 445validatesTable 81 Gen. Journal Line Gen. Prod. Posting Group
  7. 446writesTable 81 Gen. Journal Line Modify(true)

DeleteAllCostTypeEntries line 449

  1. 456writesTable 1103 Cost Type DeleteAll(true)

DeleteCostBudgetRegEntries line 459

  1. 464callsDeleteCostBudgetRegEntriesFrom

DeleteCostBudgetRegEntriesFrom line 467

  1. 473callsReport 1139 Delete Cost Budget Entries InitializeRequest

DeleteCostRegisterEntries line 479

  1. 484callsDeleteCostRegisterEntriesFrom

DeleteCostRegisterEntriesFrom line 487

  1. 493callsReport 1130 Delete Cost Entries InitializeRequest

DeleteBlockedDimCombinations line 499

  1. 504writesTable 350 Dimension Combination Delete(true)

FindAllocSource line 508

  1. 521callsCodeunit 130440 Library - Random RandInt

FindCostType line 524

  1. 526callsGetAllCostTypes
  2. 530callsCodeunit 130440 Library - Random RandInt

FindCostTypeLinkedToGLAcc line 533

  1. 542callsCodeunit 130440 Library - Random RandInt

FindCostTypeWithCostCenter line 546

  1. 548callsGetAllCostTypes
  2. 554callsCodeunit 130440 Library - Random RandInt

FindCostCenter line 557

  1. 566callsCodeunit 130440 Library - Random RandInt

FindCostJournalBatch line 569

  1. 571callsFindCostJnlBatchWithDelOption

FindCostJnlBatchWithDelOption line 574

  1. 579callsCreateCostJournalBatch

FindCostObject line 589

  1. 598callsCodeunit 130440 Library - Random RandInt

FindGLAccLinkedToCostType line 601

  1. 603callsCodeunit 131300 Library - ERM FindGLAccount
  2. 608callsCodeunit 130440 Library - Random RandInt

FindIncomeStmtGLAccount line 620

  1. 622callsGetAllIncomeStmtGLAccounts
  2. 623callsCodeunit 130440 Library - Random RandInt

GetAllIncomeStmtGLAccounts line 636

  1. 638callsCodeunit 131300 Library - ERM FindGLAccount

InitializeCASetup line 689

  1. 694validatesTable 1108 Cost Accounting Setup Align G/L Account
  2. 695validatesTable 1108 Cost Accounting Setup Align Cost Center Dimension
  3. 696validatesTable 1108 Cost Accounting Setup Align Cost Object Dimension
  4. 697validatesTable 1108 Cost Accounting Setup Auto Transfer from G/L
  5. 699validatesTable 1108 Cost Accounting Setup Last Allocation ID
  6. 701validatesTable 1108 Cost Accounting Setup Last Allocation Doc. No.
  7. 702writesTable 1108 Cost Accounting Setup Modify(true)
  8. 704callsInitializeCASourceCodes

InitializeCASourceCodes line 707

  1. 716callsCodeunit 131300 Library - ERM CreateSourceCode
  2. 717validatesTable 242 Source Code Setup G/L Entry to CA
  3. 721callsCodeunit 131300 Library - ERM CreateSourceCode
  4. 722validatesTable 242 Source Code Setup Cost Journal
  5. 726callsCodeunit 131300 Library - ERM CreateSourceCode
  6. 727validatesTable 242 Source Code Setup Cost Allocation
  7. 732writesTable 242 Source Code Setup Modify(true)

PostCostJournalLine line 754

  1. 756runsCodeunit 1103 CA Jnl.-Post Batch

PostGenJournalLine line 759

  1. 763callsCreateJnlLine
  2. 764callsCodeunit 131300 Library - ERM PostGeneralJnlLine

SetAutotransferFromGL line 784

  1. 789validatesTable 1108 Cost Accounting Setup Auto Transfer from G/L
  2. 790writesTable 1108 Cost Accounting Setup Modify(true)

SetDefaultDimension line 793

  1. 799callsCostCenterDimension
  2. 800callsCodeunit 131001 Library - Dimension FindDimensionValue
  3. 800callsCostCenterDimension
  4. 801callsCodeunit 131001 Library - Dimension CreateDefaultDimensionGLAcc
  5. 807validatesTable 1112 Cost Center Code
  6. 808validatesTable 1112 Cost Center Line Type
  7. 809writesTable 1112 Cost Center Insert(true)
  8. 812callsCheckBlockedDimensionValues
  9. 813callsCheckBlockedDimCombination

SetupGeneralJnlBatch line 816

  1. 820callsCodeunit 131300 Library - ERM SelectGenJnlBatch
  2. 821callsCreateBalanceSheetGLAccount
  3. 822validatesTable 232 Gen. Journal Batch Bal. Account No.
  4. 823writesTable 232 Gen. Journal Batch Modify(true)
  5. 825callsCodeunit 131300 Library - ERM ClearGenJournalLines

SetupGLAccount line 828

  1. 830callsFindGLAccLinkedToCostType
  2. 831callsSetDefaultDimension

TransferGLEntries line 840

  1. 842runsCodeunit 1105 Transfer GL Entries to CA

UpdateAllocSourceWithCCenter line 845

  1. 849callsFindCostCenter
  2. 850validatesTable 1106 Cost Allocation Source Cost Center Code
  3. 851writesTable 1106 Cost Allocation Source Modify(true)

UpdateAllocSourceWithCObject line 854

  1. 858callsFindCostObject
  2. 859validatesTable 1106 Cost Allocation Source Cost Object Code
  3. 860writesTable 1106 Cost Allocation Source Modify(true)

UpdateAllocTargetWithCCenter line 863

  1. 867callsFindCostCenter
  2. 868validatesTable 1107 Cost Allocation Target Target Cost Center
  3. 869writesTable 1107 Cost Allocation Target Modify(true)

UpdateAllocTargetWithCObject line 872

  1. 876callsFindCostObject
  2. 877validatesTable 1107 Cost Allocation Target Target Cost Object
  3. 878writesTable 1107 Cost Allocation Target Modify(true)

UpdateCostTypeWithCostCenter line 882

  1. 886callsFindCostCenter
  2. 887validatesTable 1103 Cost Type Cost Center Code
  3. 888writesTable 1103 Cost Type Modify(true)

UpdateCostTypeWithCostObject line 892

  1. 896callsFindCostObject
  2. 897validatesTable 1103 Cost Type Cost Object Code
  3. 898writesTable 1103 Cost Type Modify(true)

ValidateEntriesTransfered line 901

  1. 917callsCodeunit 130000 Assert AreEqual
  2. 919callsCodeunit 130000 Assert AreEqual
  3. 920callsCodeunit 130000 Assert AreEqual
  4. 924callsCodeunit 130000 Assert AreEqual
  5. 925callsCodeunit 130000 Assert AreEqual
  6. 927callsCodeunit 130000 Assert AreEqual
  7. 929callsCodeunit 130000 Assert AreEqual
  8. 931callsCodeunit 130000 Assert AreEqual
  9. 933callsCodeunit 130000 Assert AreEqual

ValidateGLAccountCostTypeRef line 936

  1. 946callsFindGLAccountsByCostType

ValidateGLAccountIsIncomeStmt line 952

  1. 957callsFindGLAccountsByCostType

VerifyCostTypeIntegrity line 964

  1. 969callsGetAllCostTypes