PayrollCalculatePayStatementBenefits.calculateGarnishmentDeduction Method [AX 2012]

Determines the actual deduction amount for each garnishment or tax levy benefit.

protected PayrollStatementAccountingCurrencyAmount calculateGarnishmentDeduction(
    Common _garnishmentDetail, 
    container _conBenefits, 
    container _garnishmentDeductions)

Run On

Server

Parameters

_garnishmentDetail
Type: Common Table
A record in the PayrollWorkerGarnishment or PayrollWorkerTaxLevy table that defines how to determine the actual deduction if the total deduction exceeds the deduction limit.
_conBenefits
Type: container
The benefit for which the actual deduction amount will be calculated by this method.
_garnishmentDeductions
Type: container
The maximum amount that is allowed for the deduction.

Return Value

Type: PayrollStatementAccountingCurrencyAmount Extended Data Type
A container that holds the actual deduction amount for each benefit that is passed in.

Each element in the _conDeductions parameter is a pair that consists of an expected deduction and an administrative fee.

The algorithm to determine the actual deduction is as follows: If the sum of all deductions and administrative fee is less than or equal to the deduction limit, each benefit gets its full amount of deduction, plus the administrative fee.

Otherwise, the actual deduction is based on the PayrollMultipleGarnishmentMethod value and the deduction limit:

  • If the value is Equal, each benefit gets the same amount minus the administrative fee.

  • If the value is ProRata, each benefit gets the amount in proportion to its expected deduction, minus the administrative fee.

  • If the value is FirstIn, benefits are ordered by enrollment date. The earliest benefit gets the full amount and administrative fee, if it is not over the limit; otherwise, the actual deduction is the limit minus the administrative fee, and so on until no more deduction can be allocated.

Community Additions

ADD
Show: