所以這裏是基本問題:Payroll Tax Database Schema(美國)
美國聯邦所得稅可以每年或甚至在年中更改。它們基於稅表,無論您是單身還是已婚,您多久付錢一次,以及您申領多少津貼。這裏是人誰是單身,並得到支付雙週(2013年)爲例稅率表:
Gross income between $42 and $214 - $0.00 plus 10% of excess over $85
Gross income between $214 and $739 - $17.20 plus 15% of excess over $214
Gross income between $1479 and $3463 - $191.95 plus 25% of excess over $1479
Gross income between $3463 and $7133 - $687.95 plus 28% of excess over $3463
Gross income between $7133 and $15406 - $1715.55 plus 33% of excess over $7133
Gross income between $15406 and $15469 - $4445.64 plus 35% of excess over $15406
Gross income between $15469+ - $4467.69 plus 39.6% of excess over $15469
所以不同的薪酬安排是每週,每兩週,半月刊,每月,每季度,每半年,每年和日報。每個時間表有兩個稅表(已婚和單身),每個都有不同的數字。
因此,要計算工資,您必須扣除員工扣款(醫療保險等)薪酬類型,薪酬計劃,配菜(如果有),然後取其總收入的範圍,並計算出這些稅數字下降然後計算稅收的表格。
設置數據庫的最佳方式是什麼,以便我可以根據需要編輯任何或所有這些數字 - 但同時在嘗試計算一組員工的工資時,不會使SQL查詢長100行? (如果可能的話)
爲每個支付計劃創建一張表格?每個薪酬計劃有兩張桌子(已婚和單身)?在這一點上,我認爲這是要走的路,但我只是想確保我沒有過度複雜化。歡迎任何或所有建議。提前致謝。
這【答案】(http://money.stackexchange.com/a/57230/35906)可能是有益的。 – mwolfe02 2015-12-21 20:02:27