Codeunit 1313 Correct Posted Purch. Invoice

Base Application, Microsoft.Purchases.History

src/Layers/W1/BaseApp/Purchases/History/CorrectPostedPurchInvoice.Codeunit.al47 procedures and triggers, in source order. Copyright (c) Microsoft Corporation. MIT

OnRun line 35, trigger

  1. 42callsUnapplyCostApplication
  2. 43raisesOnRunOnBeforeCreateCopyDocument
  3. 44callsCreateCopyDocument
  4. 47callsCheckPurchaseOrderLinesCanAbsorbCancellation
  5. 49callsCodeunit 310 No. Series IsNoSeriesInDateOrder
  6. 51raisesOnAfterCreateCorrectivePurchCrMemo
  7. 55runsCodeunit 90 Purch.-Post
  8. 56callsSetTrackInfoForCancellation
  9. 58callsCodeunit 22 Item Jnl.-Post Line RedoApplications
  10. 59callsUpdatePurchaseOrderLinesFromCancelledInvoice
  11. 60callsResetIncomingDocumentForCancelledInvoice
  12. 61raisesOnRunOnAfterUpdatePurchaseOrderLinesFromCancelledInvoice

CancelPostedInvoice line 126

  1. 129callsCreateCreditMemo

CreateCreditMemo line 132, local

  1. 138callsTestCorrectInvoiceIsAllowed
  2. 139runsCodeunit 1313 Correct Posted Purch. Invoice
  3. 144raisesOnBeforeShowPostedPurchCreditMemoIsHandled
  4. 146runsPage 140 Posted Purchase Credit Memo
  5. 152raisesOnCreateCreditMemoOnBeforeConfirmPostingCreditMemoFailedOpenIsHandled
  6. 155raisesOnBeforeShowPurchaseCreditMemoIsHandled
  7. 157runsPage 52 Purchase Credit Memo

CreateCopyDocument line 167, local

  1. 171raisesOnBeforeCreateCopyDocument
  2. 175callsTable 38 Purchase Header SetAllowSelectNoSeries
  3. 176raisesOnBeforePurchaseHeaderInsert
  4. 177writesTable 38 Purchase Header Insert(true)
  5. 181callsCodeunit 6620 Copy Document Mgt. SetPropertiesForCorrectiveCreditMemo
  6. 183callsCodeunit 6620 Copy Document Mgt. SetPropertiesForInvoiceCorrection
  7. 188callsCodeunit 6620 Copy Document Mgt. CopyPurchaseDocForInvoiceCancelling
  8. 190raisesOnAfterCreateCopyDocument

CreateCreditMemoCopyDocument line 193

  1. 197callsTable 122 Purch. Inv. Header IsFullyOpen
  2. 198callsShowInvoiceAppliedNotification
  3. 207callsCreateCopyDocument

CreateCorrectiveCreditMemo line 211

  1. 220callsCreateCopyDocument
  2. 222raisesOnBeforeShowPurchaseCreditMemoIsHandled
  3. 224runsPage 52 Purchase Credit Memo

ShowAppliedEntries line 227

  1. 234runsPage 62 Applied Vendor Entries

CancelPostedInvoiceStartNewInvoice line 242

  1. 246callsCreateCreditMemo
  2. 247callsCreateCopyDocument
  3. 248raisesOnCancelPostedInvoiceStartNewInvoiceOnAfterCreateCorrPurchaseInvoice

TestCorrectInvoiceIsAllowed line 253

  1. 256callsTestIfPostingIsAllowed
  2. 257callsTestIfInvoiceIsCorrectedOnce
  3. 258callsTestIfInvoiceIsNotCorrectiveDoc
  4. 259callsTestIfInvoiceIsPaid
  5. 260callsTestIfVendorIsBlocked
  6. 261callsTestIfVendorIsBlocked
  7. 262callsTestVendorDimension
  8. 263callsTestDimensionOnHeader
  9. 264callsTestPurchaseLines
  10. 265callsTestIfAnyFreeNumberSeries
  11. 266callsTestExternalDocument
  12. 267callsTestInventoryPostingClosed
  13. 269raisesOnAfterTestCorrectInvoiceIsAllowed

ShowInvoiceAppliedNotification line 272, local

  1. 290callsCodeunit 1511 Notification Lifecycle Mgt. SendNotification

SetTrackInfoForCancellation line 293, local

  1. 300raisesOnBeforeSetTrackInfoForCancellationIsHandled
  2. 306callsTable 1900 Cancelled Document InsertPurchInvToCrMemoCancelledDocument

TestDimensionOnHeader line 309, local

  1. 313callsCodeunit 408 DimensionManagement CheckDimIDComb
  2. 314callsErrorHelperHeader

TestIfVendorIsBlocked line 317, local

  1. 323callsErrorHelperHeader

TestVendorDimension line 326, local

  1. 336callsCodeunit 408 DimensionManagement CheckDimValuePosting
  2. 337callsErrorHelperAccount

TestPurchaseLines line 340, local

  1. 355callsIsCommentLine
  2. 356callsTable 123 Purch. Inv. Line IsCancellationSupported
  3. 356callsNotInvRndAccount
  4. 357callsErrorHelperLine
  5. 362callsTable 27 Item IsInventoriableType
  6. 363callsWasNotCancelled
  7. 364callsTable 123 Purch. Inv. Line CalcReceivedPurchNotReturned
  8. 366raisesOnTestPurchaseLinesOnAfterCalcThrowItemReturnedError
  9. 368callsErrorHelperLine
  10. 372callsErrorHelperLine
  11. 376callsErrorHelperLine
  12. 381callsCodeunit 408 DimensionManagement CheckDimValuePosting
  13. 382callsErrorHelperAccount
  14. 384callsTable 27 Item IsInventoriableType
  15. 385callsTestInventoryPostingSetup
  16. 388callsTestGenPostingSetup
  17. 389callsTestVendorPostingGroup
  18. 390callsTestVATPostingSetup
  19. 392callsCodeunit 408 DimensionManagement CheckDimIDComb
  20. 393callsErrorHelperLine

TestGLAccount line 398, local

  1. 408callsErrorHelperAccount
  2. 414callsCodeunit 408 DimensionManagement CheckDimValuePosting
  3. 415callsErrorHelperAccount

TestGLAccount line 419, local

  1. 429callsErrorHelperAccount
  2. 433callsCodeunit 408 DimensionManagement CheckDimValuePosting
  3. 434callsErrorHelperAccount

TestIfInvoiceIsPaid line 439, local

  1. 444raisesOnBeforeTestIfInvoiceIsPaidIsHandled
  2. 451callsErrorHelperHeader

TestIfInvoiceIsCorrectedOnce line 454, local

  1. 458callsTable 1900 Cancelled Document FindPurchCancelledInvoice
  2. 459callsErrorHelperHeader

TestIfInvoiceIsNotCorrectiveDoc line 462, local

  1. 466callsTable 1900 Cancelled Document FindPurchCorrectiveInvoice
  2. 467callsErrorHelperHeader

TestIfPostingIsAllowed line 470, local

  1. 474callsCodeunit 11 Gen. Jnl.-Check Line DateNotAllowed
  2. 475callsErrorHelperHeader

TestIfAnyFreeNumberSeries line 478, local

  1. 488raisesOnBeforeTestIfAnyFreeNumberSeriesIsHandled
  2. 495callsTryPeekNextNo
  3. 496callsErrorHelperHeader
  4. 504callsTryPeekNextNo
  5. 505callsErrorHelperHeader
  6. 507callsTryPeekNextNo
  7. 508callsErrorHelperHeader

TryPeekNextNo line 512, local

  1. 516callsCodeunit 310 No. Series PeekNextNo

TestExternalDocument line 520, local

  1. 526callsErrorHelperHeader

TestInventoryPostingClosed line 529, local

  1. 544callsErrorHelperHeader

TestGenPostingSetup line 548, local

  1. 558callsTestGLAccount
  2. 560callsTestGLAccount
  3. 562callsIsCheckDirectCostAppliedAccount
  4. 564callsTestGLAccount
  5. 566callsHasLineDiscountSetup
  6. 568callsTestGLAccount

TestVendorPostingGroup line 571, local

  1. 577callsTestGLAccount

TestVATPostingSetup line 580, local

  1. 586raisesOnBeforeTestVATPostingSetupIsHandled
  2. 593callsTestGLAccount

TestInventoryPostingSetup line 597, local

  1. 603raisesOnBeforeTestInventoryPostingSetupIsHandled
  2. 609callsTestGLAccount

IsCommentLine line 612, local

  1. 615raisesOnAfterIsCommentLine

UnapplyCostApplication line 638, local

  1. 645raisesOnBeforeUnAppyCostApplicationIsHandled
  2. 649callsFindItemLedgEntries
  3. 650callsFindAppliedInbndEntries
  4. 652callsCodeunit 22 Item Jnl.-Post Line UnApply

FindItemLedgEntries line 658

  1. 666callsTable 123 Purch. Inv. Line GetItemLedgEntries

FindAppliedInbndEntries line 670, local

  1. 675writesTable 339 Item Application Entry DeleteAll
  2. 678callsTable 339 Item Application Entry AppliedOutbndEntryExists
  3. 682writesTable 339 Item Application Entry Insert

UpdatePurchaseOrderLinesFromCancelledInvoice line 832, local

  1. 844writesTable 32 Item Ledger Entry DeleteAll
  2. 845callsTable 123 Purch. Inv. Line GetItemLedgEntries
  3. 847callsUpdatePurchaseOrderLineInvoicedQuantity
  4. 848callsUpdatePurchaseOrderLinePrepmtAmount
  5. 849callsUpdateReverseItemChargeAssignment
  6. 851callsCodeunit 5817 Undo Posting Management RevertPostedItemTracking

UpdatePurchaseOrderLineInvoicedQuantity line 856, local

  1. 861raisesOnBeforeUpdatePurchaseOrderLineInvoicedQuantityIsHandled
  2. 869callsTable 39 Purchase Line InitOutstanding
  3. 870callsTable 39 Purchase Line InitQtyToReceive
  4. 871callsTable 39 Purchase Line InitQtyToInvoice
  5. 872writesTable 39 Purchase Line Modify

HasLineDiscountSetup line 875, local

  1. 877callsTable 312 Purchases & Payables Setup GetRecordOnce
  2. 881raisesOnHasLineDiscountSetup

IsCheckDirectCostAppliedAccount line 884, local

  1. 891callsTable 27 Item IsInventoriableType
  2. 893raisesOnAfterIsCheckDirectCostAppliedAccount

UpdateReverseItemChargeAssignment line 896, local

  1. 910callsCodeunit 5805 Item Charge Assgnt. (Purch.) ReverseItemChargeAssgnt

UpdatePurchaseOrderLineIfExist line 913, internal

  1. 923callsGetPurchInvLineAndUpdatePurchaseOrderLines

GetPurchInvLineAndUpdatePurchaseOrderLines line 927, local

  1. 931callsTable 125 Purch. Cr. Memo Line GetPurchaseInvoiceLine
  2. 933callsUpdatePurchaseOrderLinesFromCreditMemo

UpdatePurchaseOrderLinesFromCreditMemo line 936, local

  1. 946callsTable 123 Purch. Inv. Line GetItemLedgEntries
  2. 948callsUpdatePurchaseOrderLineInvoicedQuantity
  3. 949callsUpdatePurchaseOrderLinePrepmtAmount
  4. 953callsUpdateWhseRequest
  5. 956callsCodeunit 5817 Undo Posting Management RevertPostedItemTracking

UpdatePurchaseOrderLinePrepmtAmount line 960, local

  1. 977callsTable 4 Currency Initialize
  2. 980callsValidatePrepmtAmountsWithCurrency
  3. 982callsValidatePrepmtAmountsFromPurchInv
  4. 984validatesTable 39 Purchase Line Prepmt Amt Deducted
  5. 991validatesTable 39 Purchase Line Prepmt Amt to Deduct
  6. 998writesTable 39 Purchase Line Modify(true)

ValidatePrepmtAmountsWithCurrency line 1001, local

  1. 1005validatesTable 39 Purchase Line Prepmt. Amount Inv. (LCY)
  2. 1009callsTable 330 Currency Exchange Rate ExchangeAmtFCYToLCY
  3. 1018validatesTable 39 Purchase Line Prepmt. VAT Amount Inv. (LCY)
  4. 1022callsTable 330 Currency Exchange Rate ExchangeAmtFCYToLCY

ValidatePrepmtAmountsFromPurchInv line 1032, local

  1. 1034validatesTable 39 Purchase Line Prepmt. Amount Inv. (LCY)
  2. 1041validatesTable 39 Purchase Line Prepmt. VAT Amount Inv. (LCY)

UpdateWhseRequest line 1049, local

  1. 1054callsTable 5765 Warehouse Request SetSourceFilter
  2. 1058writesTable 5765 Warehouse Request Modify

ResetIncomingDocumentForCancelledInvoice line 1062, local

  1. 1096writesTable 130 Incoming Document Modify(true)
  2. 1099writesTable 133 Incoming Document Attachment ModifyAll
  3. 1100writesTable 133 Incoming Document Attachment ModifyAll

CheckPurchaseOrderLinesCanAbsorbCancellation line 1103, local

  1. 1115callsCheckCancelledQuantityWithinOrderLine