From dccfa6a51294db34f4aec0e22a2d34cdc749b104 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 27 Jul 2017 12:56:35 -0700 Subject: [PATCH] examples: borrowing [ci skip] --- examples/borrowing.journal | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 examples/borrowing.journal diff --git a/examples/borrowing.journal b/examples/borrowing.journal new file mode 100644 index 000000000..ffe190f83 --- /dev/null +++ b/examples/borrowing.journal @@ -0,0 +1,47 @@ +; some simple borrowing and lending transactions + +; money to be repaid to others is a liability, usually called "accounts payable" + +1/1 borrow from alice + assets:cash 10 + liabilities:payable:alice -10 + +1/2 repay alice + assets:cash -10 + liabilities:payable:alice 10 = 0 ; optional balance assertion showing alice is fully repaid + +; money to be repaid to you is an asset, usually called "accounts receivable" + +1/3 lend to bob + assets:cash ; omitting the second amount this time + assets:receivable:bob 25 + +1/4 receive repayment from bob + assets:cash + assets:receivable:bob -25 = 0 ; balance assertion showing no more money is due from bob + +; a loan with interest and late fees + +2/1 assume some money in checking at the start + (assets:bank:checking) 30 + +2/1 borrow from bank + liabilities:payable:bank + assets:bank:checking 1000 + +3/1 a bank repayment + liabilities:payable:bank 97 = -903 + expenses:interest:bank 3 + assets:bank:checking -100 + +4/15 a bank repayment, late + liabilities:payable:bank 97 = -806 + expenses:interest:bank 3 + assets:bank:checking -100 + +5/1 repay bank in full + liabilities:payable:bank 806 = 0 + expenses:interest:bank 3 + expenses:late fees:bank 15 + assets:bank:checking +