[ //01-Jun-2018 'standard_deduction_rate' => 15, 'standard_deduction_minimum' => 1500, 'standard_deduction_maximum' => 2250, 'allowance' => 3200, ], //01-Jan-12: No change. //01-Jan-11: No change. //01-Jan-10: No change. //01-Jan-09: No change. 20080701 => [ 'standard_deduction_rate' => 15, 'standard_deduction_minimum' => 1500, 'standard_deduction_maximum' => 2000, 'allowance' => 3200, ], 20060101 => [ 'standard_deduction_rate' => 15, 'standard_deduction_minimum' => 1500, 'standard_deduction_maximum' => 2000, 'allowance' => 2400, ], ]; function getDistrictAnnualTaxableIncome() { $annual_income = $this->getAnnualTaxableIncome(); $standard_deduction = $this->getDistrictStandardDeductionAmount(); $district_allowance = $this->getDistrictAllowanceAmount(); $income = bcsub( bcsub( $annual_income, $standard_deduction ), $district_allowance ); Debug::text( 'District Annual Taxable Income: ' . $income, __FILE__, __LINE__, __METHOD__, 10 ); return $income; } function getDistrictStandardDeductionAmount() { $retarr = $this->getDataFromRateArray( $this->getDate(), $this->district_options ); if ( $retarr == false ) { return false; } $rate = bcdiv( $retarr['standard_deduction_rate'], 100 ); $deduction = bcmul( $this->getAnnualTaxableIncome(), $rate ); if ( $deduction < $retarr['standard_deduction_minimum'] ) { $retval = $retarr['standard_deduction_minimum']; } else if ( $deduction > $retarr['standard_deduction_maximum'] ) { $retval = $retarr['standard_deduction_maximum']; } else { $retval = $deduction; } Debug::text( 'District Standard Deduction Amount: ' . $retval, __FILE__, __LINE__, __METHOD__, 10 ); return $retval; } function getDistrictAllowanceAmount() { $retarr = $this->getDataFromRateArray( $this->getDate(), $this->district_options ); if ( $retarr == false ) { return false; } $allowance_arr = $retarr['allowance']; $retval = bcmul( $this->getDistrictAllowance(), $allowance_arr ); Debug::text( 'District Allowance Amount: ' . $retval, __FILE__, __LINE__, __METHOD__, 10 ); return $retval; } function getDistrictTaxPayable() { $annual_income = $this->getDistrictAnnualTaxableIncome(); $rate = bcdiv( (float)$this->getUserValue1(), 100 ); $retval = bcmul( $annual_income, $rate ); if ( $retval < 0 ) { $retval = 0; } Debug::text( 'District Annual Tax Payable: ' . $retval, __FILE__, __LINE__, __METHOD__, 10 ); return $retval; } } ?>