(from @Pieter Venter's notes on drafting agent invoices)

Drafting Agent Pay

each pay cycle managers need to draft invoices for their agents via payments.inv.tech (formerly known as shepherd.inv.tech)

Historical Context

Engineering Agents used to track time in the DAL and Tim had a weekly thing to create instances for agents in the DAL to track against. He documented it here before he left.

When I took over, I scrapped the idea of engineering agents needing to track time and I wrote a script that would track 1 hour each cycle and I hacked their hourly pay rate in the db to be the same amount as half their monthly salary so that they get paid half each pay cycle for "1 hour's work".

1. Sync Engineering Time Entries

The script is at this endpoint

https://lambda.inv.tech/api/workers/syncEngineeringTimeEntries?date=2022-05-02

The data param can be any date that falls within that pay cycle. So could be anything between 11-16 and 11-30 (for the month of November, adjust as appropriate). That script will create a new instance in the DAL for each agent that it finds in the ultron db that is on the engineering team. It will then create a time entry on the specified date for each of them. There are some business logic like not able to track until it is moved to a operating stage and to move it there, it requires a bunch of other stuff to be done (assignment, etc) so I had to let the script do all of that to flow through the same business logic.

You can find the code here: https://github.com/invisible-tech/invisible/blob/master/apps/lambda/pages/api/workers/syncEngineeringTimeEntries.ts

2. Double Check Entries in DAL

After that script ran you will find the entries in the DAL with Scott Downes as client.