Codeunit 6790 "WHT Employee Calculation"
WithholdingTax · Microsoft.WithholdingTax.Employee
Across versions
- BC23-28not present
- BC29-30present
Neighbourhood 4 connected objects and pages
WithholdingTax · Microsoft.WithholdingTax.Employee · BC29-30 · source at 4e6a307c · facts from BC29
Events published
OnAfterIsEmployeeWHTApplicable(GenJnlLine: Record "Gen. Journal Line"; Employee: Record Employee; var IsApplicable: Boolean)(integration)- subscribers: Codeunit 7056 “WHT Expense Category Mgt.” OnAfterIsEmployeeWHTApplicable
OnBeforeCalcEmployeeWHT(var GenJnlLine: Record "Gen. Journal Line"; var WHTAmount: Decimal; var WHTBaseAmount: Decimal; var IsHandled: Boolean)(integration)OnBeforeCheckCalcEmployeeWHT(var GenJnlLine: Record "Gen. Journal Line"; Employee: Record Employee; var WHTAmount: Decimal; var WHTBaseAmount: Decimal)(integration)- subscribers: Codeunit 7056 “WHT Expense Category Mgt.” OnBeforeCheckCalcEmployeeWHT
OnBeforeInsertThresholdAccumulator(var ThresholdAccumulator: Record "WHT Threshold Accumulator"; GenJnlLine: Record "Gen. Journal Line"; PostingSetup: Record "Withholding Tax Posting Setup"; BaseAmount: Decimal)(integration)- subscribers: Codeunit 7056 “WHT Expense Category Mgt.” OnBeforeInsertThresholdAccumulator
OnBeforeUpdateThresholdAccumulator(var ThresholdAccumulator: Record "WHT Threshold Accumulator"; WithholdingTaxEntry: Record "Withholding Tax Entry"; PostingSetup: Record "Withholding Tax Posting Setup")(integration)- subscribers: Codeunit 7056 “WHT Expense Category Mgt.” OnBeforeUpdateThresholdAccumulator
OnBeforeReverseThresholdAccumulator(var ThresholdAccumulator: Record "WHT Threshold Accumulator"; WithholdingTaxEntry: Record "Withholding Tax Entry"; PostingSetup: Record "Withholding Tax Posting Setup")(integration)- subscribers: Codeunit 7056 “WHT Expense Category Mgt.” OnBeforeReverseThresholdAccumulator
OnBeforeResolveWHTGroupComponents(GenJnlLine: Record "Gen. Journal Line"; var WHTGroupCode: Code[20]; var Result: Boolean)(integration)- subscribers: Codeunit 7056 “WHT Expense Category Mgt.” OnBeforeResolveWHTGroupComponents
OnBeforeInsertEmployeeWHTEntry(var WithholdingTaxEntry: Record "Withholding Tax Entry"; GenJnlLine: Record "Gen. Journal Line")(integration)OnAfterInsertEmployeeWHTEntry(var WithholdingTaxEntry: Record "Withholding Tax Entry"; GenJnlLine: Record "Gen. Journal Line")(integration)
Procedures
IsEmployeeWHTApplicable(GenJnlLine: Record "Gen. Journal Line"): BooleanCalcEmployeeWHT(var GenJnlLine: Record "Gen. Journal Line"; var WHTAmount: Decimal; var WHTBaseAmount: Decimal)InsertEmployeeWithholdingTaxEntry(GenJnlLine: Record "Gen. Journal Line"; WHTAmount: Decimal; WHTBaseAmount: Decimal; TransactionNo: Integer; var NextEntryNo: Integer): IntegerInsertEmployeeWHTComponentEntry(GenJnlLine: Record "Gen. Journal Line"; WHTGroupLine: Record "Withholding Tax Group Line"; ComponentWHT: Decimal; WHTBaseAmount: Decimal; TransactionNo: Integer; var NextEntryNo: Integer): IntegerIsNetCalculationBase(GenJnlLine: Record "Gen. Journal Line"): BooleanAccumulateBaseForPeriodThreshold(GenJnlLine: Record "Gen. Journal Line"; BaseAmount: Decimal)ResolveWHTGroupComponents(GenJnlLine: Record "Gen. Journal Line"; var WHTGroupCode: Code[20]): BooleanCalcComponentWHT(WHTGroupLine: Record "Withholding Tax Group Line"; BaseAmount: Decimal; GenJnlLine: Record "Gen. Journal Line"): DecimalEvaluateThreshold(PostingSetup: Record "Withholding Tax Posting Setup"; EmployeeNo: Code[20]; PostingDate: Date; BaseAmount: Decimal): BooleanUpdateThresholdAccumulator(WithholdingTaxEntry: Record "Withholding Tax Entry")ReverseThresholdAccumulator(WithholdingTaxEntry: Record "Withholding Tax Entry")GetPeriodBounds(ThresholdPeriod: Enum "WHT Threshold Period Type"; PostingDate: Date; var PeriodStartDate: Date; var PeriodEndDate: Date)GetEmployeeNoFromJnlLine(GenJnlLine: Record "Gen. Journal Line"): Code[20]IsWithholdingTaxEnabled(): BooleanIsThresholdIncludeded(ThresholdCalculated: Boolean)
Plus 6 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.
- Page 456 “No. Series” (2 calls:
InsertEmployeeWHTComponentEntry → (object),InsertEmployeeWithholdingTaxEntry → (object))
Called by
- Codeunit 6791 “Wthldg Tax Empl. Subscribers” (13 calls:
OnAfterPostEmployee → AccumulateBaseForPeriodThreshold,OnAfterPostEmployee → IsEmployeeWHTApplicable,OnBeforeInitGLEntryForGLAcc → CalcEmployeeWHT, …) - Codeunit 7057 “WHT Exp. Report Post Handler” (7 calls:
AccumulateLineWHT → CalcEmployeeWHT,AccumulateLineWHT → IsEmployeeWHTApplicable,PostBufferedWHT → ResolveWHTGroupComponents, …)
Recent changes
- 2026-08-17 #9973 [WHT]-Withholding Tax is not deducted from Expense Report lines based on the Expense Category during posting (main, BC30, fix)
- 2026-07-29 #9311 Withholding Tax for Employee (main, BC30, feature, added)
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Set up and post employee withholding tax — possibly related: Calculates employee withholding tax with posting group thresholds and GL account assignments. (model-linked)
Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).
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: "WHT Employee Calculation"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.