[ 'rate' => 4.95, 'line_1_allowance' => 2425, 'line_2_allowance' => 1000, ], 20210101 => [ 'rate' => 4.95, 'line_1_allowance' => 2375, 'line_2_allowance' => 1000, ], 20200101 => [ 'rate' => 4.95, 'line_1_allowance' => 2325, 'line_2_allowance' => 1000, ], 20190101 => [ 'rate' => 4.95, 'line_1_allowance' => 2275, 'line_2_allowance' => 1000, ], 20180101 => [ 'rate' => 4.95, 'line_1_allowance' => 2225, 'line_2_allowance' => 1000, ], 20170701 => [ 'rate' => 4.95, 'line_1_allowance' => 2175, 'line_2_allowance' => 1000, ], 20160101 => [ 'rate' => 3.75, 'line_1_allowance' => 2175, 'line_2_allowance' => 1000, ], 20150101 => [ 'rate' => 3.75, 'line_1_allowance' => 2150, 'line_2_allowance' => 1000, ], 20140101 => [ 'rate' => 5.0, 'line_1_allowance' => 2125, 'line_2_allowance' => 1000, ], 20130101 => [ 'rate' => 5.0, 'line_1_allowance' => 2100, 'line_2_allowance' => 1000, ], 20060101 => [ 'rate' => 3.0, 'line_1_allowance' => 2000, 'line_2_allowance' => 1000, ], ]; var $state_ui_options = [ 20060101 => [ 'wage_base' => 12960, 'new_employer_rate' => 3.175 ], ]; function getStateAnnualTaxableIncome() { $annual_income = $this->getAnnualTaxableIncome(); $line_1_allowance = $this->getStateLine1AllowanceAmount(); $line_2_allowance = $this->getStateLine2AllowanceAmount(); $income = bcsub( bcsub( $annual_income, $line_1_allowance ), $line_2_allowance ); Debug::text( 'State Annual Taxable Income: ' . $income, __FILE__, __LINE__, __METHOD__, 10 ); return $income; } function getStateLine1AllowanceAmount() { $retarr = $this->getDataFromRateArray( $this->getDate(), $this->state_options ); if ( $retarr == false ) { return false; } $allowance = $retarr['line_1_allowance']; $retval = bcmul( (float)$this->getUserValue1(), $allowance ); Debug::text( 'State Line 1 Allowance Amount: ' . $retval, __FILE__, __LINE__, __METHOD__, 10 ); return $retval; } function getStateLine2AllowanceAmount() { $retarr = $this->getDataFromRateArray( $this->getDate(), $this->state_options ); if ( $retarr == false ) { return false; } $allowance = $retarr['line_2_allowance']; $retval = bcmul( (float)$this->getUserValue2(), $allowance ); Debug::text( 'State Line 1 Allowance Amount: ' . $retval, __FILE__, __LINE__, __METHOD__, 10 ); return $retval; } function _getStateTaxPayable() { $annual_income = $this->getStateAnnualTaxableIncome(); $retval = 0; if ( $annual_income > 0 ) { $retarr = $this->getDataFromRateArray( $this->getDate(), $this->state_options ); if ( $retarr == false ) { return false; } $rate = bcdiv( $retarr['rate'], 100 ); $retval = bcmul( $annual_income, $rate ); } Debug::text( 'State Annual Tax Payable: ' . $retval, __FILE__, __LINE__, __METHOD__, 10 ); if ( $retval < 0 ) { $retval = 0; } return $retval; } } ?>