Say when the employer unemployment-tax total is an estimate, and keep the no-worker regression in its New Jersey test

Aperta Adatta ai principianti
#11,653 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, yaml
Ambito
databases, testing

Direzione di ricerca

Leggi employer_total_state_unemployment_tax.py e nj_employer_state_unemployment_tax.yaml, in particolare il caso senza lavoratori intorno alla riga di fixture referenziata. Aggiorna la formulazione della stima e ripristina l’input dei salari lordi del datore di lavoro, mantenendo l’aspettativa indicata; aggiungi il caso della riforma con aliquota zero e chiarisci il cambio di aliquota di luglio nel titolo del caso. Il lavoro è completato quando la documentazione descrive entrambe le condizioni della stima e i casi del New Jersey rilevano la vecchia formula e coprono il percorso del chiamante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Agent-written for Max, by Claude Code for Max Ghenis.

The last review of #10700 approved it at 8c92c28b and left two follow-ups.

1. Documentation

employer_total_state_unemployment_tax applies one worker's effective rate to the employer's taxable wages. Its documentation says the total is an estimate when workers' wages differ (variable). It is also an estimate when worker wages are missing and the rate changes during the year, even for one worker.

In New Jersey in 2022, one worker paid $100,000 evenly owes $1,067.635: $25,000 taxed in Q1 and $14,800 in Q2 at 2.6825%. With worker wages left out, the total uses the average of the four quarterly rates, 2.8325%, and gives $1,127.335 on $39,800.

Proposed: say the total is an estimate whenever the rate changes during the year and the worker profile is missing or unrepresentative.

2. Test

In nj_employer_state_unemployment_tax.yaml, the no-worker row leaves out the $100,000 employer gross wages that the case had before (fixture). Without that input, the old and new formulas both give $1,127.335, so the row cannot catch a return to the old formula.

Proposed:

  • Restore employer_total_payroll_tax_gross_wages: 100_000 in that row and keep the $1,127.335 expectation; the old formula gave $1,067.635.
  • Add a reform that sets the effective rate to zero, to test the caller path next to the supplied-zero case.
  • Name the July rate change in the case title: the $60,000 row taxes $9,800 in Q3 at the higher rate.
Lingua principale
Python
Stelle
178
Fork
224
Merge medio
3g 13h
PR unite (30g)
309

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-us

Tutte le issue di PolicyEngine/policyengine-us

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.