Codeunit 816 Purch. Post Invoice

Base Application, Microsoft.Purchases.Posting

src/Layers/W1/BaseApp/Purchases/Posting/PurchPostInvoice.Codeunit.al36 procedures and triggers, in source order. Copyright (c) Microsoft Corporation. MIT

ClearBuffers line 92

  1. 94writesTable 1701 Deferral Header DeleteAll
  2. 95writesTable 1702 Deferral Line DeleteAll
  3. 96writesTable 55 Invoice Posting Buffer DeleteAll
  4. 97writesTable 55 Invoice Posting Buffer DeleteAll

PrepareLine line 100

  1. 135callsCodeunit 826 Purch. Post Invoice Events RunOnBeforePrepareLine
  2. 144callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnBeforePreparePurchase
  3. 145callsPrepareInvoicePostingBuffer
  4. 147callsInitTotalAmounts
  5. 151callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnAfterAssignAmounts
  6. 154callsGetAmountsForDeferral
  7. 158callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnAfterSetInvoiceDiscountPosting
  8. 161callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnBeforeCalcInvoiceDiscountPosting
  9. 165callsCalcInvoiceDiscountPosting
  10. 167callsSetSalesTax
  11. 171callsPrepareLineFADiscount
  12. 174callsTable 55 Invoice Posting Buffer SetAccount
  13. 175callsTable 252 General Posting Setup GetPurchInvDiscAccount
  14. 176callsTable 55 Invoice Posting Buffer UpdateVATBase
  15. 177callsCodeunit 6200 Non-Deductible VAT Update
  16. 179callsUpdateInvoicePostingBuffer
  17. 184callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnBeforeSetInvoiceDiscAccount
  18. 187callsTable 252 General Posting Setup GetPurchInvDiscAccount
  19. 188callsTable 55 Invoice Posting Buffer SetAccount
  20. 189callsTable 55 Invoice Posting Buffer UpdateVATBase
  21. 190callsCodeunit 6200 Non-Deductible VAT Update
  22. 191callsUpdateInvoicePostingBuffer
  23. 192callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnAfterSetInvoiceDiscAccount
  24. 201callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnAfterSetLineDiscountPosting
  25. 204callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnBeforeCalcLineDiscountPosting
  26. 208callsCalcLineDiscountPosting
  27. 210callsSetSalesTax
  28. 214callsPrepareLineFADiscount
  29. 217callsTable 55 Invoice Posting Buffer SetAccount
  30. 218callsTable 252 General Posting Setup GetPurchLineDiscAccount
  31. 219callsTable 55 Invoice Posting Buffer UpdateVATBase
  32. 220callsCodeunit 6200 Non-Deductible VAT Update
  33. 222callsUpdateInvoicePostingBuffer
  34. 227callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnBeforeSetLineDiscAccount
  35. 229callsTable 252 General Posting Setup GetPurchLineDiscAccount
  36. 230callsTable 55 Invoice Posting Buffer SetAccount
  37. 231callsTable 55 Invoice Posting Buffer UpdateVATBase
  38. 232callsCodeunit 6200 Non-Deductible VAT Update
  39. 233callsUpdateInvoicePostingBuffer
  40. 234callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnAfterSetLineDiscAccount
  41. 240callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnBeforeAdjustTotalAmounts
  42. 240callsTable 38 Purchase Header GetUseDate
  43. 242callsCodeunit 1720 Deferral Utilities AdjustTotalAmountForDeferralsNoBase
  44. 245callsCodeunit 1720 Deferral Utilities AdjustTotalAmountForDeferralsNoBase
  45. 249callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnBeforeSetAmounts
  46. 255callsTable 55 Invoice Posting Buffer SetAmounts
  47. 258callsTable 55 Invoice Posting Buffer SetAmountsNoVAT
  48. 261callsTable 55 Invoice Posting Buffer SetAmounts
  49. 264callsTable 55 Invoice Posting Buffer SetAmountsNoVAT
  50. 267callsSetSalesTax
  51. 269callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnAfterSetAmounts
  52. 271callsGetPurchAccount
  53. 273callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnBeforeSetAccount
  54. 274callsTable 55 Invoice Posting Buffer SetAccount
  55. 275callsTable 55 Invoice Posting Buffer UpdateVATBase
  56. 276callsCodeunit 6200 Non-Deductible VAT SetNonDeductibleVAT
  57. 279callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnAfterFillInvoicePostingBuffer
  58. 281callsUpdateInvoicePostingBuffer
  59. 283callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnAfterUpdateInvoicePostingBuffer
  60. 287callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnBeforePrepareDeferralLine
  61. 288callsTable 38 Purchase Header GetUseDate
  62. 290callsPrepareDeferralLine
  63. 294callsPrepareDeferralLine
  64. 297callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareLineOnAfterPrepareDeferralLine
  65. 298callsTable 38 Purchase Header GetUseDate
  66. 304callsTable 55 Invoice Posting Buffer PreparePrepmtAdjBuffer
  67. 306callsTable 55 Invoice Posting Buffer PreparePrepmtAdjBuffer
  68. 307callsCodeunit 444 Purchase-Post Prepayments GetCorrBalAccNo
  69. 311callsTable 55 Invoice Posting Buffer PreparePrepmtAdjBuffer
  70. 312callsCodeunit 444 Purchase-Post Prepayments GetInvRoundingAccNo
  71. 315callsInsertTempInvoicePostingBufferReverseCharge

InsertTempInvoicePostingBufferReverseCharge line 318, local

  1. 321writesTable 55 Invoice Posting Buffer Insert
  2. 322writesTable 55 Invoice Posting Buffer Modify

PrepareInvoicePostingBuffer line 325

  1. 327callsCodeunit 826 Purch. Post Invoice Events RunOnBeforePrepareInvoicePostingBuffer
  2. 341callsTable 39 Purchase Line GetVATPct
  3. 344callsCodeunit 6200 Non-Deductible VAT Copy
  4. 362callsUpdateEntryDescriptionFromPurchaseLine
  5. 365callsSetSalesTax
  6. 367callsCodeunit 408 DimensionManagement UpdateGlobalDimFromDimSetID
  7. 375callsCodeunit 6200 Non-Deductible VAT ClearNonDeductibleVAT
  8. 378callsTable 39 Purchase Line GetJnlTemplateName
  9. 380callsCodeunit 826 Purch. Post Invoice Events RunOnAfterPrepareInvoicePostingBuffer

UpdateEntryDescriptionFromPurchaseLine line 383, local

  1. 386callsTable 55 Invoice Posting Buffer UpdateEntryDescription
  2. 390callsTable 39 Purchase Line GetPurchHeader

GetPurchAccount line 402, local

  1. 407callsTable 39 Purchase Line IsCreditDocType
  2. 408callsTable 252 General Posting Setup GetPurchCrMemoAccount
  3. 410callsTable 252 General Posting Setup GetPurchAccount
  4. 412callsCodeunit 826 Purch. Post Invoice Events RunOnAfterGetPurchAccount

CalcInvoiceDiscountPosting line 415, local

  1. 420callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeCalcInvoiceDiscountPosting
  2. 427callsTable 55 Invoice Posting Buffer CalcDiscount
  3. 430callsTable 55 Invoice Posting Buffer CalcDiscountNoVAT
  4. 433callsTable 55 Invoice Posting Buffer CalcDiscount
  5. 436callsTable 55 Invoice Posting Buffer CalcDiscountNoVAT
  6. 439callsCodeunit 826 Purch. Post Invoice Events RunOnAfterCalcInvoiceDiscountPosting

CalcLineDiscountPosting line 442, local

  1. 447callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeCalcLineDiscountPosting
  2. 454callsTable 55 Invoice Posting Buffer CalcDiscount
  3. 457callsTable 55 Invoice Posting Buffer CalcDiscountNoVAT
  4. 460callsTable 55 Invoice Posting Buffer CalcDiscount
  5. 463callsTable 55 Invoice Posting Buffer CalcDiscountNoVAT
  6. 466callsCodeunit 826 Purch. Post Invoice Events RunOnAfterCalcLineDiscountPosting

InitTotalAmounts line 469, local

  1. 477callsCodeunit 6200 Non-Deductible VAT Init
  2. 480callsCodeunit 826 Purch. Post Invoice Events RunOnAfterInitTotalAmounts

PrepareLineFADiscount line 483, local

  1. 489callsCodeunit 826 Purch. Post Invoice Events RunOnBeforePrepareLineFADiscount
  2. 495callsTable 55 Invoice Posting Buffer SetAccount
  3. 496callsTable 55 Invoice Posting Buffer UpdateVATBase
  4. 497callsCodeunit 6200 Non-Deductible VAT Update
  5. 498callsUpdateInvoicePostingBuffer
  6. 499callsTable 55 Invoice Posting Buffer ReverseAmounts
  7. 500callsTable 55 Invoice Posting Buffer SetAccount
  8. 501callsTable 252 General Posting Setup GetPurchFADiscAccount
  9. 502callsTable 55 Invoice Posting Buffer UpdateVATBase
  10. 503callsCodeunit 6200 Non-Deductible VAT Update
  11. 505callsUpdateInvoicePostingBuffer
  12. 506callsTable 55 Invoice Posting Buffer ReverseAmounts

UpdateInvoicePostingBuffer line 510, local

  1. 517callsTable 55 Invoice Posting Buffer Update

PostLines line 520

  1. 533callsCodeunit 826 Purch. Post Invoice Events RunOnBeforePostLines
  2. 537callsCalculateVATAmounts
  3. 545callsTable 55 Invoice Posting Buffer ApplyRoundingForFinalPosting
  4. 546callsPrepareGenJnlLine
  5. 548callsCodeunit 826 Purch. Post Invoice Events RunOnPostLinesOnBeforeGenJnlLinePost
  6. 552callsSplitFA
  7. 554callsRunGenJnlPostLine
  8. 556callsCodeunit 826 Purch. Post Invoice Events RunOnPostLinesOnAfterGenJnlLinePost
  9. 562callsPostJobLine
  10. 565callsPostDeferredJobLines
  11. 570writesTable 55 Invoice Posting Buffer DeleteAll

PrepareGenJnlLine line 573, local

  1. 576callsInitGenJnlLine
  2. 578callsTable 81 Gen. Journal Line CopyDocumentFields
  3. 582callsTable 81 Gen. Journal Line CopyFromPurchHeader
  4. 584callsTable 55 Invoice Posting Buffer CopyToGenJnlLine
  5. 585callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareGenJnlLineOnAfterCopyToGenJnlLine
  6. 590callsTable 330 Currency Exchange Rate ExchangeAmtFCYToLCY
  7. 591callsTable 38 Purchase Header GetUseDate
  8. 604callsTable 55 Invoice Posting Buffer CopyToGenJnlLineFA
  9. 605callsCalcSplitFA
  10. 608callsCodeunit 826 Purch. Post Invoice Events RunOnAfterPrepareGenJnlLine

InitGenJnlLine line 611, local

  1. 616callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeInitGenJnlLine
  2. 620callsTable 81 Gen. Journal Line InitNewLine

PrepareJobLine line 626

  1. 638callsTable 38 Purchase Header IsCreditDocType
  2. 643callsCodeunit 1001 Job Post-Line PostJobOnPurchaseLine

SetJobLineFilters line 647, local

  1. 664callsCodeunit 826 Purch. Post Invoice Events RunOnAfterSetJobLineFilters

CheckCreditLine line 667

  1. 677callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeCheckItemQuantityPurchCredit
  2. 681callsTable 39 Purchase Line IsCreditDocType
  3. 683callsCodeunit 1001 Job Post-Line CheckItemQuantityPurchCredit

PostLedgerEntry line 686

  1. 695callsCodeunit 826 Purch. Post Invoice Events RunOnBeforePostLedgerEntry
  2. 700callsTable 81 Gen. Journal Line InitNewLine
  3. 705callsTable 81 Gen. Journal Line CopyDocumentFields
  4. 711callsTable 81 Gen. Journal Line CopyFromPurchHeader
  5. 712callsTable 81 Gen. Journal Line SetCurrencyFactor
  6. 717callsTable 81 Gen. Journal Line CopyFromPurchHeaderApplyTo
  7. 718callsTable 81 Gen. Journal Line CopyFromPurchHeaderPayment
  8. 720callsInitGenJnlLineAmountFieldsFromTotalLines
  9. 722callsCodeunit 826 Purch. Post Invoice Events RunOnPostLedgerEntryOnBeforeGenJnlPostLine
  10. 724callsCodeunit 12 Gen. Jnl.-Post Line RunWithCheck
  11. 725callsCodeunit 826 Purch. Post Invoice Events RunOnPostLedgerEntryOnAfterGenJnlPostLine

InitGenJnlLineAmountFieldsFromTotalLines line 729, local

  1. 734callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeInitGenJnlLineAmountFieldsFromTotalLines
  2. 746callsTable 330 Currency Exchange Rate ExchangeAmtFCYToLCY
  3. 747callsTable 38 Purchase Header GetUseDate
  4. 749callsCodeunit 826 Purch. Post Invoice Events RunOnAfterInitGenJnlLineAmountFieldsFromTotalLines

PostBalancingEntry line 752

  1. 764callsCodeunit 826 Purch. Post Invoice Events RunOnPostBalancingEntryOnBeforeFindVendLedgEntry
  2. 770callsFindVendorLedgerEntry
  3. 772callsCodeunit 826 Purch. Post Invoice Events RunOnPostBalancingEntryOnAfterFindVendLedgEntry
  4. 774callsTable 81 Gen. Journal Line InitNewLine
  5. 779callsCodeunit 826 Purch. Post Invoice Events RunOnPostBalancingEntryOnAfterInitNewLine
  6. 781callsTable 81 Gen. Journal Line CopyDocumentFields
  7. 787callsTable 81 Gen. Journal Line CopyFromPurchHeader
  8. 788callsTable 81 Gen. Journal Line SetCurrencyFactor
  9. 790callsTable 38 Purchase Header IsCreditDocType
  10. 795callsSetApplyToDocNo
  11. 797callsSetAmountsForBalancingEntry
  12. 799callsCodeunit 826 Purch. Post Invoice Events RunOnPostBalancingEntryOnBeforeGenJnlPostLine
  13. 801callsCodeunit 12 Gen. Jnl.-Post Line RunWithCheck
  14. 802callsCodeunit 826 Purch. Post Invoice Events RunOnPostBalancingEntryOnAfterGenJnlPostLine

SetAmountsForBalancingEntry line 806, local

  1. 811callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeSetAmountsForBalancingEntry
  2. 828callsTable 330 Currency Exchange Rate ExchangeAmtFCYToLCY
  3. 829callsTable 38 Purchase Header GetUseDate

SetApplyToDocNo line 832, local

  1. 840callsCodeunit 826 Purch. Post Invoice Events RunOnAfterSetApplyToDocNo

RunGenJnlPostLine line 850, local

  1. 852callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeRunGenJnlPostLine
  2. 853callsCodeunit 12 Gen. Jnl.-Post Line RunWithCheck

GetAmountsForDeferral line 856, local

  1. 862callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeGetAmountsForDeferral
  2. 877callsTable 39 Purchase Line IsCreditDocType

CalculateVATAmounts line 883, local

  1. 899callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeCalculateVATAmounts
  2. 906callsTable 4 Currency Initialize
  3. 914callsCodeunit 826 Purch. Post Invoice Events RunOnCalculateVATAmountsOnAfterGetReverseChargeVATPostingSetup
  4. 920callsTable 330 Currency Exchange Rate ExchangeAmtLCYToFCY
  5. 921callsTable 38 Purchase Header GetUseDate
  6. 928callsCodeunit 826 Purch. Post Invoice Events RunOnCalculateVATAmountInBufferOnBeforeTempInvoicePostingBufferAssign
  7. 937callsTable 330 Currency Exchange Rate ExchangeAmtFCYToLCY
  8. 938callsTable 38 Purchase Header GetUseDate
  9. 954callsTable 330 Currency Exchange Rate ExchangeAmtFCYToLCY
  10. 955callsTable 38 Purchase Header GetUseDate
  11. 966callsCodeunit 6200 Non-Deductible VAT Update
  12. 966callsGetGeneralLedgerSetupAmountRoundingPrecision
  13. 967callsCodeunit 826 Purch. Post Invoice Events RunOnCalculateVATAmountsOnReverseChargeVATOnBeforeModify
  14. 968writesTable 55 Invoice Posting Buffer Modify
  15. 974callsCodeunit 398 Sales Tax Calculate CalculateTax
  16. 981callsTable 330 Currency Exchange Rate ExchangeAmtLCYToFCY
  17. 984writesTable 55 Invoice Posting Buffer Modify
  18. 987callsCodeunit 826 Purch. Post Invoice Events RunOnCalculateVATAmountsOnAfterVatCalculationType

PrepareDeferralLine line 992, local

  1. 1000callsCodeunit 826 Purch. Post Invoice Events RunOnBeforePrepareDeferralLine
  2. 1010callsCodeunit 1720 Deferral Utilities FilterDeferralLines
  3. 1014callsTable 1706 Deferral Posting Buffer PreparePurch
  4. 1019callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareDeferralLineOnBeforePrepareInitialAmounts
  5. 1022callsTable 1706 Deferral Posting Buffer PrepareInitialAmounts
  6. 1024callsTable 1706 Deferral Posting Buffer Update
  7. 1026callsTable 1706 Deferral Posting Buffer PrepareRemainderPurchase
  8. 1028callsTable 1706 Deferral Posting Buffer Update
  9. 1035callsCheckDeferralAmount
  10. 1039callsTable 1706 Deferral Posting Buffer PreparePurch
  11. 1040callsTable 1706 Deferral Posting Buffer InitFromDeferralLine
  12. 1041callsTable 39 Purchase Line IsCreditDocType
  13. 1042callsTable 1706 Deferral Posting Buffer ReverseAmounts
  14. 1047callsCodeunit 826 Purch. Post Invoice Events RunOnPrepareDeferralLineOnAfterInitFromDeferralLine
  15. 1048callsTable 1706 Deferral Posting Buffer Update

GetGeneralLedgerSetupAmountRoundingPrecision line 1062, local

  1. 1066callsTable 98 General Ledger Setup GetRecordOnce

CalcDeferralAmounts line 1093

  1. 1110callsTable 4 Currency Initialize
  2. 1115callsTable 39 Purchase Line GetDeferralAmount
  3. 1118callsTable 330 Currency Exchange Rate ExchangeAmtFCYToLCY
  4. 1119callsTable 38 Purchase Header GetUseDate
  5. 1121callsCodeunit 826 Purch. Post Invoice Events RunOnCalcDeferralAmountsOnBeforeTempDeferralHeaderInsert
  6. 1122writesTable 1701 Deferral Header Insert
  7. 1124callsCodeunit 1720 Deferral Utilities FilterDeferralLines
  8. 1142callsTable 39 Purchase Line GetDeferralAmount
  9. 1146callsTable 330 Currency Exchange Rate ExchangeAmtFCYToLCY
  10. 1147callsTable 38 Purchase Header GetUseDate
  11. 1152callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeTempDeferralLineInsert
  12. 1154writesTable 1702 Deferral Line Insert

CreatePostedDeferralSchedule line 1160

  1. 1174callsCodeunit 826 Purch. Post Invoice Events RunOnBeforeCreatePostedDeferralSchedule
  2. 1185callsTable 1704 Posted Deferral Header InitFromDeferralHeader
  3. 1187callsCodeunit 1720 Deferral Utilities FilterDeferralLines
  4. 1192callsTable 1705 Posted Deferral Line InitFromDeferralLine
  5. 1197callsCodeunit 826 Purch. Post Invoice Events RunOnAfterCreatePostedDeferralSchedule

CalcSplitFA line 1200, local

  1. 1205callsCodeunit 826 Purch. Post Invoice Events RunOnCalcSplitFA

SplitFA line 1208, local

  1. 1216callsCreateTempFAPreview
  2. 1218callsCreateTempFA
  3. 1226callsCalcSplitAmount
  4. 1228callsCalcSplitAmount
  5. 1231callsCalcSplitAmount
  6. 1233callsCalcSplitAmount
  7. 1235callsCalcSplitAmount
  8. 1238callsCalcSplitAmount
  9. 1240callsCalcSplitAmount
  10. 1243callsCalcSplitAmount
  11. 1245callsCalcSplitAmount
  12. 1248raisesOnSplitFAOnBeforeRunGenJnlPostLine
  13. 1250callsRunGenJnlPostLine

CreateTempFA line 1254

  1. 1265writesTable 5600 Fixed Asset DeleteAll
  2. 1268writesTable 5600 Fixed Asset Insert
  3. 1273writesTable 5600 Fixed Asset Insert(true)
  4. 1275callsAddDefaultDimensionsToFA
  5. 1278writesTable 5600 Fixed Asset Insert
  6. 1285writesTable 5612 FA Depreciation Book Insert(true)

AddDefaultDimensionsToFA line 1290, local

  1. 1301writesTable 352 Default Dimension Insert
  2. 1305writesTable 5600 Fixed Asset Modify(true)

CreateTempFAPreview line 1317, local

  1. 1328writesTable 5600 Fixed Asset DeleteAll
  2. 1331writesTable 5600 Fixed Asset Insert
  3. 1337writesTable 5600 Fixed Asset Insert
  4. 1339callsAddDefaultDimensionsToFA
  5. 1342writesTable 5600 Fixed Asset Insert
  6. 1349writesTable 5612 FA Depreciation Book Insert(true)

PostJobLine line 1354, local

  1. 1360callsSetJobLineFilters
  2. 1366callsCodeunit 1001 Job Post-Line PostJobPurchaseLines
  3. 1376writesTable 39 Purchase Line Insert

PostDeferredJobLines line 1384, local

  1. 1395callsCodeunit 1001 Job Post-Line PostJobPurchaseLines