[ 0 => [ //Uses Subtraction method constants. [ 'income' => 2980, 'rate' => 0.2, 'constant' => 0 ], [ 'income' => 5960, 'rate' => 3, 'constant' => 83.44 ], [ 'income' => 8940, 'rate' => 4, 'constant' => 143.04 ], [ 'income' => 11920, 'rate' => 5, 'constant' => 232.44 ], [ 'income' => 14900, 'rate' => 6, 'constant' => 351.64 ], [ 'income' => 14900, 'rate' => 7, 'constant' => 500.64 ], ], ], 20210101 => [ 0 => [ //Uses Subtraction method constants. [ 'income' => 2800, 'rate' => 0.5, 'constant' => 0 ], [ 'income' => 5610, 'rate' => 3, 'constant' => 70.00 ], [ 'income' => 8410, 'rate' => 4, 'constant' => 126.10 ], [ 'income' => 11220, 'rate' => 5, 'constant' => 210.20 ], [ 'income' => 14030, 'rate' => 6, 'constant' => 322.40 ], [ 'income' => 14030, 'rate' => 7, 'constant' => 462.70 ], ], ], 20200101 => [ 0 => [ //Uses Subtraction method constants. [ 'income' => 2620, 'rate' => 0.8, 'constant' => 0 ], [ 'income' => 5240, 'rate' => 3, 'constant' => 57.64 ], [ 'income' => 7860, 'rate' => 4, 'constant' => 110.04 ], [ 'income' => 10490, 'rate' => 5, 'constant' => 188.64 ], [ 'income' => 13110, 'rate' => 6, 'constant' => 293.54 ], [ 'income' => 13110, 'rate' => 7, 'constant' => 424.64 ], ], ], 20190101 => [ 0 => [ //Uses Subtraction method constants. [ 'income' => 2450, 'rate' => 1.1, 'constant' => 0 ], [ 'income' => 4900, 'rate' => 3, 'constant' => 46.55 ], [ 'income' => 7350, 'rate' => 4, 'constant' => 95.55 ], [ 'income' => 9800, 'rate' => 5, 'constant' => 169.05 ], [ 'income' => 12250, 'rate' => 6, 'constant' => 267.05 ], [ 'income' => 12250, 'rate' => 7, 'constant' => 389.55 ], ], ], 20180101 => [ 0 => [ //Uses Subtraction method constants. [ 'income' => 2290, 'rate' => 1.4, 'constant' => 0 ], [ 'income' => 4580, 'rate' => 3, 'constant' => 36.64 ], [ 'income' => 6870, 'rate' => 4, 'constant' => 82.44 ], [ 'income' => 9160, 'rate' => 5, 'constant' => 151.14 ], [ 'income' => 11450, 'rate' => 6, 'constant' => 242.74 ], [ 'income' => 11450, 'rate' => 7, 'constant' => 357.24 ], ], ], 20170101 => [ 0 => [ //Uses Subtraction method constants. [ 'income' => 2140, 'rate' => 1.7, 'constant' => 0 ], [ 'income' => 4280, 'rate' => 3, 'constant' => 27.82 ], [ 'income' => 6420, 'rate' => 4, 'constant' => 70.62 ], [ 'income' => 8560, 'rate' => 5, 'constant' => 134.82 ], [ 'income' => 10700, 'rate' => 6, 'constant' => 220.42 ], [ 'income' => 10700, 'rate' => 7, 'constant' => 327.42 ], ], ], 20060101 => [ 0 => [ //Uses Subtraction method constants. [ 'income' => 2000, 'rate' => 2, 'constant' => 0 ], [ 'income' => 4000, 'rate' => 3, 'constant' => 20 ], [ 'income' => 6000, 'rate' => 4, 'constant' => 60 ], [ 'income' => 8000, 'rate' => 5, 'constant' => 120 ], [ 'income' => 10000, 'rate' => 6, 'constant' => 200 ], [ 'income' => 10000, 'rate' => 7, 'constant' => 300 ], ], ], ]; var $state_options = [ 20220101 => [ 'standard_deduction_rate' => 10, //Standard Deduction Rate of 10% 'standard_deduction_maximum' => 4580, 'allowance' => 2750, ], 20210101 => [ 'standard_deduction_rate' => 10, //Standard Deduction Rate of 10% 'standard_deduction_maximum' => 4200, 'allowance' => 2670, ], 20200101 => [ 'standard_deduction_rate' => 10, //Standard Deduction Rate of 10% 'standard_deduction_maximum' => 3820, 'allowance' => 2590, ], 20190101 => [ 'standard_deduction_rate' => 10, //Standard Deduction Rate of 10% 'standard_deduction_maximum' => 3470, 'allowance' => 2510, ], 20180101 => [ 'standard_deduction_rate' => 10, 'standard_deduction_maximum' => 3150, 'allowance' => 2440, ], 20170101 => [ 'standard_deduction_rate' => 10, 'standard_deduction_maximum' => 2860, 'allowance' => 2370, ], 20060101 => [ 'standard_deduction_rate' => 10, 'standard_deduction_maximum' => 2600, 'allowance' => 2300, ], ]; var $state_ui_options = [ 20060101 => [ 'wage_base' => 14000, 'new_employer_rate' => 0.49 ], ]; function getStateAnnualTaxableIncome() { $annual_income = $this->getAnnualTaxableIncome(); $standard_deductions = $this->getStateStandardDeduction(); $allowance = $this->getStateAllowanceAmount(); $income = bcsub( bcsub( $annual_income, $standard_deductions ), $allowance ); Debug::text( 'State Annual Taxable Income: ' . $income, __FILE__, __LINE__, __METHOD__, 10 ); return $income; } function getStateFederalTaxMaximum() { $retarr = $this->getDataFromRateArray( $this->getDate(), $this->state_options ); if ( $retarr == false ) { return false; } $maximum = $retarr['federal_tax_maximum'][$this->getStateFilingStatus()]; Debug::text( 'Maximum State allowed Federal Tax: ' . $maximum, __FILE__, __LINE__, __METHOD__, 10 ); return $maximum; } function getStateStandardDeduction() { $retarr = $this->getDataFromRateArray( $this->getDate(), $this->state_options ); if ( $retarr == false ) { return false; } if ( $this->getStateAllowance() == 0 ) { $deduction = 0; } else { $rate = bcdiv( $retarr['standard_deduction_rate'], 100 ); $deduction = bcmul( $this->getAnnualTaxableIncome(), $rate ); if ( $deduction > $retarr['standard_deduction_maximum'] ) { $deduction = $retarr['standard_deduction_maximum']; } } Debug::text( 'Standard Deduction: ' . $deduction, __FILE__, __LINE__, __METHOD__, 10 ); return $deduction; } function getStateAllowanceAmount() { $retarr = $this->getDataFromRateArray( $this->getDate(), $this->state_options ); if ( $retarr == false ) { return false; } $allowance = $retarr['allowance']; $retval = bcmul( $this->getStateAllowance(), $allowance ); Debug::text( 'State Allowance Amount: ' . $retval, __FILE__, __LINE__, __METHOD__, 10 ); return $retval; } function _getStateTaxPayable() { $annual_income = $this->getStateAnnualTaxableIncome(); $retval = 0; if ( $annual_income > 0 ) { $rate = $this->getData()->getStateRate( $annual_income ); $state_constant = $this->getData()->getStateConstant( $annual_income ); //$state_rate_income = $this->getData()->getStateRatePreviousIncome($annual_income); //$retval = bcadd( bcmul( bcsub( $annual_income, $state_rate_income ), $rate ), $state_constant ); $retval = bcsub( bcmul( $annual_income, $rate ), $state_constant ); } if ( $retval < 0 ) { $retval = 0; } Debug::text( 'State Annual Tax Payable: ' . $retval, __FILE__, __LINE__, __METHOD__, 10 ); return $retval; } } ?>