Codeunit 6786 "Withholding Tax Jnl Subscriber"
WithholdingTax · Microsoft.WithholdingTax
Across versions
- BC23-28not present
- BC29-30present
Neighbourhood 3 connected objects and pages
WithholdingTax · Microsoft.WithholdingTax · BC29-30 · source at ea08af5e · facts from BC29
Event subscriptions
- DeleteWithholdingTaxEntry subscribes to Table “Gen. Journal Line” OnAfterDeleteEvent
- AssignGLAccValue subscribes to Table “Gen. Journal Line” OnAfterAccountNoOnValidateGetGLAccount
- AssignBalGLAccValue subscribes to Table “Gen. Journal Line” OnAfterAccountNoOnValidateGetGLBalAccount
- AssignVendValue subscribes to Table “Gen. Journal Line” OnAfterAccountNoOnValidateGetVendorAccount
- ClearPostingGroups subscribes to Table “Gen. Journal Line” OnAfterClearPostingGroups
- OnBeforeInitGLEntryForGLAcc subscribes to Codeunit “Gen. Jnl.-Post Line” OnBeforeInitGLEntryForGLAcc
- PostWithholdingTaxforGL subscribes to Codeunit “Gen. Jnl.-Post Line” OnPostGLAccOnBeforeDeferralPosting
- OnPostVendOnAfterInitVendLedgEntry subscribes to Codeunit “Gen. Jnl.-Post Line” OnPostVendOnAfterInitVendLedgEntry
- OnPostVendAfterTempDtldCVLedgEntryBufInit subscribes to Codeunit “Gen. Jnl.-Post Line” OnPostVendAfterTempDtldCVLedgEntryBufInit
- OnAfterInitGLRegister subscribes to Codeunit “Gen. Jnl.-Post Line” OnAfterInitGLRegister
- OnAfterVendLedgEntryInsert subscribes to Codeunit “Gen. Jnl.-Post Line” OnBeforePostingDeferral
- OnPostBankAccOnBeforeInitBankAccLedgEntry subscribes to Codeunit “Gen. Jnl.-Post Line” OnPostBankAccOnBeforeInitBankAccLedgEntry
- OnBeforeBankAccLedgEntryUpdateAmounts subscribes to Codeunit “Gen. Jnl.-Post Line” OnBeforeBankAccLedgEntryUpdateAmounts
- OnPostBankAccOnBeforeCheckLedgEntryInsert subscribes to Codeunit “Gen. Jnl.-Post Line” OnPostBankAccOnBeforeCheckLedgEntryInsert
- OnPostBankAccOnBeforeCreateGLEntryBalAcc subscribes to Codeunit “Gen. Jnl.-Post Line” OnPostBankAccOnBeforeCreateGLEntryBalAcc
- OnBeforeCopyFromCVLedgEntryBuffer subscribes to Codeunit “Gen. Jnl.-Post Line” OnBeforeCopyFromCVLedgEntryBuffer
- OnBeforeUpdateOldVendLedgEntryAmountToApply subscribes to Codeunit “Gen. Jnl.-Post Line” OnBeforeUpdateOldVendLedgEntryAmountToApply
- OnAfterOldVendLedgEntryModify subscribes to Codeunit “Gen. Jnl.-Post Line” OnAfterOldVendLedgEntryModify
- OnVendUnrealizedVATOnBeforeGetUnrealizedVATPart subscribes to Codeunit “Gen. Jnl.-Post Line” OnVendUnrealizedVATOnBeforeGetUnrealizedVATPart
- OnUnapplyVendLedgEntryOnAfterCreateGLEntriesForTotalAmounts subscribes to Codeunit “Gen. Jnl.-Post Line” OnUnapplyVendLedgEntryOnAfterCreateGLEntriesForTotalAmounts
- SetNextTaxEntryNo subscribes to Codeunit “Gen. Jnl.-Post Line” OnStartPostingOnAfterSetNextTaxEntryNo
- SetFromWithholdingEntryNo subscribes to Codeunit “Gen. Jnl.-Post Line” OnAfterInitGLRegister
- OnBeforeUpdateGLReg subscribes to Codeunit “Gen. Jnl.-Post Line” OnBeforeUpdateGLReg
- OnBeforeProcessBalanceOfLines subscribes to Codeunit “Gen. Jnl.-Post Batch” OnBeforeProcessBalanceOfLines
- ProcessBalanceOfLines subscribes to Codeunit “Gen. Jnl.-Post Batch” OnAfterProcessBalanceOfLines
- OnProcessLinesOnAfterProcessICTransaction subscribes to Codeunit “Gen. Jnl.-Post Batch” OnProcessLinesOnAfterPostGenJournalLine
- OnBeforeFindGenJnlLineOnProcessLines subscribes to Codeunit “Gen. Jnl.-Post Batch” OnBeforeFindGenJnlLineOnProcessLines
- OnPostPaymentApplicationsOnAfterPostGenJnlLine subscribes to Codeunit “Bank Acc. Reconciliation Post” OnPostPaymentApplicationsOnAfterPostGenJnlLine
- AssignWHTPostingGroupOnCreatePayment subscribes to Page “Create Payment” OnBeforeUpdateGnlJnlLineDimensionsFromVendorPayment
- OnPostPaymentApplicationsOnBeforeValidateApplyRequirements subscribes to Codeunit “Bank Acc. Reconciliation Post” OnPostPaymentApplicationsOnBeforeValidateApplyRequirements
Procedures
IsVendAcc(GenJnlLine: Record "Gen. Journal Line"): BooleanPostGLAccWithholdingTax(GenJnlLine: Record "Gen. Journal Line"; WHTAmountLCY: Decimal; sender: Codeunit "Gen. Jnl.-Post Line")CalcVendWithholdingTax(GenJnlLine: Record "Gen. Journal Line"; var WHTAmountLCY: Decimal; var WHTAmount: Decimal)ProcessSourceCode(SourceCode: Code[10]; SourceCodeSetup: Record "Source Code Setup"): BooleanPostVendWithholdingTax(GenJnlLine: Record "Gen. Journal Line"; VendLedgEntry: Record "Vendor Ledger Entry"; WithholdingAmount: Decimal; WithholdingAmountLCY: Decimal; NextTransactionNo: Integer; var NextWHTEntryNo: Integer; sender: Codeunit "Gen. Jnl.-Post Line")UpdateWithholdingEntryTransaction(DocNo: Code[20]; NextTransactionNo: Integer)CollectWithholdingTaxAmount(DocNo: Code[20]): DecimalInsertWHTPostingBufferPosted(var WithholdingTaxEntryGL: Record "Withholding Tax Entry"; var GenJnlLine: Record "Gen. Journal Line"; Apply: Boolean; Source: Option Sales,Purchase; var NextEntryNo: Integer; var NextCheckEntryNo: Integer; NextTransactionNo: Integer; sender: Codeunit "Gen. Jnl.-Post Line")UnapplyWHTEntry(GenJnlLine: Record "Gen. Journal Line"; CVNo: Code[20]; TransactionNo: Integer; VoidCheck: Boolean; var NextWHTEntryNo: Integer; var NextEntryNo: Integer; var NextCheckEntryNo: Integer; NextTransactionNo: Integer; sender: Codeunit "Gen. Jnl.-Post Line")
Plus 16 local procedures.
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 6785 “Withholding Tax Mgmt.” (37 calls:
ApplyVendLedgEntryOnBeforeOldVendLedgEntryModify → ProcessPayment,ApplyWHT → ApplyVendInvoiceWHTPosted,AssignBalGLAccValue → CheckVendorWithholdingTaxLiable, …) - Codeunit 12 “Gen. Jnl.-Post Line” (12 calls:
CalcDtldCVLedgEntryAmount → ExchangeAmtLCYToFCY2,CalcSourceCurrVATBaseAmount → CalcAmountSourceCurrency,InsertWHTPostingBufferPosted → InitGLEntry, …) - Codeunit 13 “Gen. Jnl.-Post Batch” (1 call:
OnProcessLinesOnAfterProcessICTransaction → PostGenJournalLines)
Recent changes
- 2026-08-19 #9865 [Main] - ‘Greater Than’ Withholding Tax Calculation Rule is not app… (main, BC30, fix)
- 2026-07-22 #9650 [Master] -Revert Changes- ‘Greater Than’ Withholding Tax Calculation Rule is not applied correctly in Withholding Tax Posting Setup. (main, BC30, other)
- 2026-07-20 #9515 [Master] - ‘Greater Than’ Withholding Tax Calculation Rule is not applied correctly in Withholding Tax Posting Setup. (main, BC30, fix)
- 2026-07-17 [#9479 [Master]-]Withholding Tax Entries are not generated at payment because the Withholding Tax. Prod. Posting Group field gets not transferred to the payment line](../../changes/bcapps/9479.md) (main, BC30, fix)
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Withholding Tax Jnl Subscriber"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.