'Single', 20 => 'Married - Spouse Works', 30 => 'Married - Spouse does not Work', 40 => 'Head of Household', ); */ var $state_income_tax_rate_options = [ 20210101 => [ 0 => [ [ 'income' => 4000, 'rate' => 0.0, 'constant' => 0 ], [ 'income' => 5000, 'rate' => 3.0, 'constant' => 0 ], [ 'income' => 10000, 'rate' => 4.0, 'constant' => 30 ], [ 'income' => 10000, 'rate' => 5.0, 'constant' => 230 ], ], ], 20200101 => [ 0 => [ [ 'income' => 3000, 'rate' => 0.0, 'constant' => 0 ], [ 'income' => 5000, 'rate' => 3.0, 'constant' => 0 ], [ 'income' => 10000, 'rate' => 4.0, 'constant' => 60 ], [ 'income' => 10000, 'rate' => 5.0, 'constant' => 260 ], ], ], 20190101 => [ 0 => [ [ 'income' => 2000, 'rate' => 0.0, 'constant' => 0 ], [ 'income' => 5000, 'rate' => 3.0, 'constant' => 0 ], [ 'income' => 10000, 'rate' => 4.0, 'constant' => 90 ], [ 'income' => 10000, 'rate' => 5.0, 'constant' => 290 ], ], ], 20060101 => [ 0 => [ [ 'income' => 5000, 'rate' => 3.0, 'constant' => 0 ], [ 'income' => 10000, 'rate' => 4.0, 'constant' => 150 ], [ 'income' => 10000, 'rate' => 5.0, 'constant' => 350 ], ], ], ]; var $state_options = [ 20060101 => [ 'standard_deduction' => [ '10' => 2300, '20' => 2300, '30' => 4600, '40' => 3400, ], ], ]; var $state_ui_options = [ 20060101 => [ 'wage_base' => 14000, 'new_employer_rate' => null ], //New employer rate varies. ]; function getStateAnnualTaxableIncome() { $annual_income = $this->getAnnualTaxableIncome(); $state_deductions = $this->getStateStandardDeduction(); $state_allowance = $this->getStateAllowance(); //This is Excemptions Claimed amount. $income = bcsub( bcsub( $annual_income, $state_deductions ), $state_allowance ); Debug::text( 'State Annual Taxable Income: ' . $income, __FILE__, __LINE__, __METHOD__, 10 ); return $income; } function getStateStandardDeduction() { $retarr = $this->getDataFromRateArray( $this->getDate(), $this->state_options ); if ( $retarr == false ) { return false; } if ( !isset( $retarr['standard_deduction'][$this->getStateFilingStatus()] ) ) { return false; } $deduction = $retarr['standard_deduction'][$this->getStateFilingStatus()]; Debug::text( 'Standard Deduction: ' . $deduction, __FILE__, __LINE__, __METHOD__, 10 ); return $deduction; } function getStatePayPeriodDeductionRoundedValue( $amount ) { return $this->RoundNearestDollar( $amount ); } 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 ); } if ( $retval < 0 ) { $retval = 0; } Debug::text( 'State Annual Tax Payable: ' . $retval, __FILE__, __LINE__, __METHOD__, 10 ); return $retval; } } ?>