Repository: PolicyEngine/policyengine-us (language: python)

Issue:
Add the 2023 Arkansas inflation relief credit amount and avoid attributing the amount twice for joint filers filing separately
[Reference](https://www.dfa.arkansas.gov/wp-content/uploads/2023_AR1000TC_Schedule_of_TaxCredits_andBusiness_IncentiveCredits_Instructions.pdf)



Discussion / hints:

Fix patch:
diff --git a/changelog_entry.yaml b/changelog_entry.yaml
index e69de29bb2d..f340a28996a 100644
--- a/changelog_entry.yaml
+++ b/changelog_entry.yaml
@@ -0,0 +1,4 @@
+- bump: patch
+  changes:
+    added:
+    - Add the 2023 Arkansas inflation relief credit amount and avoid attributing the amount twice for joint filers filing separately.
diff --git a/policyengine_us/parameters/gov/states/ar/tax/income/credits/inflationary_relief/max_amount.yaml b/policyengine_us/parameters/gov/states/ar/tax/income/credits/inflationary_relief/max_amount.yaml
index b5dbd402bd5..bad915cdd80 100644
--- a/policyengine_us/parameters/gov/states/ar/tax/income/credits/inflationary_relief/max_amount.yaml
+++ b/policyengine_us/parameters/gov/states/ar/tax/income/credits/inflationary_relief/max_amount.yaml
@@ -17,12 +17,16 @@ metadata:
     - filing_status
 JOINT:
   2022-01-01: 300
+  2023-01-01: 100
 SURVIVING_SPOUSE:
   2022-01-01: 150
+  2023-01-01: 50
 HEAD_OF_HOUSEHOLD:
   2022-01-01: 150
+  2023-01-01: 50
 SINGLE:
   2022-01-01: 150
+  2023-01-01: 50
 SEPARATE:
   2022-01-01: 150
-
+  2023-01-01: 50
diff --git a/policyengine_us/variables/gov/states/ar/tax/income/credits/ar_inflationary_relief_tax_credit_person.py b/policyengine_us/variables/gov/states/ar/tax/income/credits/ar_inflation_relief_credit_person.py
similarity index 84%
rename from policyengine_us/variables/gov/states/ar/tax/income/credits/ar_inflationary_relief_tax_credit_person.py
rename to policyengine_us/variables/gov/states/ar/tax/income/credits/ar_inflation_relief_credit_person.py
index 312af55fc7e..9b5c9b622a0 100644
--- a/policyengine_us/variables/gov/states/ar/tax/income/credits/ar_inflationary_relief_tax_credit_person.py
+++ b/policyengine_us/variables/gov/states/ar/tax/income/credits/ar_inflation_relief_credit_person.py
@@ -30,4 +30,7 @@ def formula(person, period, parameters):
         excess = max_(income - reduction_start, 0)
         increments = np.ceil(excess / increment)
         total_reduction_amount = increments * reduction_per_increment
-        return max_(max_amount - total_reduction_amount, 0)
+        # Attribute the maximum amount to each spouse equally when married filing jointly
+        joint = filing_status == filing_status.possible_values.JOINT
+        divisor = where(joint, 2, 1)
+        return max_(max_amount - total_reduction_amount, 0) / divisor


Test patch:
diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_inflation_relief_credit_person.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_inflation_relief_credit_person.yaml
index fb3e90d5cb6..d3ee074e898 100644
--- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_inflation_relief_credit_person.yaml
+++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_inflation_relief_credit_person.yaml
@@ -103,7 +103,7 @@
         members: [person1, person2]
         state_code: AR
   output:
-    ar_inflation_relief_credit_person: 280
+    ar_inflation_relief_credit_person: [140, 140]
 
 - name: Widow household with $80,000 taxable income
   period: 2022