Skip to content

Commit

Permalink
Merge pull request #230 from spurjobs/feature/laws-175-in-tax-updates
Browse files Browse the repository at this point in the history
LAWS-175 LAWS-161 LAWS-167 LAWS-158 Indiana Local Tax Updates 2020, MN and UT SUTA Rate changes, Ludlow City, KY tax rate change
  • Loading branch information
Aidancs authored Mar 19, 2020
2 parents 3cc1916 + dbdbce6 commit c6778d3
Show file tree
Hide file tree
Showing 26 changed files with 1,374 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Countries/US/Indiana/CassIncome/V20200101/CassIncome.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Appleton\Taxes\Countries\US\Indiana\CassIncome\V20200101;

use Appleton\Taxes\Countries\US\Indiana\CassIncome\CassIncome as BaseCassIncome;

class CassIncome extends BaseCassIncome
{
public function getTaxRate(): float
{
return 0.027;
}
}
13 changes: 13 additions & 0 deletions src/Countries/US/Indiana/DecaturIncome/V20200101/DecaturIncome.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Appleton\Taxes\Countries\US\Indiana\DecaturIncome\V20200101;

use Appleton\Taxes\Countries\US\Indiana\DecaturIncome\DecaturIncome as BaseDecaturIncome;

class DecaturIncome extends BaseDecaturIncome
{
public function getTaxRate(): float
{
return 0.025;
}
}
13 changes: 13 additions & 0 deletions src/Countries/US/Indiana/FultonIncome/V20200101/FultonIncome.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Appleton\Taxes\Countries\US\Indiana\FultonIncome\V20200101;

use Appleton\Taxes\Countries\US\Indiana\FultonIncome\FultonIncome as BaseFultonIncome;

class FultonIncome extends BaseFultonIncome
{
public function getTaxRate(): float
{
return 0.0268;
}
}
13 changes: 13 additions & 0 deletions src/Countries/US/Indiana/GibsonIncome/V20200101/GibsonIncome.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Appleton\Taxes\Countries\US\Indiana\GibsonIncome\V20200101;

use Appleton\Taxes\Countries\US\Indiana\GibsonIncome\GibsonIncome as BaseGibsonIncome;

class GibsonIncome extends BaseGibsonIncome
{
public function getTaxRate(): float
{
return 0.009;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Appleton\Taxes\Countries\US\Indiana\HamiltonIncome\V20200101;

use Appleton\Taxes\Countries\US\Indiana\HamiltonIncome\HamiltonIncome as BaseHamiltonIncome;

class HamiltonIncome extends BaseHamiltonIncome
{
public function getTaxRate(): float
{
return 0.011;
}
}
13 changes: 13 additions & 0 deletions src/Countries/US/Indiana/HenryIncome/V20200101/HenryIncome.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Appleton\Taxes\Countries\US\Indiana\HenryIncome\V20200101;

use Appleton\Taxes\Countries\US\Indiana\HenryIncome\HenryIncome as BaseHenryIncome;

class HenryIncome extends BaseHenryIncome
{
public function getTaxRate(): float
{
return 0.017;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Appleton\Taxes\Countries\US\Indiana\JeffersonIncome\V20200101;

use Appleton\Taxes\Countries\US\Indiana\JeffersonIncome\JeffersonIncome as BaseJeffersonIncome;

class JeffersonIncome extends BaseJeffersonIncome
{
public function getTaxRate(): float
{
return 0.009;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Appleton\Taxes\Countries\US\Indiana\JenningsIncome\V20200101;

use Appleton\Taxes\Countries\US\Indiana\JenningsIncome\JenningsIncome as BaseJenningsIncome;

class JenningsIncome extends BaseJenningsIncome
{
public function getTaxRate(): float
{
return 0.025;
}
}
13 changes: 13 additions & 0 deletions src/Countries/US/Indiana/KnoxIncome/V20200101/KnoxIncome.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Appleton\Taxes\Countries\US\Indiana\KnoxIncome\V20200101;

use Appleton\Taxes\Countries\US\Indiana\KnoxIncome\KnoxIncome as BaseKnoxIncome;

class KnoxIncome extends BaseKnoxIncome
{
public function getTaxRate(): float
{
return 0.012;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Appleton\Taxes\Countries\US\Indiana\TippecanoeIncome\V20200101;

use Appleton\Taxes\Countries\US\Indiana\TippecanoeIncome\TippecanoeIncome as BaseTippecanoeIncome;

class TippecanoeIncome extends BaseTippecanoeIncome
{
public function getTaxRate(): float
{
return 0.0128;
}
}
10 changes: 10 additions & 0 deletions src/Countries/US/Kentucky/LudlowCity/V20200101/LudlowCity.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Appleton\Taxes\Countries\US\Kentucky\LudlowCity\V20200101;

use Appleton\Taxes\Countries\US\Kentucky\LudlowCity\LudlowCity as BaseLudlowCity;

class LudlowCity extends BaseLudlowCity
{
public const TAX_RATE = 0.02;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Appleton\Taxes\Countries\US\Minnesota\MinnesotaUnemployment\V20200101;

use Appleton\Taxes\Classes\WorkerTaxes\Payroll;
use Appleton\Taxes\Countries\US\Minnesota\MinnesotaUnemployment\MinnesotaUnemployment as BaseMinnesotaUnemployment;

class MinnesotaUnemployment extends BaseMinnesotaUnemployment
{
const FUTA_CREDIT = 0.054;
const NEW_EMPLOYER_RATE = 0.01;
const WAGE_BASE = 35000;

public function __construct(Payroll $payroll)
{
parent::__construct($payroll);
$this->tax_rate = config('taxes.rates.us.minnesota.unemployment', static::NEW_EMPLOYER_RATE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Appleton\Taxes\Countries\US\Utah\UtahUnemployment\V20200101;

use Appleton\Taxes\Classes\WorkerTaxes\Payroll;
use Appleton\Taxes\Countries\US\Utah\UtahUnemployment\UtahUnemployment as BaseUtahUnemployment;

class UtahUnemployment extends BaseUtahUnemployment
{
const FUTA_CREDIT = 0.054;
const NEW_EMPLOYER_RATE = 0.03;
const WAGE_BASE = 36600;


public function __construct(Payroll $payroll)
{
parent::__construct($payroll);
$this->tax_rate = config('taxes.rates.us.utah.unemployment', static::NEW_EMPLOYER_RATE);
}
}
104 changes: 104 additions & 0 deletions tests/Unit/Countries/US/Indiana/V20201001/CassIncomeTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?php

namespace Appleton\Taxes\Tests\Unit\Countries\US\Indiana\V20201001;

use Appleton\Taxes\Countries\US\Indiana\CassIncome\CassIncome;
use Appleton\Taxes\Models\Countries\US\Indiana\IndianaIncomeTaxInformation;
use Appleton\Taxes\Tests\Unit\Countries\TestParameters;
use Appleton\Taxes\Tests\Unit\Countries\TestParametersBuilder;
use Appleton\Taxes\Tests\Unit\Countries\TaxTestCase;

class CassIncomeTest extends TaxTestCase
{
private const DATE = '2020-01-01';
private const LOCATION = 'us.indiana';
private const TAX_CLASS = CassIncome::class;
private const TAX_INFO_CLASS = IndianaIncomeTaxInformation::class;

public function setUp(): void
{
parent::setUp();
$this->query_runner->addTax(self::TAX_CLASS);

IndianaIncomeTaxInformation::createForUser([
'personal_exemptions' => 0,
'dependent_exemptions' => 0,
'additional_withholding' => 0,
'additional_county_withholding' => 0,
'county_lived' => 0,
'county_worked' => 0,
'exempt' => false,
], $this->user);
}

/**
* @dataProvider provideTestData
*/
public function testTax(TestParameters $parameters): void
{
$this->validate($parameters);
}

public function testTax_taxes_taken_from_home_county(): void
{
$this->validateNoTax(
(new TestParametersBuilder())
->setDate(self::DATE)
->setHomeLocation(self::LOCATION)
->setTaxClass(self::TAX_CLASS)
->setTaxInfoClass(self::TAX_INFO_CLASS)
->setPayPeriods(52)
->setTaxInfoOptions([
'county_lived' => 2,
'county_worked' => 1,
])
->setWagesInCents(30000)
->build()
);
}

public function provideTestData(): array
{
$builder = new TestParametersBuilder();
$builder
->setDate(self::DATE)
->setHomeLocation(self::LOCATION)
->setTaxClass(self::TAX_CLASS)
->setTaxInfoClass(self::TAX_INFO_CLASS)
->setPayPeriods(52);

return [
'county lived' => [
$builder
->setTaxInfoOptions([
'county_lived' => 9,
'county_worked' => 2,
])
->setWagesInCents(30000)
->setExpectedAmountInCents(810)
->build()
],
'additional county withholding' => [
$builder
->setTaxInfoOptions([
'county_lived' => 9,
'county_worked' => 2,
'additional_county_withholding' => 20,
])
->setWagesInCents(30000)
->setExpectedAmountInCents(2810)
->build()
],
'county worked and taxes not taken from home county' => [
$builder
->setTaxInfoOptions([
'county_lived' => 0,
'county_worked' => 9,
])
->setWagesInCents(30000)
->setExpectedAmountInCents(810)
->build()
],
];
}
}
Loading

0 comments on commit c6778d3

Please sign in to comment.