roam/20240721133048-pto.org

224 lines
17 KiB
Org Mode
Raw Normal View History

2024-08-23 05:32:48 +00:00
:PROPERTIES:
:ID: c21a443b-2311-497b-afcb-52cf866230d2
:END:
#+title: PTO
* AWeber
** PTO Accrual
#+caption: Employee Handbook v6
#+begin_quote
Effective on your anniversary date, and each year thereafter, you earn PTO based
on your years of service per the timeline below:
#+end_quote
| Years of Service | Yearly Vacation Accrual | Per Pay Period Accrual |
|-------------------+-------------------------+---------------------------------------------------|
| Less than 3 year | 15 days | 0.5775 x hours worked (max at 4.62 hrs per pay) |
| 3 but less than 5 | 20 days | 0.76875 x hours worked (max at 6.15 hrs per pay) |
| 5 but less than 7 | 25 days | 0.96125 x hours worked (max at 7.69 hrs per pay) |
| 7 or more | 30 days | 0.115385 x hours worked (max at 9.23 hrs per day) |
- Hire Date :: October 23, 2017
- Initial End Date :: July 22, 2022
- Rehire Date :: August 28th, 2023
- Adjusted Seniority Date :: December 1, 2018
#+begin_src python :exports none
import datetime
hired = datetime.date(2017, 10, 23)
left = datetime.date(2022, 7, 22)
rehired = datetime.date(2023, 8, 18)
adjusted_start = datetime.date(2018, 12, 1)
2024-09-25 14:35:09 +00:00
today = datetime.date(2024, 9, 25)
2024-08-23 05:32:48 +00:00
return [
["Actual days employed", ((left - hired) + (today - rehired)).days],
["Adjusted days employed", (today - adjusted_start).days],
]
#+end_src
#+RESULTS:
2024-09-25 14:35:09 +00:00
| Actual days employed | 2137 |
| Adjusted days employed | 2125 |
2024-08-23 05:32:48 +00:00
** Full History
2024-09-25 14:35:09 +00:00
2024-08-23 05:32:48 +00:00
#+name: paylocity-pto-history
| Trans Date | Begin Date | Type | Trans Type | Subtype | Hours/Days | Avail Hours/Days |
|------------+------------+------+-------------------+-----------------------+--------------+------------------|
2024-09-25 14:35:09 +00:00
| 09/20/2024 | 09/20/2024 | PTO | Earned | Ongoing | 4.62 Hours | 18.93 Hours |
| 09/06/2024 | 09/06/2024 | PTO | Earned | Ongoing | 4.62 Hours | 14.31 Hours |
| 09/06/2024 | 09/06/2024 | SAB | Earned | Ongoing | 0.00 Hours | 0.00 Hours |
| 09/06/2024 | 09/06/2024 | SAB | Cleared | | 0.00 Hours | 0.00 Hours |
| 09/06/2024 | 09/06/2024 | PTO | Cleared | | 0.00 Hours | 9.70 Hours |
| 08/23/2024 | 08/23/2024 | PTO | Earned | Ongoing | 4.62 Hours | 9.70 Hours |
| 08/23/2024 | 08/01/2024 | PTO | Used | | 4.00 Hours | 13.08 Hours |
| 08/23/2024 | 08/02/2024 | PTO | Used | | 8.00 Hours | 5.08 Hours |
| 08/23/2024 | 08/09/2024 | PTO | Manual Adjustment | History | 250.15 Hours | 17.08 Hours |
| 08/23/2024 | 08/09/2024 | PTO | Manual Adjustment | Adjustment | 238.15 Hours | 17.08 Hours |
| 08/09/2024 | 08/09/2024 | PTO | Earned | Ongoing | 4.62 Hours | 17.08 Hours |
| 07/26/2024 | 07/26/2024 | PTO | Earned | Ongoing | 4.62 Hours | 12.46 Hours |
2024-08-23 05:32:48 +00:00
| 07/12/2024 | 07/12/2024 | PTO | Earned | Ongoing | 4.62 Hours | 7.85 Hours |
| 07/12/2024 | 07/12/2024 | PTO | Used | | 8.00 Hours | 3.23 Hours |
| 06/28/2024 | 06/28/2024 | PTO | Earned | Ongoing | 4.62 Hours | 11.23 Hours |
| 06/14/2024 | 06/14/2024 | PTO | Earned | Ongoing | 4.62 Hours | 6.62 Hours |
| 05/31/2024 | 05/31/2024 | PTO | Earned | Ongoing | 4.62 Hours | 2.00 Hours |
| 05/31/2024 | 05/31/2024 | PTO | Used | | 8.00 Hours | -2.61 Hours |
| 05/17/2024 | 05/17/2024 | PTO | Earned | Ongoing | 4.62 Hours | 5.39 Hours |
| 05/03/2024 | 05/03/2024 | PTO | Earned | Ongoing | 4.62 Hours | 0.77 Hours |
| 05/03/2024 | 05/03/2024 | PTO | Used | | 8.00 Hours | -3.85 Hours |
| 04/19/2024 | 04/19/2024 | PTO | Earned | Ongoing | 4.62 Hours | 4.15 Hours |
| 04/05/2024 | 04/05/2024 | PTO | Earned | Ongoing | 4.62 Hours | -0.46 Hours |
| 03/22/2024 | 03/22/2024 | PTO | Earned | Ongoing | 4.62 Hours | -5.08 Hours |
| 03/08/2024 | 03/08/2024 | PTO | Earned | Ongoing | 4.62 Hours | -9.69 Hours |
| 02/23/2024 | 02/23/2024 | PTO | Earned | Ongoing | 4.62 Hours | -14.31 Hours |
| 02/23/2024 | 02/23/2024 | PTO | Used | | 8.00 Hours | -18.92 Hours |
| 02/09/2024 | 02/09/2024 | PTO | Earned | Ongoing | 4.62 Hours | -10.92 Hours |
| 01/26/2024 | 01/26/2024 | PTO | Earned | Ongoing | 4.62 Hours | -15.54 Hours |
| 01/26/2024 | 01/26/2024 | PTO | Used | | 16.00 Hours | -20.15 Hours |
| 01/12/2024 | 01/12/2024 | PTO | Earned | Ongoing | 4.62 Hours | -4.15 Hours |
| 01/12/2024 | 01/12/2024 | VOL | Earned | Ongoing | 0.00 Hours | 16.00 Hours |
| 01/12/2024 | 01/12/2024 | FLEX | Earned | Ongoing | 0.00 Hours | 8.00 Hours |
| 12/29/2023 | 12/29/2023 | PTO | Earned | Ongoing | 4.62 Hours | -8.77 Hours |
| 12/15/2023 | 12/15/2023 | PTO | Earned | Ongoing | 4.62 Hours | -13.38 Hours |
| 12/01/2023 | 12/01/2023 | PTO | Earned | Ongoing | 4.62 Hours | -18.00 Hours |
| 11/17/2023 | 11/17/2023 | PTO | Earned | Ongoing | 4.62 Hours | -22.62 Hours |
| 11/03/2023 | 11/03/2023 | PTO | Earned | Ongoing | 4.62 Hours | -27.23 Hours |
| 11/03/2023 | 11/03/2023 | PTO | Used | | 8.00 Hours | -31.85 Hours |
| 10/20/2023 | 10/20/2023 | PTO | Earned | Ongoing | 4.62 Hours | -23.85 Hours |
| 10/06/2023 | 10/06/2023 | PTO | Earned | Ongoing | 4.62 Hours | -28.46 Hours |
| 10/06/2023 | 10/06/2023 | FLEX | Earned | Above maximum balance | -8.00 Hours | 8.00 Hours |
| 10/06/2023 | 10/06/2023 | FLEX | Initial | | 8.00 Hours | 16.00 Hours |
| 10/06/2023 | 10/06/2023 | PTO | Used | | 16.00 Hours | -33.08 Hours |
| 09/22/2023 | 09/22/2023 | PTO | Earned | Ongoing | 4.62 Hours | -17.08 Hours |
| 09/22/2023 | 09/22/2023 | PTO | Used | | 24.00 Hours | -21.69 Hours |
| 09/08/2023 | 09/08/2023 | PTO | Earned | Ongoing | 2.31 Hours | 2.31 Hours |
| 09/08/2023 | 09/08/2023 | VOL | Earned | Above maximum balance | -16.00 Hours | 16.00 Hours |
| 09/08/2023 | 09/08/2023 | VOL | Initial | | 16.00 Hours | 32.00 Hours |
| 08/29/2023 | 08/29/2023 | PTO | Manual Adjustment | Adjustment | 142.15 Hours | 0.00 Hours |
| 07/29/2022 | 07/29/2022 | PTO | Earned | Ongoing | 6.15 Hours | 6.16 Hours |
| 07/29/2022 | 07/09/2022 | PTO | Used | | 38.15 Hours | 0.00 Hours |
| 07/15/2022 | 07/15/2022 | PTO | Earned | Ongoing | 6.15 Hours | 38.15 Hours |
| 07/01/2022 | 07/01/2022 | PTO | Earned | Ongoing | 6.15 Hours | 32.00 Hours |
| 07/01/2022 | 07/01/2022 | PTO | Used | | 16.00 Hours | 25.85 Hours |
| 06/17/2022 | 06/17/2022 | PTO | Earned | Ongoing | 6.15 Hours | 41.85 Hours |
| 06/03/2022 | 06/03/2022 | PTO | Earned | Ongoing | 6.15 Hours | 35.69 Hours |
| 05/20/2022 | 05/20/2022 | PTO | Earned | Ongoing | 6.15 Hours | 29.54 Hours |
| 05/20/2022 | 05/20/2022 | PTO | Used | | 16.00 Hours | 23.38 Hours |
| 05/06/2022 | 05/06/2022 | PTO | Earned | Ongoing | 6.15 Hours | 39.38 Hours |
| 05/06/2022 | 05/06/2022 | PTO | Used | | 40.00 Hours | 33.23 Hours |
| 04/22/2022 | 04/22/2022 | PTO | Earned | Ongoing | 6.15 Hours | 73.23 Hours |
| 04/08/2022 | 04/08/2022 | PTO | Earned | Ongoing | 6.15 Hours | 67.08 Hours |
| 03/25/2022 | 03/25/2022 | PTO | Earned | Ongoing | 6.15 Hours | 60.92 Hours |
| 03/11/2022 | 03/11/2022 | PTO | Earned | Ongoing | 6.15 Hours | 54.77 Hours |
| 03/11/2022 | 03/11/2022 | PTO | Used | | 16.00 Hours | 48.61 Hours |
| 02/25/2022 | 02/25/2022 | PTO | Earned | Ongoing | 6.15 Hours | 64.61 Hours |
| 02/11/2022 | 02/11/2022 | PTO | Earned | Ongoing | 6.15 Hours | 58.46 Hours |
| 01/28/2022 | 01/28/2022 | PTO | Earned | Ongoing | 6.15 Hours | 52.31 Hours |
| 01/14/2022 | 01/14/2022 | PTO | Earned | Ongoing | 6.15 Hours | 46.15 Hours |
| 01/14/2022 | 01/14/2022 | FLEX | Earned | Ongoing | 8.00 Hours | 8.00 Hours |
| 01/14/2022 | 01/14/2022 | VOL | Earned | Ongoing | 0.00 Hours | 16.00 Hours |
| 01/14/2022 | 01/14/2022 | PTO | Used | | 8.00 Hours | 40.00 Hours |
| 12/30/2021 | 12/30/2021 | PTO | Earned | Ongoing | 6.15 Hours | 48.00 Hours |
| 12/30/2021 | 12/30/2021 | PTO | Used | | 8.00 Hours | 41.84 Hours |
| 12/30/2021 | 12/30/2021 | FLEX | Used | | 8.00 Hours | 0.00 Hours |
| 12/17/2021 | 12/17/2021 | PTO | Earned | Ongoing | 6.15 Hours | 49.84 Hours |
| 12/03/2021 | 12/03/2021 | PTO | Earned | Ongoing | 6.15 Hours | 43.69 Hours |
| 11/19/2021 | 11/19/2021 | PTO | Earned | Ongoing | 6.15 Hours | 37.54 Hours |
| 11/05/2021 | 11/05/2021 | PTO | Earned | Ongoing | 6.15 Hours | 31.38 Hours |
| 11/05/2021 | 11/05/2021 | SAB | Earned | Ongoing | 0.00 Hours | 0.00 Hours |
| 11/05/2021 | 11/05/2021 | SAB | Cleared | | 0.00 Hours | 0.00 Hours |
| 11/05/2021 | 11/05/2021 | PTO | Cleared | | 0.00 Hours | 25.23 Hours |
| 11/05/2021 | 11/05/2021 | PTO | Used | | 12.00 Hours | 25.23 Hours |
| 10/22/2021 | 10/22/2021 | PTO | Earned | Ongoing | 6.15 Hours | 37.23 Hours |
| 10/08/2021 | 10/08/2021 | PTO | Earned | Ongoing | 6.15 Hours | 31.07 Hours |
| 09/24/2021 | 09/24/2021 | PTO | Earned | Ongoing | 6.15 Hours | 24.92 Hours |
| 09/24/2021 | 09/24/2021 | PTO | Used | | 32.00 Hours | 18.77 Hours |
| 09/10/2021 | 09/10/2021 | PTO | Earned | Ongoing | 6.15 Hours | 50.77 Hours |
| 08/27/2021 | 08/27/2021 | PTO | Earned | Ongoing | 6.15 Hours | 44.61 Hours |
| 08/27/2021 | 08/27/2021 | PTO | Used | | 8.00 Hours | 38.46 Hours |
| 08/13/2021 | 08/13/2021 | PTO | Earned | Ongoing | 6.15 Hours | 46.46 Hours |
| 07/30/2021 | 07/30/2021 | PTO | Earned | Ongoing | 6.15 Hours | 40.30 Hours |
| 07/16/2021 | 07/16/2021 | PTO | Earned | Ongoing | 6.15 Hours | 34.15 Hours |
| 07/02/2021 | 07/02/2021 | PTO | Earned | Ongoing | 6.15 Hours | 28.00 Hours |
| 07/02/2021 | 07/02/2021 | PTO | Used | | 8.00 Hours | 21.84 Hours |
| 06/18/2021 | 06/18/2021 | PTO | Earned | Ongoing | 6.15 Hours | 29.84 Hours |
| 06/18/2021 | 06/18/2021 | PTO | Used | | 32.00 Hours | 23.69 Hours |
| 06/04/2021 | 06/04/2021 | PTO | Earned | Ongoing | 6.15 Hours | 55.69 Hours |
| 06/04/2021 | 06/04/2021 | PTO | Used | | 4.00 Hours | 49.54 Hours |
| 05/21/2021 | 05/21/2021 | PTO | Earned | Ongoing | 6.15 Hours | 53.54 Hours |
| 05/21/2021 | 05/21/2021 | PTO | Used | | 8.00 Hours | 47.38 Hours |
| 05/07/2021 | 05/07/2021 | PTO | Earned | Ongoing | 6.15 Hours | 55.38 Hours |
| 04/23/2021 | 04/23/2021 | PTO | Earned | Ongoing | 6.15 Hours | 49.23 Hours |
| 04/23/2021 | 04/23/2021 | PTO | Used | | 8.00 Hours | 43.07 Hours |
| 04/09/2021 | 04/09/2021 | PTO | Earned | Ongoing | 6.15 Hours | 51.07 Hours |
| 03/26/2021 | 03/26/2021 | PTO | Earned | Ongoing | 6.15 Hours | 44.92 Hours |
| 03/12/2021 | 03/12/2021 | PTO | Earned | Ongoing | 6.15 Hours | 38.77 Hours |
| 02/26/2021 | 02/26/2021 | PTO | Earned | Ongoing | 6.15 Hours | 32.61 Hours |
| 02/26/2021 | 02/26/2021 | PTO | Used | | 8.00 Hours | 26.46 Hours |
| 02/12/2021 | 02/12/2021 | PTO | Earned | Ongoing | 6.15 Hours | 34.46 Hours |
| 01/29/2021 | 01/29/2021 | PTO | Earned | Ongoing | 6.15 Hours | 28.30 Hours |
| 01/15/2021 | 01/15/2021 | PTO | Earned | Ongoing | 6.15 Hours | |
| 01/15/2021 | 01/15/2021 | FLEX | Earned | Ongoing | 8.00 Hours | 8.00 Hours |
| 01/15/2021 | 01/15/2021 | VOL | Earned | Ongoing | 16.00 Hours | 16.00 Hours |
** Discrepancy since December 1st, 2023 (5-year anniversary)
Since my rehire date, I should have been accruing PTO at the 3-5 year rate up
until the 5th annivesary of my adjusted seniority date, following which it
should have been accruing at the 5-7 year rate. It has instead been accruing at
the 0-3 year rate the entire time.
#+name: pto-earned-discrepency
#+begin_src python :var data=paylocity-pto-history :var filename="pto-aweber-2024-discrepency.png" :results file :exports results
from datetime import datetime, date
import pandas as pd
def from_hours(text) -> float | None:
try:
return float(text.split()[0])
except (ValueError, IndexError):
return None
data = [
{
"date": datetime.strptime(tdate, "%m/%d/%Y").date(),
"PTO Type": ptype,
"Trans Type": ttype,
"hours": from_hours(hours),
"available": from_hours(available),
}
for tdate, bdate, ptype, ttype, stype, hours, available in data
]
data = pd.DataFrame(data)
pto = data[data["PTO Type"] == "PTO"]
pto = pto[(pto["Trans Type"] =="Earned") | (pto["Trans Type"] == "Used")]
pto = pto[pto["date"] > date(2022, 9, 1)]
2024-09-25 14:35:09 +00:00
pto = pto.pivot_table(index="date", columns="Trans Type", values="hours", aggfunc="sum").fillna(0)
2024-08-23 05:32:48 +00:00
pto["Expected Earned"] = pto["Earned"]
pto.loc[pto.index == date(2023, 9, 8), "Expected Earned"] = 3.08 # (2.31 / 4.62) * 6.15
pto.loc[pto.index > date(2023, 9, 8), "Expected Earned"] = 6.15
pto.loc[pto.index > date(2023, 12, 1), "Expected Earned"] = 7.69
pto["change"] = pto["Earned"] - pto["Used"]
pto["expected change"] = pto["Expected Earned"] - pto["Used"]
pto["Actual"] = pto["change"].cumsum()
pto["Expected"] = pto["expected change"].cumsum()
plot = pto[["Actual", "Expected"]].plot(title="PTO Accrual Discrepancy", xlabel="Date", ylabel="Hours")
last = pto.iloc[-1]
plot.get_legend().set_title("")
plot.text(last.name, last["Actual"], f" {last.Actual:.2f}")
plot.text(last.name, last["Expected"], f" {last.Expected:.2f}")
fig = plot.get_figure()
fig.autofmt_xdate()
fig.savefig(filename)
return filename
#+end_src
#+RESULTS: pto-earned-discrepency
[[file:pto-aweber-2024-discrepency.png]]