-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
🐘 🍴 |
Hrm ... time to do a little spelunking. What writes to and reads from the |
|
|
I think we start with |
After dropping the
|
I'm working on
(Let's keep And how about payroll/owner distribution?
See #3616 (comment) for payins, and #3616 (comment) for payouts. |
Alright, I made it through one test. :-) I actually feel pretty good about this approach. It took me a while to start getting comfortable with this table:
But now that it's starting to sink in, I feel like this is really good for us. We're going to have real double-entry accounting! :D That feels like Doing It Right™ to me. |
|
Using Python string interpolation on the payday.sql file introduces complexity that leads to bugs. The one I hit was using '%' for interplation in a Postgres RAISES clause: it would've had to be escaped to make it through the Python interpolation.
I pushed this up into SQL.
We should have all of our actual escrow accounts in the chart of system accounts. Today that's New Alliance and PayPal. It takes a few days to move money between the two, so we should also have accounts for pending transfers. |
|
@kaguillera and I went around the horn on this here at Blue Canary. He has a bit of a background in accounting and finance (@chrisdev could say even more, I'm sure ;-). Regarding the two different schemas for representing journal entries, @kaguillera's input is that accountants will expect the former (expanded) format, and will find the second (compact) format idiosyncratic and wrong. He recommends using the compact format for our database schema since it makes more sense there (it's a simpler implementation of the accounting invariant that every debit has a corresponding credit), but to display our journal in the proper accounting format. Perhaps it would help to change the We also went through the chart of accounts together. Rather than a The journal needs to record everything that happens to Gratipay's escrow. As part of deploying this PR, we should reconstruct the journal back to the very beginning of Gratipay. Some of what's happened to our escrow is recorded in the three tables in our database, One of the purposes of the journal is to make auditing possible. Auditing means reconciling internally (ensuring that assets equal liabilities), reconciling externally (ensuring that our records line up with those of New Alliance, PayPal, etc.), and making sure we're on the up and up (no "$500 pencils," in @kaguillera's evocative phrase 💰 ✏️). We will want to ensure that the journal as we reconstruct it is fully reconciled before we start writing to it, and then we should have a process in place for periodically reconciling the journal going forward. We should probably have an annual independent audit, and should probably level-set with a third-party audit as part of landing this PR. I've reticketed that as gratipay/inside.gratipay.com#285. |
I'm trying to figure out how to get financial accounts elsewhere into our chart of accounts and journal, rather than being a separate class of entity. This is what I'm starting with:
|
Actually, let's start with this (subbing New Alliance for cash, per recent comments).
|
We need some number of transactions/entry pairs preceding the Do we need to get money into |
In order to fold |
To: a friend in accounting
|
My friend works with ACS (I actually used to work with him there, so I'm not unfamiliar with ACS myself). I picked up a few tidbits from poking around ACS with him:
The upshot is that we're building something roughly parallel to ACS. It'd be more helpful to talk to a designer or developer of (something like) ACS than a user of ACS. |
I met with a CPA (gratipay/inside.gratipay.com#285). Tidbits from our initial conversation:
Next steps:
|
|
|
|
Picking up in #3653. |
See #3616 for initial thinking on this.
transfers
,payments
, andexchanges
intojournal
entries.