diff --git a/src/Classes/BaseIncome.php b/src/Classes/BaseIncome.php index b26c959f9..082ada778 100755 --- a/src/Classes/BaseIncome.php +++ b/src/Classes/BaseIncome.php @@ -17,7 +17,7 @@ public function compute() { return 0.00; } - + $this->tax_total = $this->payroll->withholdTax($this->getTaxAmountFromTaxBrackets($this->getAdjustedEarnings(), $this->getTaxBrackets()) / $this->payroll->pay_periods) + $this->payroll->withholdTax($this->getSupplementalIncomeTax()) + $this->payroll->withholdTax($this->getAdditionalWithholding()); diff --git a/src/Countries/US/Arizona/ArizonaIncome/V20180101/ArizonaIncome.php b/src/Countries/US/Arizona/ArizonaIncome/V20180101/ArizonaIncome.php index aed7fdf8c..b4c341d04 100644 --- a/src/Countries/US/Arizona/ArizonaIncome/V20180101/ArizonaIncome.php +++ b/src/Countries/US/Arizona/ArizonaIncome/V20180101/ArizonaIncome.php @@ -34,6 +34,6 @@ public function getTaxAmountFromTaxBrackets($amount, $table) public function getAdjustedEarnings() { - return $this->payroll->earnings * $this->payroll->pay_periods; + return ($this->payroll->earnings * $this->payroll->pay_periods) - ($this->federal_income_tax * $this->payroll->pay_periods); } } diff --git a/src/Countries/US/Colorado/ColoradoIncome/V20180101/ColoradoIncome.php b/src/Countries/US/Colorado/ColoradoIncome/V20180101/ColoradoIncome.php index 0b517ef2e..fe3e5aac0 100644 --- a/src/Countries/US/Colorado/ColoradoIncome/V20180101/ColoradoIncome.php +++ b/src/Countries/US/Colorado/ColoradoIncome/V20180101/ColoradoIncome.php @@ -49,7 +49,7 @@ public function compute() public function getAdjustedEarnings() { - $adjusted_earnings = $this->getGrossEarnings() - $this->getExemptionAllowance(); + $adjusted_earnings = $this->getGrossEarnings() - ($this->federal_income_tax * $this->payroll->pay_periods) - $this->getExemptionAllowance(); return $adjusted_earnings; } diff --git a/src/Countries/US/Georgia/GeorgiaIncome/V20180101/GeorgiaIncome.php b/src/Countries/US/Georgia/GeorgiaIncome/V20180101/GeorgiaIncome.php index 91d7ee3e1..a9a8c2cc7 100644 --- a/src/Countries/US/Georgia/GeorgiaIncome/V20180101/GeorgiaIncome.php +++ b/src/Countries/US/Georgia/GeorgiaIncome/V20180101/GeorgiaIncome.php @@ -71,7 +71,7 @@ public function __construct(GeorgiaIncomeTaxInformation $tax_information, Federa public function getAdjustedEarnings() { - $adjusted_earnings = $this->getGrossEarnings(); + $adjusted_earnings = $this->getGrossEarnings() - ($this->federal_income_tax * $this->payroll->pay_periods); if ($this->tax_information->filing_status != static::FILING_ZERO) { $adjusted_earnings = $adjusted_earnings - $this->getStandardDeduction() - $this->getPersonalAllowance() - $this->getDependentExemption(); diff --git a/src/Countries/US/NewMexico/NewMexicoIncome/NewMexicoIncome.php b/src/Countries/US/NewMexico/NewMexicoIncome/NewMexicoIncome.php new file mode 100644 index 000000000..d7e6c3dc6 --- /dev/null +++ b/src/Countries/US/NewMexico/NewMexicoIncome/NewMexicoIncome.php @@ -0,0 +1,30 @@ + 'FILING_SINGLE', + self::FILING_WIDOW => 'FILING_WIDOW', + self::FILING_HEAD_OF_HOUSEHOLD => 'FILING_HEAD_OF_HOUSEHOLD', + self::FILING_MARRIED => 'FILING_MARRIED', + self::FILING_SEPERATE => 'FILING_SEPERATE', + ]; + + public function __construct(NewMexicoIncomeTaxInformation $tax_information, Payroll $payroll) + { + parent::__construct($payroll); + $this->tax_information = $tax_information; + } +} diff --git a/src/Countries/US/NewMexico/NewMexicoIncome/V20180101/NewMexicoIncome.php b/src/Countries/US/NewMexico/NewMexicoIncome/V20180101/NewMexicoIncome.php new file mode 100644 index 000000000..d9b3ebab2 --- /dev/null +++ b/src/Countries/US/NewMexico/NewMexicoIncome/V20180101/NewMexicoIncome.php @@ -0,0 +1,68 @@ +federal_income_tax = $federal_income->getAmount(); + $this->tax_information = $tax_information; + } + + public function getAdjustedEarnings() + { + return $this->getGrossEarnings() - ($this->federal_income_tax * $this->payroll->pay_periods) - $this->getAllowanceExemption(); + } + + public function getTaxBrackets() + { + if ($this->tax_information->filing_status === static::FILING_SINGLE || $this->tax_information->filing_status === static::FILING_HEAD_OF_HOUSEHOLD) { + return static::SINGLE_BRACKETS; + } else { + return static::MARRIED_BRACKETS; + } + } + + private function getAllowanceExemption() + { + return $this->tax_information->exemptions * self::EXEMPTION_ALLOWANCE_AMOUNT; + } + + private function getGrossEarnings() + { + return ($this->payroll->earnings - $this->payroll->supplemental_earnings) * $this->payroll->pay_periods; + } +} diff --git a/src/Countries/US/NewMexico/NewMexicoUnemployment/NewMexicoUnemployment.php b/src/Countries/US/NewMexico/NewMexicoUnemployment/NewMexicoUnemployment.php new file mode 100644 index 000000000..4fe33e54b --- /dev/null +++ b/src/Countries/US/NewMexico/NewMexicoUnemployment/NewMexicoUnemployment.php @@ -0,0 +1,11 @@ +tax_rate = config('taxes.rates.us.new_mexico.unemployment', static::NEW_EMPLOYER_RATE); + } +} diff --git a/src/Countries/US/NorthCarolina/NorthCarolinaIncome/V20180101/NorthCarolinaIncome.php b/src/Countries/US/NorthCarolina/NorthCarolinaIncome/V20180101/NorthCarolinaIncome.php index 74d8dcd55..a840376bd 100644 --- a/src/Countries/US/NorthCarolina/NorthCarolinaIncome/V20180101/NorthCarolinaIncome.php +++ b/src/Countries/US/NorthCarolina/NorthCarolinaIncome/V20180101/NorthCarolinaIncome.php @@ -64,11 +64,7 @@ public function __construct(NorthCarolinaIncomeTaxInformation $tax_information, public function getAdjustedEarnings() { - $adjusted_earnings = $this->getGrossEarnings(); - - $adjusted_earnings = $adjusted_earnings - $this->getStandardDeduction() - $this->getDependentExemption(); - - return $adjusted_earnings; + return $this->getGrossEarnings() - ($this->federal_income_tax * $this->payroll->pay_periods) - $this->getStandardDeduction() - $this->getDependentExemption(); } public function getSupplementalIncomeTax() diff --git a/src/Countries/US/Wisconsin/WisconsinIncome/V20180101/WisconsinIncome.php b/src/Countries/US/Wisconsin/WisconsinIncome/V20180101/WisconsinIncome.php index 2f4930f45..508eb4d7d 100644 --- a/src/Countries/US/Wisconsin/WisconsinIncome/V20180101/WisconsinIncome.php +++ b/src/Countries/US/Wisconsin/WisconsinIncome/V20180101/WisconsinIncome.php @@ -48,7 +48,7 @@ public function __construct(WisconsinIncomeTaxInformation $tax_information, Fede public function getAdjustedEarnings() { // For Wisconsin, standard deduction is built into the tables. - return $this->getGrossEarnings() - ($this->tax_information->exemptions * self::EXEMPTION_AMOUNT); + return $this->getGrossEarnings() - ($this->federal_income_tax * $this->payroll->pay_periods) - ($this->tax_information->exemptions * self::EXEMPTION_AMOUNT); } public function getTaxBrackets() diff --git a/src/Models/Countries/US/NewMexico/NewMexicoIncomeTaxInformation.php b/src/Models/Countries/US/NewMexico/NewMexicoIncomeTaxInformation.php new file mode 100644 index 000000000..9744bf9e5 --- /dev/null +++ b/src/Models/Countries/US/NewMexico/NewMexicoIncomeTaxInformation.php @@ -0,0 +1,36 @@ +additional_withholding = 0; + $tax_information->exemptions = 0; + $tax_information->filing_status = NewMexicoIncome::FILING_SINGLE; + $tax_information->exempt = false; + return $tax_information; + } + + public function getAdditionalWithholding($value) + { + return $value * 100; + } + + public function setAdditionalWithholding($value) + { + $this->attributes['additional_withholding'] = round($value / 100); + } + + public static function getTax() + { + return NewMexicoIncome::class; + } +} diff --git a/src/Providers/TaxInformationServiceProvider.php b/src/Providers/TaxInformationServiceProvider.php index c6d06210a..8b363e023 100755 --- a/src/Providers/TaxInformationServiceProvider.php +++ b/src/Providers/TaxInformationServiceProvider.php @@ -15,6 +15,7 @@ class TaxInformationServiceProvider extends ServiceProvider \Appleton\Taxes\Models\Countries\US\Arizona\ArizonaIncomeTaxInformation::class, \Appleton\Taxes\Models\Countries\US\Colorado\ColoradoIncomeTaxInformation::class, \Appleton\Taxes\Models\Countries\US\Georgia\GeorgiaIncomeTaxInformation::class, + \Appleton\Taxes\Models\Countries\US\NewMexico\NewMexicoIncomeTaxInformation::class, \Appleton\Taxes\Models\Countries\US\NorthCarolina\NorthCarolinaIncomeTaxInformation::class, \Appleton\Taxes\Models\Countries\US\Wisconsin\WisconsinIncomeTaxInformation::class, ]; diff --git a/src/Providers/TaxServiceProvider.php b/src/Providers/TaxServiceProvider.php index c29ce8387..f633709e9 100755 --- a/src/Providers/TaxServiceProvider.php +++ b/src/Providers/TaxServiceProvider.php @@ -58,6 +58,8 @@ class TaxServiceProvider extends ServiceProvider \Appleton\Taxes\Countries\US\Georgia\GeorgiaUnemployment\GeorgiaUnemployment::class, \Appleton\Taxes\Countries\US\Florida\FloridaUnemployment\FloridaUnemployment::class, \Appleton\Taxes\Countries\US\Texas\TexasUnemployment\TexasUnemployment::class, + \Appleton\Taxes\Countries\US\NewMexico\NewMexicoIncome\NewMexicoIncome::class, + \Appleton\Taxes\Countries\US\NewMexico\NewMexicoUnemployment\NewMexicoUnemployment::class, \Appleton\Taxes\Countries\US\NorthCarolina\NorthCarolinaIncome\NorthCarolinaIncome::class, \Appleton\Taxes\Countries\US\NorthCarolina\NorthCarolinaUnemployment\NorthCarolinaUnemployment::class, \Appleton\Taxes\Countries\US\Wisconsin\WisconsinIncome\WisconsinIncome::class, diff --git a/src/config/config.php b/src/config/config.php index 66c71f8bd..a09d60d82 100755 --- a/src/config/config.php +++ b/src/config/config.php @@ -52,8 +52,16 @@ ], + 'new_mexico' => [ + + 'new_mexico_income_tax_information' => env('TAXES_NEW_MEXICO_INCOME_TAX_INFORMATION', 'new_mexico_income_tax_information'), + + ], + 'north_carolina' => [ + 'north_carolina_income_tax_information' => env('TAXES_NORTH_CAROLINA_INCOME_TAX_INFORMATION', 'north_carolina_income_tax_information'), + ], 'wisconsin' => [ @@ -96,6 +104,12 @@ ], + 'new_mexico' => [ + + 'unemployment' => env('TAXES_NEW_MEXICO_UNEMPLOYMENT_TAX_RATE', 0.01), + + ], + 'north_carolina' => [ 'unemployment' => env('TAXES_NORTH_CAROLINA_UNEMPLOYMENT_TAX_RATE', 0.01), diff --git a/src/migrations/2018_01_01_000016_create_new_mexico_income_tax_information_table.php b/src/migrations/2018_01_01_000016_create_new_mexico_income_tax_information_table.php new file mode 100644 index 000000000..541da3ce3 --- /dev/null +++ b/src/migrations/2018_01_01_000016_create_new_mexico_income_tax_information_table.php @@ -0,0 +1,63 @@ +new_mexico_income_tax_information, function (Blueprint $table) { + $table->increments('id'); + $table->integer('additional_withholding'); + $table->integer('exemptions'); + $table->integer('filing_status'); + $table->boolean('exempt')->default(false); + }); + + $id = DB::table($this->governmental_unit_areas)->insertGetId([ + 'name' => 'New Mexico', + 'area' => '0106000020E610000001000000010300000001000000C30200001A89D00836435BC0FDF2C98AE17A3F40CFBBB1A030435BC087DC0C37E07F3F409A7ADD2230435BC0B06F2711E17F3F405A9942B22B435BC0573529A9718D3F40D575A8A624435BC0F2B22616F8A23F401C08C90226435BC099982EC4EACB3F404F90D8EE1E435BC0B66114048FCF3F40E55CD9171F435BC02FE8898ACCCF3F401FDB943424435BC03950A94B78D73F4064027E8D24435BC00725CCB4FDD73F40C00303081F435BC09354A69883DC3F4088995B211C435BC07B7A3C7CE5DE3F40693A3B191C435BC0B0A6B228ECDE3F40645166261C435BC092C3492DAEEB3F4016E4F93E1C435BC07D992DD3BE01404092E7FA3E1C435BC06247E350BF0140404AD3A0681E435BC07B4CA4349B03404031FDC77E17435BC0CA9446A68C0A4040C4211B4817435BC04869368FC30A4040B3B6291E17435BC0D0CE6916680B4040CD2E37130C435BC0ABADFE77933640406BB933130C435BC01F62838593364040AC2F04A80C435BC02E4ACE74D25240409A232BBF0C435BC03197546D375740409A232BBF0C435BC04FAE2990D957404059349D9D0C435BC0F450DB8651584040000341800C435BC0AE62F19BC25840407B8505F703435BC0E42CEC6987634040A6B531F803435BC0C4A401C18E634040CF16A00205435BC0B9257387126A40404F36120808435BC03F885A0EFC7C4040B4CD8DE909435BC037328FFCC188404037C64E7809435BC0CD3AE3FBE28840403541D47D00435BC0893E1F65C48B4040285FD04202435BC0081F4AB4E48B404093983ED002435BC0C9CD6DFEBE8D40407B8505F703435BC09E2287889B91404093C7D3F203435BC07901F6D1A99140400873D6ED05435BC0B0898612BD9A4040508A56EE05435BC01B81785DBF9A40406E083DD908435BC09731679BC49E4040A2629CBF09435BC046787B1002A040407864AC36FF425BC07F129F3BC1AE4040D6389B8E00435BC009336DFFCAAE40402E1C08C902435BC08F88299144AF4040774A07EBFF425BC09E5C5320B3AF4040F14A92E7FA425BC0D50451F701B04040A3CA30EE06435BC077BAF3C473B44040D2FD9C82FC425BC0C3995FCD01D04040E04A766C04435BC0425BCEA5B8DE4040402F0B1701435BC03A9C83E69CE34040C8EBC1A4F8425BC0522635B401F04040E33F8B26FB425BC08328DE473AF44040F4EFF9DAFE425BC08987622877FA4040CF2D742502435BC0B22E6EA30100414054F8671E00435BC0DDB7EF2F0C0A4140D30029E4FF425BC003167FA52C0B4140C1B558F2FD425BC0E08DFE08CE144140DB5636D5FD425BC0E54013525E1541401B6D1223F8425BC0657C98A993314140E35F2DC9F5425BC05A597981383D41407DEA58A5F4425BC0655419C6DD4241407DEA58A5F4425BC09DB64604E3424140E8A04B38F4425BC0FEEE1D35264A41405610D484F3425BC042A3F86B265941406CB3B112F3425BC0AB58FCA6B0624140B35C363AE7425BC0850A0E2F88644140BF0D315EF3425BC0EF3504C7656641406AFAEC80EB425BC0C5C6BC8E38684140B950F9D7F2425BC0EC4960730E6A4140564B8E08F2425BC07CF3031BD06D414065080CAFF1425BC02815B0186F6F41408560B1C1F0425BC08289548BBB7341404A5F0839EF425BC0F6B0170AD87A414084FE5E39EF425BC085B24655DB7A414032C172F2F1425BC024E7CFAF5C9541405CAB740FF2425BC04CE8B50B77964140318B9540F2425BC07DEE13435598414087F87177F2425BC05B689F476B9A4140EEF83C92F2425BC0A7942E15709B4140DCE2EBA3F2425BC0CEB630361C9C41405A2774D6F2425BC0ADF4E417089E4140F5855206F3425BC035F4010CDA9F41409C374E0AF3425BC05917B7D100A04140C8AEF56DF4425BC0DC266010BCA141403E305DDAF5425BC0FF53C13682A34140FD1ADA62F7425BC02EDC275D6BA54140DA4C9EE3F8425BC014AA01E44AA74140693CB3EDF9425BC0C132CD8096A84140B8391AF2FA425BC06B1B9209DBA941404D8DA04DFB425BC0C917531A4DAA4140EA43F0E7FB425BC092FA056B0DAB414085824CDCFD425BC0F0E2DC017DAD414051289780FE425BC08DC6B9C249AE4140A1B8A599FE425BC0B00A12FD68AE41405BF14FA4FE425BC0EA04B14776AE4140BA3F30ADFE425BC0F10C9F5781AE41405A65A6B4FE425BC08F5033A48AAE414010EB7841FE425BC03620E69894B04140BC217041FE425BC05070B7C094B0414015FC887CFD425BC064D01A1111B44140B35E7302FD425BC054468C523AB64140536923DEFC425BC044F078E1DEB641400029999EFC425BC0D713FED3FEB741402E1B673EFC425BC03BB203C3B2B94140519A26D2FB425BC096360B559DBB4140F3FF936EFB425BC0FE36FB9160BD4140A768C404FB425BC06926111440BF4140ECA4A09DFA425BC02C87387B13C14140CDD670D3F9425BC0E8D282BDA7C44140AAB8718BF9425BC02D7AA702EEC541400F7EE200FA425BC0F59CF4BEF1C54140F944FAADF9425BC0E2AFD3F3BFC6414030E48CAAF9425BC0C5AC0A7AC8C64140ED88694FF9425BC085A9C527ABC74140FC7765E9F8425BC0E00DA2E3A8C84140EDCF9130F8425BC0C8C2189774CA4140F9D02771F7425BC094B2D2AC50CC4140932881BBF6425BC0E1F8327A14CE4140E17B7F83F6425BC08444DAC69FCE4140F9BD4D7FF6425BC0CA367007EACE4140A49B381CF6425BC0FD719911DAD14140A96A5FC5F5425BC014A836406DD441400FFC00C1F5425BC0476D25698ED44140907B0EBAF5425BC03B080724C3D441409815E9ABF5425BC0C4A48E822ED54140FC4FA72BF5425BC00884E9FBFBD84140CEB8C6EEF4425BC0329E6F0BCADA41408EDCADEEF4425BC06AE71FC8CADA41409F535BAAF4425BC0C477D559D1DC4140FF0B9A22F4425BC0C2314EBCD7E041406C442DC8F3425BC0C1DA431086E3414087C08B4CF3425BC0857E126D30E74140ED98510AF3425BC009A5A11727E9414033D11DEBF2425BC0F86E21EB13EA4140E8DF4FE3F2425BC03B7493274FEA414031B5A50EF2425BC0AA8251499DF0414072DDED71F2425BC07BC2D57E7CF141404EB4AB90F2425BC05B22179CC1F14140EB473090F2425BC0B176127F4DF24140A43E588EF2425BC022C9DF7F64F441400A4CCC8CF2425BC090CF7E4325F6414066F6798CF2425BC058569A9482F6414066101FD8F1425BC0A5BF97C283F6414004629375F1425BC02493977D90FC414022758875F1425BC0FC2B4B2991FC4140F0DFBC38F1425BC0DFC4909C4C004240C1F47E35F1425BC0DB9D308458004240A4DE5339ED425BC0AF5B04C6FA0E424043A5AAF9EF425BC02F73803D0B124240E7C544FBEF425BC0324549060D1242402B06050CF0425BC08EA861AE1F12424065A88AA9F4425BC0F581E49D431742408F365201F2425BC061A9069F0C2042400C2B70BEF1425BC0B2616DC1E9204240F72832ACF1425BC0A213D11126214240AA821A5FF1425BC0EB358CF52422424022D1A1DAF0425BC0B8F4A7F2DA234240C1D15CDAF0425BC0AE77C8D6DB234240E0540DA8EF425BC08A26EC96D0274240AFF905A8EF425BC02F693EAFD0274240400BBF81EF425BC05269533D4F284240F401DFF6EE425BC0900194661A2A4240072B55A2ED425BC082539251802E4240C4E9648CED425BC0CC2B86DAC82E4240D0850B51EB425BC093F3F0E52936424056CB17ACE9425BC05206CCAF993B42406E1DA961E9425BC0C3EE0AC88F3C424016FBFC5FE9425BC092F5934F953C42405FCE6C57E8425BC0D07B63080040424009AE0958E8425BC0A1888EAF804342408BA0735DE8425BC07311046D7262424028888E5DE8425BC035C8C0340C63424027078F5DE8425BC0A010500B0F6342408F849C5EE8425BC06AC1DB6113694240B5BE6A5FE8425BC07561D120AE6D424079436B5FE8425BC01F323A18B16D4240D98CA35FE8425BC09C3395CFF26E42404E78BB5FE8425BC0259334887B6F4240304AD05FE8425BC07E384888F26F42409B00C3F2E7425BC05F0839EFFF6F4240C6EA46F1E7425BC0CEBF050008704240D05DE266E7425BC0221E65D0F772424067EDA4F9E5425BC081B5B6F7B77A42402BDB87BCE5425BC07B8505F7037C4240C6151747E5425BC0766A2E37187C4240BA8102EFE4425BC07AFA08FCE17F42403E3168B853405BC09C3EB661DF7F4240EA4FDFC54D405BC0FC9AAE5BDF7F4240944BE3175E3D5BC04E469561DC7F4240FBCA83F4143D5BC09BE3DC26DC7F424029B0312A58295BC0D96518ADE77F4240861A8524B3275BC0B228ECA2E87F4240382C0DFCA8275BC0C5C72764E77F424035F44A9454225BC0E59503C6E97F4240ED438B7F46185BC0C3119244EE7F4240FC885FB186145BC0320395F1EF7F4240E7E26F7B82145BC03EB14E95EF7F4240A70A462575125BC055D97745F07F4240DE1B430070125BC0D2C6116BF17F4240E90E62670A105BC0B4AD669DF17F4240373C7C5BFD0F5BC04B625B75E67F4240BEBF417BF50F5BC0529B38B9DF7F4240EFCCD773F20B5BC0EC42ADDDE77F42409647551508035BC013DBF7F5F97F4240D449C1026C025BC0FD93BB32FB7F42400C3E743724025BC08B2A72C4FB7F424007280D350A005BC0D07B630800804240B9F582909FF75AC0D62200100080424020A68FEA74F75AC000B52610008042409BDDC9CA70F75AC0D16F2A10008042407760BFF6F4F15AC01A0E2015008042403B4D051214F15AC0B072EB15008042408731050998ED5AC0B533121900804240D785C6196FE65AC011E78B1F00804240B82BED5F92E05AC09127D9240080424079B80E1B1FE05AC04D6741250080424036296CC7D4DE5AC06A266C2600804240EA5A3577A1DE5AC0BF8E9A2600804240D7CF4FA04FDC5AC0D79FB3280080424011D66E62F0DA5AC05049F12900804240855D143DF0DA5AC0126BF12900804240B0FF11274BDA5AC08A1EC73E0080424068636A745CD55AC04B2723DE00804240C5866B3251D05AC075EB1981018042401AD886A99FCC5AC047D96EF801804240D4B257A912BF5AC09A7F3DAE03804240860FC5682FBD5AC0EBB63AEB03804240B742588D25B85AC0213A048E04804240438CD7BCAAB75AC09DD9AED0077F424007F2F1490AB25AC0A08039A9087F4240016BD5AE09B05AC019C748F6087F4240C2EDE86E4AAD5AC0E682EE61157F4240F294D5743DAB5AC0E4F38AA71E7F4240F9D9C87553AA5AC08FFD2C96227F42409F3A56293DA85AC0D2544FE61F7F4240292499D53BA85AC0371AC05B207F4240D122DBF97EA75AC00A664CC11A7F4240A75B76887FA75AC0ED80EB8A197F424031EF71A609A05AC0D9E731CA337F4240292BDB8900A05AC07D41E2D7337F424048683B4A7B9E5AC0E439AB20367F4240CC5A6DF76E9E5AC0BED32E33367F424061E909175F9A5AC0CF4B6F4D3C7F4240DBBE47FDF5955AC0DE59BBED427F4240A1664815C5925AC025E99AC9377F42404D158C4AEA8F5AC0126745D4447F424090831266DA8F5AC02AC3B81B447F42401A8A3BDEE48C5AC0F71DC3633F7F424090DFB49366865AC02B5A6D39547F4240AB4203B16C805AC0B9A64066677F42401DB2E27D67805AC02251C17B677F42403FABCC94D67F5AC0F37002D3697F42406EA7AD11C17F5AC0C4EC65DB697F4240CB653A68FB6D5AC042350DE1777F42403B41444CFB6D5AC0024523E1777F424013622EA9DA6D5AC08D60E3FA777F4240D13FC1C58A6A5AC0E6779ACC787F4240274EEE7728685AC03028D368727F4240CAC23E4711635AC09AB0CCDE777F42405B272EC72B625AC0B6F3FDD4787F4240E78B42C46D615AC029113F18777F424032ACE28DCC605AC0F38DE89E757F4240C2C1DEC490605AC0FD9FC37C797F4240062CB98AC55D5AC01F0E12A27C7F42403D7E6FD39F5C5AC048A12C7C7D7F424089B48D3F515C5AC090813CBB7C7F42407AD855CEDB5A5AC0FBE56747787F4240B0389CF9D55A5AC03FC39B35787F42406667D13B15505AC0F65D11FC6F7F4240A304FD851E4E5AC01B7FA2B2617F4240CEB852C71C4E5AC08CEBF3B4617F4240CC8C6B36EC495AC0C905ED45677F42404D28938EBB485AC08B36AEDA687F4240D656EC2FBB475AC0E7C2482F6A7F424029081EDFDE415AC038656EBE117F424072F8A41309405AC0A6255646237F424049A4BEF457305AC01F20FFDB297F4240D72FD80DDB2E5AC0B48CD47B2A7F4240202A8D98D92E5AC097A77345297F42409DC7AAA12B2D5AC0DF4FDC96287F42402EFEB62748295AC06F48A302277F4240E474032069285AC0BBABDE112C7F4240494BE5ED08285AC04D2B85402E7F424051A1BAB9F8275AC08272DBBE477F4240054EB6813B215AC039F06AB9337F4240F6D19F7D3A215AC0E671C0B8337F42401E8B299DBF1E5AC0A75F9318327F42408C54839DB91E5AC08FB8A414327F4240B0BF78ADFB1D5AC0BD902298317F42402590D871C61B5AC0BDB29C25307F424069FC959A72175AC0A9BE654F2D7F42408E739B70AF155AC03737A6272C7F42401F9E25C808105AC0D1949D7E507F4240FE3E9265DD0E5AC0A3AB116E547F4240900A43F6C20D5AC095CC7B24587F42400C0742B280005AC0F7FF71C2847F4240551062A480005AC08DCEA0C2847F424006D7DCD1FFEE59C09888B7CEBF7F4240F838D384EDEE59C03F7100FDBE7F42408F1D205432DE59C0F54292DEDF7F4240D400F0663EDB59C03F4529ACE57F4240DBE1ECE01EDA59C0690038E1E77F424086AE44A0FAC959C0D234289A07804240482B03B282C559C03A7278B2058042405F45460724C059C0A54C6A6803804240E7E099D024C059C0B83A00E2AE7442403DF19C2D20C059C08D2958E36C7442407337841F23C059C00128FAD6BA6142407687140324C059C0006E162F165C4240AFE9414129C059C0C85BAE7E6C564240709692E524C059C065DF15C1FF4E4240651C23D923C059C0526342CC254D424050C763062AC059C0A73B4F3C674342408099EFE027C059C01D0247020D404240B83A00E2AEC259C04C5299620E4042407A9AA5E1AEC259C091840A920B404240617138F3ABC259C0B1321AF9BC284240FCC56CC9AAC259C01CAF40F4A4284240D5B85B16A6C259C013675B83501D4240153944DC9CC259C0D95C35CF11074240520ABABDA4C259C01807978E39EB41405796E82CB3C259C0368DEDB5A0E9414013EE9579ABC259C06E4BE48233E841405F09A4C4AEC259C0C61858C7F1E541401E17D522A2C259C0E7887C9752E541404E8E9932A4C259C08E6E04BCA5DE4140C0EFAEB0A7C259C06E526FC856D34140F61D1AD2A8C259C010B6BAACADCF414027C11BD2A8C259C0B3976DA7ADCF41407D9AB9F4B0C259C046784A1287B24140EC095AF5B0C259C0035A68D384B24140971DE21FB6C259C09415C3D501A0414088855AD3BCC259C0E6CAA0DAE09E4140664B5645B8C259C0F0A1444B1E9B4140149F244EB6C259C065F8C2A7719741409146054EB6C259C0C6A52A6D71974140971DE21FB6C259C055151A88659741401A16A3AEB5C259C02236583849974140E4A08499B6C259C06C79E57ADB964140CBF6216FB9C259C002D53F88649441407C0BEBC6BBC259C014CB2DAD86924140D1B359F5B9C259C0897D022846924140425BCEA5B8C259C0F5BBB0355B9141404E0CC9C9C4C259C0340D8AE601904140E8DB82A5BAC259C0DF3312A1118E4140D33C563FBAC259C06E30AAD6A5884140DC68132BBAC259C0572F28A492874140B2AAB62DB9C259C0D96AEE53217A41402A1900AAB8C259C0B29FC55224734140F9F884ECBCC259C093533BC3D46C414056F05ED5BCC259C0326516E31A694140FFCF61BEBCC259C09B8D959867654140161230BABCC259C026A77686A95F4140B11875ADBDC259C0DCBB067DE9554140FA97A432C5C259C070067FBF98534140AE04DE0EC5C259C0F564E23B6D534140EBC0CC0EC5C259C0DAACE2266D53414059E154EBC4C259C0208FFF0242534140E4D70FB1C1C259C022533E04554F41404A0CD5D8C6C259C0CE26817E3543414051137D3ECAC259C06C956071383B4140C85D8429CAC259C08AC6DADFD93A4140E09F5225CAC259C0639B5434D63A41406F2C280CCAC259C0C398F4F7523A4140CABC1AF1C9C259C015727ADE61394140FDDA9585C9C259C09495D6A0A335414087889B53C9C259C0785E2A36E633414057EA5910CAC259C0041DAD6A49334140D8BE8282CAC259C00E018B9BD7324140BCAFCA85CAC259C0FE092E56D43241402766BD18CAC259C0BAF42F496532414007911471CAC259C02F7A2196143241406D90C28BCAC259C03DC8E536FC3141408C2B2E8ECAC259C00F7EE200FA3141408C2B2E8ECAC259C02CD2C43BC031414075E95F92CAC259C0A67C08AA46314140F7C77BD5CAC259C0938C9C853D3141401B84B9DDCBC259C088BB7A15193141404E52563ACDC259C0BC3D0801F9304140132BA391CFC259C0F64201DBC1304140BFB67EFACFC259C0B8CCE9B2983041409032E202D0C259C042041C429530414074F90409D0C259C026E78F3C343041408F179209D0C259C0DB252D852B304140D6C62829D0C259C010506608382E41407DAD4B8DD0C259C0DEAE97A6082841409C04088DD0C259C080E7762908284140668A0EDACFC259C093196F2BBD2641407EC7F0D8CFC259C04DA1F31ABB264140AFCDC64ACCC259C08E8F16670C254140AA2A3410CBC259C0459F8F32E220414029D112C1CAC259C036A8A789711B41409A400570CAC259C0DA6AF409DF15414067A4F703CAC259C065EE2559710E4140A587A1D5C9C259C00264E8D8410B4140933655F7C8C259C00EF27A30290A4140C8C35131C9C259C09664FBBDFD094140C1525DC0CBC259C06D8C9DF0120841405C59A2B3CCC259C001A1F5F06506414038691A14CDC259C0C173EFE19205414080492A53CCC259C0BDFBE3BD6A054140D960E124CDC259C047C5FF1D510541402CD505BCCCC259C0232BBF0CC6044140F224E99AC9C259C0880FECF82F0441402E573F36C9C259C0616F62484E0241405462B3E1C9C259C010E9394B6E0141402D23F59ECAC259C0DB17D00B77004140302AA913D0C259C0D95DA0A4C0FC404070B4E386DFC259C054C554FA09F9404087DF4DB7ECC259C0E1B20A9B01F440408DD0CFD4EBC259C025917D9065F3404006BD378600C359C0F8E461A1D6EC40402C6684B707C359C0166A4DF38EE94040CF6999B707C359C01964F2EB8EE94040CB8C1B1412C359C0D2C50A7CEEE5404053978C6324C359C032FE7DC685DF4040AE6708C72CC359C0E50CC51D6FDE40401612E27C32C359C0135053127ADB40406EFDF49F35C359C0C6DE8B2FDAD94040B2D991EA3BC359C0CDC8207711D640400C90680245C359C0B05758703FD440405CE674594CC359C090BC732843D340405D4E098849C359C067D5E76A2BD240405B9885764EC359C08B18761893D04040535C55F65DC359C0AE10566309C940407A2297F85DC359C09D910F9808C94040EA094B3CA0C359C007431D56B8B14040C843923DA0C359C07B6EF2A0B7B140407D3CF4DDADC359C060E4654D2CAA404027F8A6E9B3C359C02B4B749659A840402D23F59ECAC359C0D5E940D653A14040B2BAD573D2C359C0919A7631CDA040400ED940BAD8C359C099BB96900F9C4040359C6F12EAC359C0E6EC0917BF95404039FA9445F4C359C09956A17C089240409D56D66A06C459C0D079A75A6D8B4040F80B1D860EC459C00ABF67D6798840404243FF0417C459C00FD1E80E6285404047E6913F18C459C0C4CA68E4F384404020F07A8C18C459C087AA1FBCCF8440405B0A48FB1FC459C0E8BCC62E518140404260E5D022C459C0CC26C0B0FC7F40403B6F63B323C459C09D121093707B4040971E275723C459C0FD0283C3C37A4040471D1D5723C459C08A58C4B0C37A404078D503E621C459C098F8A3A833734040DA5786E921C459C0DFF1045E2F7340402FC1A90F24C459C07B4963B48E7040403430F2B226C459C063CE33F6256F4040526342CC25C459C07BF486FBC86D40402D3F709527C459C0A01518B2BA6D4040B037312427C459C019C8B3CBB76C4040E23D079623C459C0CADB114E0B6A40405F45460724C459C08DB62A89EC694040AE60480724C459C04984464EEC694040EAA7772924C459C0D89450B130664040412C9B3924C459C0D4D51D8B6D6440407687140324C459C0448A01124D644040526342CC25C459C0950A2AAA7E634040EB0FE40726C459C0E5965643E25E40401081981F26C459C067DBFC060D5D40403A899C1F26C459C0EB012EB70C5D40407539252026C459C0CF2D7425025D4040950346CC25C459C06A0D87755E5B40401074B4AA25C459C08B6F287CB65A404028B682A625C459C0172D40DB6A58404004AC55BB26C459C033DB15FA60574040834F73F222C459C07BBDFBE3BD5240409352D0ED25C459C02B1213D4F04F40409A43520B25C459C013D6C6D8094D4040164B917C25C459C0EACE13CFD94C40409A43520B25C459C04FCDE506434B4040A73981A024C459C0BA785161F6474040A60BB1FA23C459C09E996038D74240403272DEF923C459C03552745FCE424040900449BF21C459C08F803AF2D52A40405C2A9EFC20C459C09F26F55DA822404025C9737D1FC459C0A4DC7D8E8F12404008E412471EC459C09888B7CEBF0F404068EC4B361EC459C0C30AB77C240B40400E87A5811FC459C098874CF910004040B9E00CFE7EC559C075E5B33C0F0040401E4E603AADC559C0B1170AD80E0040402460E77891CA59C0AA9B14071000404050ABE80FCDCD59C0861C5BCF10004040259529E620D159C099BB96900F0040402A38BC2022D159C0B3B3E89D0A0040403D997FF44DD159C054ABAFAE0A004040F38FBE49D3D159C005A6D3BA0D0040401F477364E5D459C023F3C81F0C004040EE2EEDB243EE59C00E26F2D3060040409D82FC6CE4EF59C026C3F17C06004040B51B7DCC07F859C0E5F0492712004040764EB340BBFE59C0BC749318040040402C4487C091015AC023D6E253000040404E1E15CA18155AC0A3D4CE6F02004040EA5C514A08225AC0399677D50300404012A27C410B225AC01E6ADB300A004040BC5AEECC04295AC04D86E3F90C0040400B08AD872F295AC08D4127840E004040B5E0455F41365AC03C369DCE0F0040404835ECF7C43A5AC0B0E3BF4010004040E774445CC63A5AC0F0431F411000404068925852EE445AC03E0801F912004040551344DD07455AC0CDC8207711004040ABE7A4F78D475AC0BC9179E40F004040959C137B68485AC07A6EA12B110040405E471CB281485AC098874CF91000404061FD9FC37C495AC0BC9179E40F004040C190D5AD9E495AC0805F234910004040EF71A609DB495AC0805F2349100040403AC9B665BF555AC045CD6B1E130040404F1F813FFC585AC00793E2E313004040873254C5545B5AC04291EEE714004040E06932E36D5B5AC055302AA913004040D4F20357795B5AC09D103AE812004040EF97D7EC495E5AC0642DAD9D1700404061E28FA2CE6E5AC0EC6CC83F33004040F6F065A208705AC070ED44494800404080F277EFA8765AC0A3923A014D00404097033DD4B6785AC05CC98E8D40004040C5B12E6EA3795AC02AA913D044004040D593F947DF7F5AC0BBEEAD484C0040402317D557DF7F5AC0C3FBBA484C004040CCDFEA963A835AC05852E70B4F0040407121C01862865AC0719C7EA4510040404F22C2BF08885AC09414580053004040B2463D44A38B5AC0787AA52C43004040BE73E0FCD78C5AC000AD917F3A004040C1559E40D88C5AC0CA4FAA7D3A00404060B01BB62D8D5AC01230BABC39004040F12952A448915AC04CDB20D834004040E7A6CD380D945AC09946938B31004040D2D73414B2945AC0A17004C82F004040D568BBB8B3945AC04D9584C32F00404035D9E693DE945AC06F95214E2F0040400312D5BEF3945AC0F4A726142F004040D388997D1E985AC0E0D5726726004040ED71D4B623985AC0E07A4D972600404035B8AD2D3C995AC0CFBBB1A0300040402897337A2C9A5AC058D0AD542C00404062D1586A329A5AC0090D7F392C004040014D840D4F9A5AC0BA2F67B62B004040B9C4F41E699C5AC08CE11A892700404097CF02549E9D5AC04FC29E222500404032E94B81239E5AC0A478F51924004040C0F6849EF1A05AC0315EDB861E0040404F01AB8917A15AC0C66F803B1E0040406DC1C853FBA35AC0F110537D18004040799C500C1CA45AC0CB754C3C1800404025E659492BA45AC005F7031E1800404018EDF1423AA45AC0BD16F4DE180040400D96E2A441A55AC0F6166CA118004040C9572DF549A55AC03AE17A9F180040405186AA984AA55AC07DAF549F18004040ADBD4F55A1A55AC09A40118B1800404060F01D8AE1A55AC04537940C19004040B14E95EF19A65AC03447567E19004040D1AE42CA4FA65AC00BE02AB6180040400DC7F31950A65AC0ACAB02B51800404086CABF9657A65AC0F48B12F417004040F1AA2327D9A65AC05539ACCC140040402BC24D4695A75AC0E0675C3810004040D4C1136595A75AC0A135B8C70E004040A6643909A5A75AC0814067D2A6FE3F4042B5C189E8A75AC0635E471CB2FD3F4019DDD24E1FA85AC0F95ECFDE8FFD3F4057EBEF0348A85AC0FC3BE76B76FD3F4052B9BBA14DA85AC0D86D0BE972FD3F40BAF42F4965A85AC05549641F64FD3F409A0AF148BCA85AC0BB0B941458FC3F40FDF50A0BEEA85AC0F2B22616F8FA3F40F7B0170AD8A85AC0271422E010FA3F401DB0ABC953A85AC076FA415DA4F83F409483D90418A85AC0E28DCC237FF83F4003965CC5E2A75AC08CF337A110F93F40FC5069C4CCA75AC0FC32182312F93F406327BC04A7A75AC05983F755B9F83F4011E4A08499A75AC024B4E55C8AF73F40D04543C6A3A75AC0D8EE1EA0FBF63F4008ABB184B5A75AC048DE3994A1F63F403BFBCA83F4A75AC0A2B08BA207F63F40728BCDDB07A85AC05DA0CBA527F53F4037E0F3C308A85AC074B4AA251DF53F408E3EE60302A85AC0A704C4245CF43F40F4143944DCA75AC019A721AAF0F33F40909E228788A75AC0E0B6B6F0BCF43F404AB20E4757A75AC0DCF97E6ABCF43F40D978B0C56EA75AC03D40F7E5CCF23F40CA367007EAA75AC07C0A80F10CF23F4016325706D5A75AC03604C765DCF03F404852D2C3D0A75AC02FBFD364C6EF3F40F1F3DF83D7A75AC08E3D7B2E53EF3F40CAF0D2A8F0A75AC03A1A97F8A5EE3F4009DE904605A85AC0F38B12F417EE3F402E3F645439A85AC0278C0C1074ED3F4043705CC64DA85AC0687407B133ED3F40234DBC033CA85AC0B32094F771EC3F404A79AD84EEA75AC01AD82AC1E2EC3F40D294DE9E72A75AC0A11DD02108EC3F400F0C207C28A75AC0CD380D5185EB3F406B9BE27151A75AC040A19E3E02EB3F40A85C6C8C58A75AC0E3149FD9F5EA3F401EF471949BA75AC0936EB1E480EA3F40B476DB85E6A75AC09B6ED921FEE93F40E08101840FA85AC037876BB587E93F4064213A048EA85AC0533A58FFE7E83F40FE7DC68503A95AC0EA060ABC93E73F404ED026874FA95AC075E5B33C0FE63F40C4B2994352A95AC0F2B1BB4049E53F40560F98874CA95AC00188BB7A15E53F404DA60A4625A95AC0E884D04197E43F40F1F3DF83D7A85AC0A10DC00644E43F404A438D4292A85AC060200890A1E33F405376FA415DA85AC08DD0CFD4EBE23F40892050FE57A85AC011C0CDE2C5E23F403A8C90B357A85AC014FC03C8C3E23F40726F7EC344A85AC052EBFD463BE23F402FEC6D2156A85AC034591FF58CE13F405ED6C4025FA85AC0AA6395D233E13F406599305569A85AC026C048EEFEE03F4042075DC2A1A85AC04D124BCADDDF3F408D0B0742B2A85AC09201A08A1BDF3F40452BF702B3A85AC08BA6B393C1DD3F40BEE691F47AA85AC0553AACBD25DD3F400DAF0C074DA85AC055F4D20FA6DC3F40B30A9B012EA85AC0A12AA6D24FDC3F40000341800CA85AC0855968E734DB3F407A724D81CCA75AC04543C6A354DA3F40577A6D3656A75AC01B649291B3D83F404205794A38A75AC0B268DA0CB1D83F40AE98E5F9CAA65AC00FA676D9A7D83F407D5C1B2AC6A65AC0F770C971A7D83F40B3EBDE8AC4A65AC088997D1EA3D83F4052448655BCA65AC0DB85E63A8DD83F401A6EC0E787A65AC0319413ED2AD83F40683F524486A65AC0DE8E705AF0D63F400704D9839EA65AC0D496C1F39AD53F4062057905B6A65AC05EB6C8FE4FD43F404696CCB1BCA65AC048F7730AF2D33F40F9AC5259BBA65AC073A9C3EBEBD33F40A35A441493A65AC0446ADAC534D33F4041A55FD689A65AC01B44144334D33F40EE60C43E01A65AC00C7041B62CD33F40D4B7CCE9B2A55AC0153944DC9CD23F40E2E47E87A2A55AC06AD8EF8975D23F400264E8D841A55AC018B14F00C5D03F4074EE76BD34A55AC0A704C4245CD03F40FB73D190F1A45AC06F7B82C476CF3F403CF6B3588AA45AC0E10511A969CF3F40C047D7A66AA45AC00C3B8D84C9CF3F40C47B0E2C47A45AC0FCA36FD234D03F4028486C770FA45AC08B8862F206D03F40971C774A07A45AC0A0A70183A4CF3F406F29E78BBDA35AC06F7B82C476CF3F40B177D4C040A35AC07E643CC8EDCE3F40F88C446804A35AC0B4E55C8AABCE3F4075DD1A1CFBA25AC0E127AA0F7CCE3F40784485EAE6A25AC0130D52F014CE3F4018EB1B98DCA25AC01399B9C0E5CD3F403F6EBF7CB2A25AC086E464E256CD3F409F909DB7B1A25AC0019EB47059CD3F4070BFF9DA98A25AC00756452A21CD3F40983270404BA25AC04E5B238271CC3F401F49490F43A25AC0C154336B29CC3F40B61490F63FA25AC0580053060ECC3F40F530B43A39A25AC0DE1D19ABCDCB3F40261763601DA25AC03579CA6ABACA3F40273108AC1CA25AC03E062B4EB5CA3F408A71FE2614A25AC09A3E3BE0BACA3F4065C22FF5F3A15AC040102043C7CA3F40BCC96FD1C9A15AC05242B0AA5ECA3F40D0B69A75C6A15AC000A8E2C62DCA3F4084674293C4A15AC0F8A6E9B303CA3F40B6D8EDB3CAA15AC02FC03E3A75C93F40E50E9BC8CCA15AC0BED9E6C6F4C83F409E7C7A6CCBA15AC0D4B7CCE9B2C83F40EA9788B7CEA15AC084ED27637CC83F407FDAA84E07A25AC01E34BBEEADC83F40B7A563976FA45AC02A2CC8B3ABC83F406A34DA4C68A65AC0974033E0A9C83F4019C748F608B05AC0D1ADD7F4A0C83F4019C748F608B05AC05966118AADC83F40C5C8923996BF5AC0253CA1D79FC83F403EAE0D15E3BF5AC0D8D2A3A99EC83F40E46BCF2C09C05AC0DE8FDB2F9FC83F40E46BCF2C09C05AC0A8FDD64E94C83F40984030ABFED25AC07FA1F09FA4C83F40BF2A172AFFD25AC0F9D85DA0A4C83F407A37161406DB5AC0A52DAEF199C83F404EEE77280ADB5AC0A52DAEF199C83F40EA5DBC1FB7E75AC0A52DAEF199C83F40F982161230E85AC0A52DAEF199C83F407C0A80F10CE95AC0A52DAEF199C83F40805D40A76AF75AC0A52DAEF199C83F40B0ABC953560D5BC0A52DAEF199C83F4042EE224C510D5BC0AB74779D0D9D3F40DFE17668580D5BC0309B00C3F27F3F4020B75F3E590D5BC008707A17EF7F3F4008759142590D5BC061A6ED5F59553F4045F295404A2D5BC0505260014C553F40B6BFB33D7A325BC0C55565DF15553F40931D1B8178365BC0976DA7AD11553F402E3C2F151B375BC061F8889812553F401BD7BFEB33435BC0C6DADFD91E553F401A89D00836435BC0FDF2C98AE17A3F40', + ]); + + DB::table($this->tax_areas)->insert([[ + 'name' => 'New Mexico Income Tax', + 'tax' => NewMexicoIncome::class, + 'governmental_unit_area_id' => $id, + 'based' => TaxArea::BASED_ON_WORK_LOCATION, + ],[ + 'name' => 'New Mexico Unemployment Tax', + 'tax' => NewMexicoUnemployment::class, + 'governmental_unit_area_id' => $id, + 'based' => TaxArea::BASED_ON_HOME_LOCATION, + ]]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop($this->new_mexico_income_tax_information); + + DB::table($this->tax_areas)->where('name', 'New Mexico Income Tax')->delete(); + DB::table($this->tax_areas)->where('name', 'New Mexico Unemployment Tax')->delete(); + DB::table($this->governmental_unit_areas)->where('name', 'New Mexico')->delete(); + } +} diff --git a/tests/TestCase.php b/tests/TestCase.php index f1212e3ac..e8d3a7d9f 100755 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -5,6 +5,7 @@ use Appleton\Taxes\Countries\US\Colorado\ColoradoIncome\ColoradoIncome; use Appleton\Taxes\Countries\US\Georgia\GeorgiaIncome\GeorgiaIncome; use Appleton\Taxes\Countries\US\FederalIncome\FederalIncome; +use Appleton\Taxes\Countries\US\NewMexico\NewMexicoIncome\NewMexicoIncome; use Appleton\Taxes\Countries\US\NorthCarolina\NorthCarolinaIncome\NorthCarolinaIncome; use Appleton\Taxes\Countries\US\Wisconsin\WisconsinIncome\WisconsinIncome; use Appleton\Taxes\Models\Countries\US\Alabama\AlabamaIncomeTaxInformation; @@ -12,6 +13,7 @@ use Appleton\Taxes\Models\Countries\US\Colorado\ColoradoIncomeTaxInformation; use Appleton\Taxes\Models\Countries\US\Georgia\GeorgiaIncomeTaxInformation; use Appleton\Taxes\Models\Countries\US\FederalIncomeTaxInformation; +use Appleton\Taxes\Models\Countries\US\NewMexico\NewMexicoIncomeTaxInformation; use Appleton\Taxes\Models\Countries\US\NorthCarolina\NorthCarolinaIncomeTaxInformation; use Appleton\Taxes\Models\Countries\US\Wisconsin\WisconsinIncomeTaxInformation; use Appleton\Taxes\Providers\TaxesServiceProvider; @@ -86,6 +88,12 @@ public function setUp() 'filing_status' => GeorgiaIncome::FILING_SINGLE, ], $this->user); + NewMexicoIncomeTaxInformation::createForUser([ + 'additional_withholding' => 0, + 'exemptions' => 0, + 'filing_status' => NewMexicoIncome::FILING_SINGLE, + ], $this->user); + NorthCarolinaIncomeTaxInformation::createForUser([ 'additional_withholding' => 0, 'dependents' => 0, @@ -139,6 +147,7 @@ protected function getLocation($name) 'us.colorado' => [39.7640021, -105.1352965], 'us.georgia' => [33.7490, -84.3880], 'us.florida' => [27.6648, -81.5158], + 'us.new_mexico' => [34.5199, -105.8701], 'us.north_carolina' => [35.7596, -79.0193], 'us.tennessee' => [35.5175, -86.5804], 'us.texas' => [31.9686, -99.9018], diff --git a/tests/Unit/Countries/US/Arizona/ArizonaIncomeTest.php b/tests/Unit/Countries/US/Arizona/ArizonaIncomeTest.php index d55417d89..1bd9d6819 100644 --- a/tests/Unit/Countries/US/Arizona/ArizonaIncomeTest.php +++ b/tests/Unit/Countries/US/Arizona/ArizonaIncomeTest.php @@ -2,7 +2,6 @@ namespace Appleton\Taxes\Countries\US\Arizona\ArizonaIncome; -use Appleton\Taxes\Models\Countries\US\Alabama\AlabamaIncomeTaxInformation; use Appleton\Taxes\Models\Countries\US\Arizona\ArizonaIncomeTaxInformation; use Carbon\Carbon; @@ -24,7 +23,7 @@ public function testArizonaIncome() $taxes->setPayPeriods(52); }); - $this->assertSame(1.30, $results->getTax(ArizonaIncome::class)); + $this->assertSame(1.26, $results->getTax(ArizonaIncome::class)); ArizonaIncomeTaxInformation::forUser($this->user)->update(['percentage_withheld' => 4.2]); @@ -36,5 +35,6 @@ public function testArizonaIncome() $taxes->setPayPeriods(52); }); - $this->assertSame(4.2, $results->getTax(ArizonaIncome::class)); - }} + $this->assertSame(4.08, $results->getTax(ArizonaIncome::class)); + } +} diff --git a/tests/Unit/Countries/US/Arizona/ArizonaUnemploymentTest.php b/tests/Unit/Countries/US/Arizona/ArizonaUnemploymentTest.php index 0850742ba..13e48f39c 100644 --- a/tests/Unit/Countries/US/Arizona/ArizonaUnemploymentTest.php +++ b/tests/Unit/Countries/US/Arizona/ArizonaUnemploymentTest.php @@ -16,7 +16,7 @@ public function setUp() ); } - public function testGeorgiaUnemployment() + public function testArizonaUnemployment() { $results = $this->taxes->calculate(function ($taxes) { $taxes->setHomeLocation($this->getLocation('us.arizona')); @@ -28,7 +28,7 @@ public function testGeorgiaUnemployment() $this->assertSame(46.00, $results->getTax(ArizonaUnemployment::class)); } - public function testGeorgiaUnemploymentWithTaxRate() + public function testArizonaUnemploymentWithTaxRate() { config(['taxes.rates.us.arizona.unemployment' => 0.024]); @@ -42,7 +42,7 @@ public function testGeorgiaUnemploymentWithTaxRate() $this->assertSame(55.20, $results->getTax(ArizonaUnemployment::class)); } - public function testGeorgiaUnemploymentMetWageBase() + public function testArizonaUnemploymentMetWageBase() { $results = $this->taxes->calculate(function ($taxes) { $taxes->setHomeLocation($this->getLocation('us.arizona')); diff --git a/tests/Unit/Countries/US/Colorado/ColoradoIncomeTest.php b/tests/Unit/Countries/US/Colorado/ColoradoIncomeTest.php index 9ae317522..1d2ee9e23 100644 --- a/tests/Unit/Countries/US/Colorado/ColoradoIncomeTest.php +++ b/tests/Unit/Countries/US/Colorado/ColoradoIncomeTest.php @@ -26,7 +26,7 @@ public function testColoradoIncome() $taxes->setPayPeriods(52); }); - $this->assertSame(44.00, $results->getTax(ColoradoIncome::class)); + $this->assertSame(38.00, $results->getTax(ColoradoIncome::class)); ColoradoIncomeTaxInformation::forUser($this->user)->update(['filing_status' => ColoradoIncome::FILING_MARRIED]); @@ -38,7 +38,7 @@ public function testColoradoIncome() $taxes->setPayPeriods(52); }); - $this->assertSame(39.00, $results->getTax(ColoradoIncome::class)); + $this->assertSame(33.00, $results->getTax(ColoradoIncome::class)); } public function testIncomeExemptions() @@ -53,6 +53,6 @@ public function testIncomeExemptions() $taxes->setPayPeriods(52); }); - $this->assertSame(41.00, $results->getTax(ColoradoIncome::class)); + $this->assertSame(35.00, $results->getTax(ColoradoIncome::class)); } } diff --git a/tests/Unit/Countries/US/Georgia/GeorgiaIncomeTest.php b/tests/Unit/Countries/US/Georgia/GeorgiaIncomeTest.php index 67292f439..e9159bb55 100644 --- a/tests/Unit/Countries/US/Georgia/GeorgiaIncomeTest.php +++ b/tests/Unit/Countries/US/Georgia/GeorgiaIncomeTest.php @@ -2,6 +2,8 @@ namespace Appleton\Taxes\Countries\US\Georgia\GeorgiaIncome; +use Appleton\Taxes\Countries\US\FederalIncome\FederalIncome; +use Appleton\Taxes\Models\Countries\US\FederalIncomeTaxInformation; use Appleton\Taxes\Models\Countries\US\Georgia\GeorgiaIncomeTaxInformation; use Carbon\Carbon; @@ -26,7 +28,7 @@ public function testGeorgiaIncome() $taxes->setPayPeriods(260); }); - $this->assertSame(2.21, $results->getTax(GeorgiaIncome::class)); + $this->assertSame(1.87, $results->getTax(GeorgiaIncome::class)); } public function testGeorgiaAdditionalWithholding() @@ -51,7 +53,7 @@ public function testGeorgiaAdditionalWithholding() $taxes->setPayPeriods(260); }); - $this->assertSame(12.21, $results->getTax(GeorgiaIncome::class)); + $this->assertSame(11.87, $results->getTax(GeorgiaIncome::class)); } public function testGeorgiaSupplemental() @@ -102,7 +104,7 @@ public function testGeorgiaIncomeUseDefault() $taxes->setPayPeriods(260); }); - $this->assertSame(2.21, $results->getTax(GeorgiaIncome::class)); + $this->assertSame(1.87, $results->getTax(GeorgiaIncome::class)); } public function testGeorgiaIncomeClaimExempt() @@ -134,6 +136,30 @@ public function testGeorgiaIncomeClaimExempt() $taxes->setPayPeriods(260); }); - $this->assertSame(2.21, $results->getTax(GeorgiaIncome::class)); + $this->assertSame(1.87, $results->getTax(GeorgiaIncome::class)); + } + + public function testGeorgiaIncomeTestCase1() + { + FederalIncomeTaxInformation::forUser($this->user)->update([ + 'exemptions' => 1, + 'filing_status' => FederalIncome::FILING_MARRIED, + ]); + + GeorgiaIncomeTaxInformation::forUser($this->user)->update([ + 'allowances' => 0, + 'personal_allowances' => 1, + 'filing_status' => GeorgiaIncome::FILING_MARRIED_JOINT_BOTH_WORKING, + ]); + + $results = $this->taxes->calculate(function ($taxes) { + $taxes->setHomeLocation($this->getLocation('us.georgia')); + $taxes->setWorkLocation($this->getLocation('us.georgia')); + $taxes->setUser($this->user); + $taxes->setEarnings(412.5); + $taxes->setPayPeriods(52); + }); + + $this->assertSame(13.86, $results->getTax(GeorgiaIncome::class)); } } diff --git a/tests/Unit/Countries/US/NewMexico/NewMexicoIncomeTest.php b/tests/Unit/Countries/US/NewMexico/NewMexicoIncomeTest.php new file mode 100644 index 000000000..a9b5f1cb4 --- /dev/null +++ b/tests/Unit/Countries/US/NewMexico/NewMexicoIncomeTest.php @@ -0,0 +1,26 @@ +setTimezone('UTC') + ); + + $results = $this->taxes->calculate(function ($taxes) { + $taxes->setHomeLocation($this->getLocation('us.new_mexico')); + $taxes->setWorkLocation($this->getLocation('us.new_mexico')); + $taxes->setUser($this->user); + $taxes->setEarnings(100); + $taxes->setPayPeriods(52); + }); + + $this->assertSame(0.9, $results->getTax(NewMexicoIncome::class)); + } +} diff --git a/tests/Unit/Countries/US/NewMexico/NewMexicoUnemploymentTest.php b/tests/Unit/Countries/US/NewMexico/NewMexicoUnemploymentTest.php new file mode 100644 index 000000000..6442c7fde --- /dev/null +++ b/tests/Unit/Countries/US/NewMexico/NewMexicoUnemploymentTest.php @@ -0,0 +1,88 @@ +setTimezone('UTC') + ); + } + + public function testNewMexicoUnemployment() + { + $results = $this->taxes->calculate(function ($taxes) { + $taxes->setHomeLocation($this->getLocation('us.new_mexico')); + $taxes->setWorkLocation($this->getLocation('us.new_mexico')); + $taxes->setUser($this->user); + $taxes->setEarnings(2300); + }); + + $this->assertSame(23.00, $results->getTax(NewMexicoUnemployment::class)); + } + + public function testNewMexicoUnemploymentWithTaxRate() + { + config(['taxes.rates.us.new_mexico.unemployment' => 0.024]); + + $results = $this->taxes->calculate(function ($taxes) { + $taxes->setHomeLocation($this->getLocation('us.new_mexico')); + $taxes->setWorkLocation($this->getLocation('us.new_mexico')); + $taxes->setUser($this->user); + $taxes->setEarnings(2300); + }); + + $this->assertSame(55.20, $results->getTax(NewMexicoUnemployment::class)); + } + + public function testNewMexicoUnemploymentMetWageBase() + { + $results = $this->taxes->calculate(function ($taxes) { + $taxes->setHomeLocation($this->getLocation('us.new_mexico')); + $taxes->setWorkLocation($this->getLocation('us.new_mexico')); + $taxes->setUser($this->user); + $taxes->setEarnings(100); + $taxes->setYtdEarnings(24100); + }); + + $this->assertSame(1.00, $results->getTax(NewMexicoUnemployment::class)); + + $results = $this->taxes->calculate(function ($taxes) { + $taxes->setHomeLocation($this->getLocation('us.new_mexico')); + $taxes->setWorkLocation($this->getLocation('us.new_mexico')); + $taxes->setUser($this->user); + $taxes->setEarnings(100); + $taxes->setYtdEarnings(24150); + }); + + $this->assertSame(0.5, $results->getTax(NewMexicoUnemployment::class)); + + $results = $this->taxes->calculate(function ($taxes) { + $taxes->setHomeLocation($this->getLocation('us.new_mexico')); + $taxes->setWorkLocation($this->getLocation('us.new_mexico')); + $taxes->setUser($this->user); + $taxes->setEarnings(100); + $taxes->setYtdEarnings(24200); + }); + + $this->assertSame(0.0, $results->getTax(NewMexicoUnemployment::class)); + + $results = $this->taxes->calculate(function ($taxes) { + $taxes->setHomeLocation($this->getLocation('us.new_mexico')); + $taxes->setWorkLocation($this->getLocation('us.new_mexico')); + $taxes->setUser($this->user); + $taxes->setEarnings(100); + $taxes->setYtdEarnings(24250); + }); + + $this->assertSame(0.0, $results->getTax(NewMexicoUnemployment::class)); + } +} diff --git a/tests/Unit/Countries/US/NorthCarolina/NorthCarolinaIncomeTest.php b/tests/Unit/Countries/US/NorthCarolina/NorthCarolinaIncomeTest.php index d8fdbcdda..b9f615756 100644 --- a/tests/Unit/Countries/US/NorthCarolina/NorthCarolinaIncomeTest.php +++ b/tests/Unit/Countries/US/NorthCarolina/NorthCarolinaIncomeTest.php @@ -26,7 +26,7 @@ public function testNorthCarolinaIncome() $taxes->setPayPeriods(260); }); - $this->assertSame(1.82, $results->getTax(NorthCarolinaIncome::class)); + $this->assertSame(1.51, $results->getTax(NorthCarolinaIncome::class)); } public function testNorthCarolinaAdditionalWithholding() @@ -51,7 +51,7 @@ public function testNorthCarolinaAdditionalWithholding() $taxes->setPayPeriods(260); }); - $this->assertSame(11.82, $results->getTax(NorthCarolinaIncome::class)); + $this->assertSame(11.51, $results->getTax(NorthCarolinaIncome::class)); } public function testNorthCarolinaSupplemental() @@ -102,7 +102,7 @@ public function testNorthCarolinaIncomeUseDefault() $taxes->setPayPeriods(260); }); - $this->assertSame(1.82, $results->getTax(NorthCarolinaIncome::class)); + $this->assertSame(1.51, $results->getTax(NorthCarolinaIncome::class)); } public function testNorthCarolinaIncomeWorkInTennessee() @@ -115,6 +115,6 @@ public function testNorthCarolinaIncomeWorkInTennessee() $taxes->setPayPeriods(260); }); - $this->assertSame(1.82, $results->getTax(NorthCarolinaIncome::class)); + $this->assertSame(1.51, $results->getTax(NorthCarolinaIncome::class)); } } diff --git a/tests/Unit/Countries/US/Wisconsin/WisconsinIncomeTest.php b/tests/Unit/Countries/US/Wisconsin/WisconsinIncomeTest.php index 4e7573c62..6f6d1f8d1 100644 --- a/tests/Unit/Countries/US/Wisconsin/WisconsinIncomeTest.php +++ b/tests/Unit/Countries/US/Wisconsin/WisconsinIncomeTest.php @@ -26,7 +26,7 @@ public function testWisconsinIncome() $taxes->setPayPeriods(52); }); - $this->assertSame(56.87, $results->getTax(WisconsinIncome::class)); + $this->assertSame(48.95, $results->getTax(WisconsinIncome::class)); WisconsinIncomeTaxInformation::forUser($this->user)->update(['filing_status' => WisconsinIncome::FILING_MARRIED]); @@ -38,7 +38,7 @@ public function testWisconsinIncome() $taxes->setPayPeriods(52); }); - $this->assertSame(54.92, $results->getTax(WisconsinIncome::class)); + $this->assertSame(47.01, $results->getTax(WisconsinIncome::class)); WisconsinIncomeTaxInformation::forUser($this->user)->update(['filing_status' => WisconsinIncome::FILING_SEPERATE]); @@ -50,7 +50,7 @@ public function testWisconsinIncome() $taxes->setPayPeriods(52); }); - $this->assertSame(58.81, $results->getTax(WisconsinIncome::class)); + $this->assertSame(50.89, $results->getTax(WisconsinIncome::class)); } public function testIncomeExemptions() @@ -65,7 +65,7 @@ public function testIncomeExemptions() $taxes->setPayPeriods(52); }); - $this->assertSame(56.39, $results->getTax(WisconsinIncome::class)); + $this->assertSame(48.47, $results->getTax(WisconsinIncome::class)); } public function testWisconsinIncomeClaimExempt() @@ -98,6 +98,6 @@ public function testWisconsinIncomeClaimExempt() $taxes->setPayPeriods(52); }); - $this->assertSame(56.39, $results->getTax(WisconsinIncome::class)); + $this->assertSame(48.47, $results->getTax(WisconsinIncome::class)); } } diff --git a/tests/Unit/TaxesTest.php b/tests/Unit/TaxesTest.php index bcd1283a1..27915c564 100644 --- a/tests/Unit/TaxesTest.php +++ b/tests/Unit/TaxesTest.php @@ -57,7 +57,7 @@ public function testTaxes() $taxes->setDate(Carbon::now()->addMonth()); }); - $this->assertSame(2.21, $results->getTax(GeorgiaIncome::class)); + $this->assertSame(1.87, $results->getTax(GeorgiaIncome::class)); $this->assertSame(1.80, $results->getTax(GeorgiaUnemployment::class)); }