Skip to content
This repository has been archived by the owner on Mar 1, 2021. It is now read-only.

account for 2012-06 #1

Merged
merged 52 commits into from
Jan 22, 2016
Merged

account for 2012-06 #1

merged 52 commits into from
Jan 22, 2016

Conversation

chadwhitacre
Copy link
Contributor

Punchlist

  • script a balance sheet
  • script an income statement
  • DRY them up
  • deploy a reconciliation dashboard for Gratipay—add a reconciliation dashboard gratipay.com#3899
  • account for the 1.50 payout that the dashboard will surface
  • write documentation
  • configure testing

@chadwhitacre
Copy link
Contributor Author

$ ledger -f 2012/06.dat balance
            $ 226.78  Assets
            $ 143.40    Escrow
             $ 47.03      New Alliance
             $ 96.37      Stripe
            $ -25.20    Fee Buffer
            $ 108.58    Operations:New Alliance
           $ -102.45  Equity:Opening Balance
             $ -3.66  Error:Samurai
             $ 52.70  Expenses:Processing Fees
            $ -29.97  Income
             $ -5.91    IHasAMoney.com
             $ -0.54    Miscellaneous
            $ -23.52    Processing Fees
           $ -143.40  Liabilities:Escrow
--------------------
                   0

Things to note:

  • Assets:Escrow and Liabilities:Escrow balance.
  • Escrow and operations are mixed together within the same accounts, chiefly at New Alliance, but also as regards Samurai (where we used the same account to process IHasAMoney.com payments as well Gittip payments) and even Stripe (there's a test transaction which doesn't result in escrow).
  • Therefore, the ending balance for New Alliance, as reflected on the paper statement that @kaguillera and I have in front of us, is equal to Assets - Stripe (130.41).
  • The 96.37 left in Stripe at the end of the month is what we would expect them to disburse to us early in the next month (spoiler: they do!).
  • Errors:Samurai is how we accounted for this mess.

@chadwhitacre
Copy link
Contributor Author

Question: do we want to zero out Fee Buffer from Operations on a monthly basis?

@chadwhitacre
Copy link
Contributor Author

Things to note:

  • Also, crucially, the Escrow number also reconciles with the Gratipay database.

@chadwhitacre
Copy link
Contributor Author

Oh! Except for the 1.50 payout, we need to account for that still.

@chadwhitacre
Copy link
Contributor Author

Alright! Progress, will return to this later ...

@chadwhitacre
Copy link
Contributor Author

Let's reformat the journal entries to be in standard format, with debits first, and credits indented.

@chadwhitacre
Copy link
Contributor Author

Also: A balance sheet has three headings: Assets, Liabilities, and Equity (in that order). Revenue and Expenses don't show up on a balance sheet. Well, they do, primarily under Retained Earnings.

@chadwhitacre
Copy link
Contributor Author

"Because Asset and Expense accounts maintain positive balances, they are positive, or debit accounts."

and

"Liability, Equity, and Revenue accounts usually receive credits, so they maintain negative balances."

@chadwhitacre
Copy link
Contributor Author

In other words, we've got the signs right:

screen shot 2016-01-07 at 10 52 49 pm

@chadwhitacre
Copy link
Contributor Author

The positive retained earnings means that we lost money during our first month.

The negative processing fee buffer means that we lost money because we were charged way more than we expected.

@chadwhitacre
Copy link
Contributor Author

@chadwhitacre
Copy link
Contributor Author

Let's reformat the journal entries to be in standard format, with debits first, and credits indented.

We are already listing debits first. Credits don't need to be indented because they are signed instead (non-standard, but okay).

@chadwhitacre
Copy link
Contributor Author

Got it! Income statement:

screen shot 2016-01-07 at 11 53 05 pm

@chadwhitacre
Copy link
Contributor Author

Hey @zacchiro, I think I figured out how to get an income statement out of ledger. First, I added an Equity:Retained Earnings account to link the income statement to the balance sheet. I used a payee of "Retained Earnings" for the offsetting transactions. Then I ran ledger balance Income Expense but filtering out payee of "Retained Earnings" (when included, the offsetting transactions resulted in an empty report). This gives me a nice income statement that syncs up with retained earnings in the balance statement. Voila! :-)

@chadwhitacre
Copy link
Contributor Author

screen shot 2016-01-08 at 5 09 56 pm

@chadwhitacre
Copy link
Contributor Author

Okay! So it looks like ledger will probably work on Mac OS ... we just need to figure out how to install the version we want, or upgrade locally to the latest ledger.

@chadwhitacre
Copy link
Contributor Author

I've cleaned up my local brew environment and am installing the latest ledger.

If there's only one account in a report then ledger doesn't print a
total separately.
I've upgraded to 3.1.0 locally and I'm not getting any errors with it.
@chadwhitacre
Copy link
Contributor Author

Alright, looks like this is more than just a version incompatibility:

  ansify_if(justify(scrub(display_total), 20, (20 + int(prepend_width)), true, color), (should_bold ? (bold : null)))
While calling function 'int ':
While calling function 'justify ($ 46.66, 20, <#EXPR ({20} + int(prepend_width))>, 1, 0)':
While calling function 'ansify_if (<#EXPR justify(scrub(display_total), {20}, ({20} + int(prepend_width)), true, color)>, )':
Error: bad lexical cast: source type value could not be interpreted as target

Maybe shendurelab/MIPGEN#3 is a clue?

Required a test update
@chadwhitacre
Copy link
Contributor Author

Yay! Tests pass! 💃

@chadwhitacre
Copy link
Contributor Author

@kaguillera This is ready for final review and merge!

kaguillera added a commit that referenced this pull request Jan 22, 2016
@kaguillera kaguillera merged commit 9491db7 into master Jan 22, 2016
@chadwhitacre chadwhitacre deleted the 2012-06 branch January 22, 2016 01:28
@chadwhitacre
Copy link
Contributor Author

!m @kaguillera 💃

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants