1
0
Files
plaintextaccounting/quickref/index.html
2016-03-14 09:29:20 -07:00

1116 lines
24 KiB
HTML
Executable File

<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/normalize.css">
<link rel="stylesheet" href="/css/skeleton.css">
<link rel="stylesheet" href="/css/site.css">
<link rel="icon" type="image/png" href="/images/favicon.png">
<link href="quickref.css" rel="stylesheet">
</head>
<body class="c31">
<div class="container">
<p class="c21 c27">
<span style="overflow: hidden; display: inline-block; margin: 0.00px 0.00px; border: 0.00px solid #000000; transform: rotate(0.00rad) translateZ(0px); -webkit-transform: rotate(0.00rad) translateZ(0px); width: 99.79px; height: 116.80px;">
<img alt="270px-Rosetta_Stone.JPG" src="images/image00.jpg" style="width: 99.79px; height: 116.80px; margin-left: 0.00px; margin-top: 0.00px; transform: rotate(0.00rad) translateZ(0px); -webkit-transform: rotate(0.00rad) translateZ(0px);" title="">
</span>
</p>
<h2 class="c28" id="h.pm8s15w9ugw8">
<span>
</span>
</h2>
<h2 class="c37" id="h.ejyq5tnqecv7">
<span>
Quick Reference for the Ledger-Likes</span>
</h2>
<p class="c21">
<span>
Some information about the major </span>
<span>
Plain Text Accounting</span>
<span>
&nbsp;implementations, drawn from existing docs and informal testing, that I needed to see in one place. Currently, it compares the main journal syntax for Ledger, hledger and Beancount. For more, see the manuals and cheatsheets linked below, or </span>
<span class="c4">
<a class="c8" href="https://www.google.com/url?q=http://plaintextaccounting.org&amp;sa=D&amp;ust=1457976431396000&amp;usg=AFQjCNFhgY_NxcHPB1f2bMRs_pXlaataqQ">
plaintextaccounting.org</a>
</span>
<span>
. </span>
<span>
I hope you find it useful.</span>
</p>
<p class="c21">
<span>
First draft, created 2016/03, corrections to: sm on </span>
<span class="c4">
<a class="c8" href="https://www.google.com/url?q=http://webchat.freenode.net/?channels%3Dhledger&amp;sa=D&amp;ust=1457976431397000&amp;usg=AFQjCNF8ief5og9wamFegnpKQPHtM5xnIQ">
#hledger</a>
</span>
<span>
&nbsp;or </span>
<span class="c4">
<a class="c8" href="https://www.google.com/url?q=http://webchat.freenode.net/?channels%3Dledger&amp;sa=D&amp;ust=1457976431398000&amp;usg=AFQjCNHlI5QRjSolLqKy3hP53mNw9sEAhQ">
#ledger</a>
</span>
<span>
&nbsp;or </span>
<span class="c4">
<a class="c8" href="https://www.google.com/url?q=http://webchat.freenode.net/?channels%3Dbeancount&amp;sa=D&amp;ust=1457976431399000&amp;usg=AFQjCNEJGeHw2iJrazpPIATy-Tjj1spmmQ">
#beancount</a>
</span>
<span>
, or the </span>
<span class="c4">
<a class="c8" href="https://www.google.com/url?q=https://docs.google.com/document/d/1L5OyRZ4nxQVjZJugyEyYi_H-229yaWV-yx0raAO1iog/edit?usp%3Dsharing&amp;sa=D&amp;ust=1457976431400000&amp;usg=AFQjCNHI_UxeeyqXv0j0mMWGXQ1SVxvNTQ">
google doc</a>
</span>
</p>
<p class="c16 c21">
<span>
</span>
</p>
<p class="c36">
<span class="c4">
<a class="c8" href="#h.ejyq5tnqecv7">
Quick Reference for the Ledger-Likes</a>
</span>
</p>
<p class="c25">
<span class="c4">
<a class="c8" href="#h.tqmbtluf328a">
Journal Format</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.8v2r9qqwt9f8">
Basic example</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.1n05blr44u7c">
Comments</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.gij3l494xeth">
Basic transactions</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.xpr0dgy4pyj3">
Dates</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.n4b87oz9ku6t">
Account names</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.9xaw86fvi6s6">
More transaction features</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.d2g5xagy7h37">
Prices</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.mjrjnr996vfg">
Balance assertions, resets</a>
</span>
</p>
<p class="c15">
<span class="c4">
<a class="c8" href="#h.au5ysr0kfa">
Directives</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.3v5cafffbbft">
account, open</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.22qss13648tb">
close</a>
</span>
</p>
<p class="c6">
<span class="c4">
<a class="c8" href="#h.n9q16dsjsoye">
commodity</a>
</span>
</p>
<h4 class="c23" id="h.wve8xialq0o3">
<span>
</span>
</h4>
<h3 class="c34" id="h.tqmbtluf328a">
<span>
Journal Format</span>
</h3>
<p>
<span>
Legend</span>
<span>
: <br>
Things in </span>
<span class="c11">
[ ] </span>
<span>
are</span>
<span>
&nbsp;optional. <br>
Syntax should be the latest preferred syntax for each implementation, may be incomplete. <br>
Some notes in the Ledger column are common to all.<br>
<br>
</span>
</p>
<a id="t.8f5669080b3244bfe6d65a1e5e3d65472a1cce53">
</a>
<a id="t.0">
</a>
<table class="c32">
<tbody>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<p class="c3 c16">
<span class="c22">
</span>
</p>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c19">
<span>
Ledger<br>
</span>
<span class="c4 c7">
<a class="c8" href="https://www.google.com/url?q=http://ledger-cli.org/3.0/doc/ledger3.html%23Journal-Format&amp;sa=D&amp;ust=1457976431414000&amp;usg=AFQjCNGajC6Hmj7J_KTJnVLQroDVk5D_iw">
http://ledger-cli.org/3.0/doc/ledger3.html#Journal-Format</a>
</span>
<span class="c7">
<br>
</span>
<span class="c4 c7">
<a class="c8" href="https://www.google.com/url?q=http://ricostacruz.com/cheatsheets/ledger.html&amp;sa=D&amp;ust=1457976431414000&amp;usg=AFQjCNFXV7eEg-3Cak1T3-NfuQbJc3a8aA">
http://ricostacruz.com/cheatsheets/ledger.html</a>
</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c19">
<span>
hledger<br>
</span>
<span class="c4 c29">
<a class="c8" href="https://www.google.com/url?q=http://hledger.org/manual.html%23journal&amp;sa=D&amp;ust=1457976431416000&amp;usg=AFQjCNG26WenW087FUzxbnDBhz0R6poAMQ">
http://hledger.org/manual.html#journal</a>
</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c19">
<span>
Beancount<br>
</span>
<span class="c4 c29">
<a class="c8" href="https://www.google.com/url?q=http://furius.ca/beancount/doc/syntax&amp;sa=D&amp;ust=1457976431417000&amp;usg=AFQjCNGGbG_LkJ13bT2pc7CtxF9DrptzqQ">
http://furius.ca/beancount/doc/syntax</a>
</span>
<span class="c29">
<br>
</span>
<span class="c4 c29 c35">
<a class="c8" href="https://www.google.com/url?q=http://furius.ca/beancount/doc/cheatsheet&amp;sa=D&amp;ust=1457976431417000&amp;usg=AFQjCNEiSx34g1cMXTiRNCNlrY01jc34Bw">
http://furius.ca/beancount/doc/cheatsheet</a>
</span>
</p>
<p class="c16 c19">
<span class="c26 c33">
</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.8v2r9qqwt9f8">
<span>
Basic example</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
; a comment<br>
<br>
2016/1/1 set opening balance<br>
&nbsp; &nbsp;assets:checking &nbsp; &nbsp; &nbsp; $500.00<br>
&nbsp; &nbsp;equity:opening balances<br>
<br>
2016/1/5 farmer&#39;s market<br>
&nbsp; &nbsp;expenses:groceries &nbsp; &nbsp; $50.00<br>
&nbsp; &nbsp;Assets:checking<br>
<br>
<br>
<br>
<br>
<br>
</span>
<span class="c0">
Comments, directives, and/or transactions in any order</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3">
<span class="c10 c7">
; a comment<br>
<br>
2016/1/1 set opening balance<br>
&nbsp; &nbsp;assets:checking &nbsp; &nbsp; &nbsp; $500.00<br>
&nbsp; &nbsp;equity:opening balances<br>
<br>
2016/1/5 farmer&#39;s market<br>
&nbsp; &nbsp;expenses:groceries &nbsp; &nbsp; $50.00<br>
&nbsp; &nbsp;assets:checking</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
; a comment<br>
<br>
2016-01-01 open Assets:Checking<br>
2016-01-01 open Equity:Opening-Balances<br>
2016-01-01 open Expenses:Groceries<br>
<br>
2016-01-01 txn &quot;set opening balance&quot;<br>
&nbsp; &nbsp;Assets:Checking &nbsp; &nbsp; &nbsp; &nbsp; 500.00 USD<br>
&nbsp; &nbsp;Equity:Opening-Balances<br>
<br>
2016/1/5 txn &quot;farmer&#39;s market&quot;<br>
&nbsp; &nbsp;Expenses:Groceries &nbsp; &nbsp; 50 USD<br>
&nbsp; &nbsp;Assets:Checking<br>
<br>
</span>
<span class="c7">
All referenced accounts must have an open directive</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.1n05blr44u7c">
<span>
Comments</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
; comment<br>
# comment<br>
% comment<br>
| comment<br>
* comment and org-mode outline node<br>
<br>
</span>
<span class="c0">
Non-comment lines may end with a comment<br>
Indented comments are attached to the preceding transaction or posting</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3">
<span class="c10 c7">
; comment<br>
# comment<br>
* comment and org-mode outline node<br>
</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
; comment<br>
Any unrecognised line is also a comment<br>
<br>
<br>
<br>
<br>
</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.gij3l494xeth">
<span>
Basic transactions</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
DATE [DESCRIPTION]<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;AMOUNT<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;[AMOUNT]<br>
<br>
</span>
<span class="c0">
A transaction contains any number of indented postings (usually two), whose amounts must sum to zero<br>
At least two spaces required between account and amount<br>
The final amount is optional<br>
</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
DATE [DESCRIPTION]<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;AMOUNT<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;[AMOUNT]<br>
<br>
</span>
<span class="c0">
Same</span>
</p>
<p class="c3 c16">
<span class="c0">
</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
DATE txn [&quot;DESCRIPTION&quot;]<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;AMOUNT<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;[AMOUNT]<br>
<br>
</span>
<span class="c0">
DESCRIPTION must be in double quotes, can be multiline<br>
No need for two spaces between account and amount</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.xpr0dgy4pyj3">
<span>
Dates</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
YYYY-MM-DD<br>
YYYY/MM/DD<br>
YYYY.MM.DD<br>
MM-DD<br>
MM/DD<br>
MM.DD<br>
<br>
</span>
<span class="c7">
Other formats specified with</span>
<span class="c10 c7">
&nbsp;--input-date-format </span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3">
<span class="c10 c7">
YYYY-MM-DD<br>
YYYY/MM/DD<br>
YYYY.MM.DD<br>
MM-DD<br>
MM/DD<br>
MM.DD</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
YYYY-MM-DD<br>
YYYY/MM/DD<br>
YYYY.MM.DD<br>
<br>
<br>
<br>
<br>
</span>
<span class="c0">
Only YYYY-MM-DD with 8 digits is officially supported</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.n4b87oz9ku6t">
<span class="c12">
Account names</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
TOPACCT[:SUBACCT[:...]]<br>
<br>
Revenues:Salary<br>
liabilities:credit card:CITI 1234<br>
other assets:house<br>
<br>
</span>
<span class="c0">
Account names begin with a letter<br>
May contain single spaces<br>
May contain subaccounts separated by :</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
TOPACCT[:SUBACCT[:...]]<br>
<br>
<br>
<br>
<br>
<br>
</span>
<span class="c0">
Same</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
TOPACCT[:SUBACCT[:...]]<br>
<br>
Income:Salary<br>
Liabilities:CreditCard:CITI-1234<br>
Assets:House<br>
<br>
</span>
<span class="c7">
Top level account must be one of Assets, Liabilities, Equity, Income, Expenses<br>
Each subaccount must be capitalised<br>
Letters, digits and hyphen are allowed (no spaces)</span>
<span class="c10 c7">
&nbsp;</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.n4b87oz9ku6t-1">
<span class="c12">
Amounts</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
One of<br>
COMMODITY QUANTITY<br>
QUANTITY COMMODITY<br>
QUANTITY<br>
<br>
10<br>
$10.00<br>
1,000.0001 USD<br>
10 &quot;prepaid classes&quot;<br>
<br>
<br>
<br>
</span>
<span class="c7">
COMMODITY is a symbol, word or phrase; if it contains spaces or numbers, it must be in double quotes<br>
It can be on the left or right, with or without a separating space<br>
QUANTITY is a number with 0 or more decimal places<br>
Decimal point is </span>
<span class="c20 c7">
.</span>
<span class="c7">
<br>
Digits can be grouped into thousands by </span>
<span class="c20 c7">
,</span>
<span class="c0">
<br>
Amount styles influence the standard display style for each commodity</span>
</p>
<p class="c3 c16">
<span class="c0">
</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
One of<br>
COMMODITY QUANTITY<br>
QUANTITY COMMODITY<br>
QUANTITY<br>
<br>
10<br>
$10.00<br>
1,000.0001 USD<br>
10 &quot;prepaid classes&quot;<br>
1.000.000,01<br>
12,34,567.89<br>
<br>
</span>
<span class="c7">
Decimal point is </span>
<span class="c20 c7">
.</span>
<span class="c7">
&nbsp;or </span>
<span class="c20 c7 c26">
,</span>
</p>
<p class="c3">
<span class="c7">
Digit group separator is </span>
<span class="c7 c20">
,</span>
<span class="c7">
&nbsp;or </span>
<span class="c20 c7">
.</span>
<span class="c0">
<br>
Any digit grouping can be used, not just thousands</span>
</p>
<p class="c3 c16">
<span class="c0">
</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
QUANTITY COMMODITY<br>
<br>
<br>
<br>
<br>
10USD<br>
1000.0001 USD<br>
<br>
<br>
<br>
<br>
<br>
</span>
<span class="c7">
COMMODITY is all capital letters, on the right, and required</span>
<span class="c7 c11">
<br>
</span>
<span class="c7">
Decimal point must be </span>
<span class="c20 c7">
.</span>
<span class="c7">
<br>
Digit group separator </span>
<span class="c20 c7">
,</span>
<span class="c0">
&nbsp;is allowed and ignored</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.9xaw86fvi6s6">
<span class="c20 c30">
More transaction</span>
<span>
&nbsp;</span>
<span class="c12">
features</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
DATE [FLAG] [(CODE)] DESCRIPTION<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp;AMOUNT [PRICE] [=BAL]<br>
&nbsp; &nbsp;...<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp;[AMOUNT [PRICE] [=BAL]]<br>
<br>
</span>
<span class="c0">
FLAG (aka STATE) is empty, ! or * meaning uncleared, pending or cleared<br>
CODE is any string, in parentheses<br>
DESCRIPTION can be a payee name, narration, or both</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3">
<span class="c10 c7">
DATE [FLAG] [(CODE)] DESCRIPTION<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp;AMOUNT [PRICE] [=BAL]<br>
&nbsp; &nbsp;...<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp;AMOUNT [PRICE] [=BAL]</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
DATE [txn|FLAG] [[&quot;PAYEE&quot;] &quot;DESCRIPTION&quot;]<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp; &nbsp; &nbsp; AMOUNT [PRICES]<br>
&nbsp; &nbsp;...<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp; &nbsp; &nbsp; AMOUNT [PRICES]<br>
<br>
</span>
<span class="c7">
The txn keyword may be replaced by a FLAG<br>
For just a payee, use &quot;PAYEE&quot; &quot;&quot;<br>
</span>
<span class="c10 c7">
&nbsp;</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.d2g5xagy7h37">
<span class="c12">
Prices</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
One of<br>
@ UNITPRICE<br>
@@ TOTALPRICE<br>
and/or one of<br>
{LOTUNITPRICE}<br>
{=FIXEDLOTUNITPRICE}<br>
and/or<br>
[LOTDATE]<br>
<br>
</span>
<span class="c0">
A UNITPRICE or TOTALPRICE also records a market price on this date<br>
A LOTDATE is written in square brackets</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
One of<br>
@ FIXEDUNITPRICE<br>
@@ FIXEDTOTALPRICE<br>
and/or<br>
{=FIXEDLOTUNITPRICE}<br>
<br>
<br>
<br>
<br>
</span>
<span class="c0">
These do not record market prices<br>
The lot price syntax is ignored</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c17">
<span class="c11 c7">
{LOTUNITPRICE[ / LOTDATE]}<br>
and/or one of<br>
@ UNITPRICE<br>
@@ TOTALPRICE<br>
<br>
<br>
<br>
<br>
</span>
<span class="c0">
Lot prices are remembered and form distinct commodities, other prices are not<br>
If there is both a lot price and a regular price, the latter records a market price</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.mjrjnr996vfg">
<span class="c12">
Balance assertions</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
= AMOUNT (after posting amount &amp; price)<br>
<br>
2016-03-10<br>
&nbsp; &nbsp;Expenses:Food &nbsp; &nbsp; &nbsp;$20<br>
&nbsp; &nbsp;Assets:Cash &nbsp; &nbsp; &nbsp; $-20 = $80<br>
<br>
</span>
<span class="c0">
Asserts the balance in this commodity <br>
in this account, excluding subaccounts<br>
at this point in the parse order</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
= AMOUNT (after posting amount &amp; price)<br>
<br>
<br>
<br>
<br>
<br>
</span>
<span class="c0">
Asserts the balance in this commodity<br>
in this account, excluding subaccounts<br>
on this day. Same day events are processed in parse order</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c17">
<span class="c11 c7">
DATE balance ACCOUNT AMOUNT<br>
<br>
2014-08-09 balance Assets:Cash 562.00 USD<br>
2014-08-09 balance Assets:Cash 210.00 CAD<br>
<br>
</span>
<span class="c7">
Asserts the balance in this commodity<br>
in this account, including subaccounts<br>
at the start of this day</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.mjrjnr996vfg-2">
<span>
Balance assignments</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c10 c7">
= AMOUNT (no preceding posting amount)<br>
<br>
2012-03-10 Adjustment<br>
&nbsp; &nbsp;Assets:Cash &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= $50<br>
&nbsp; &nbsp;Expenses:Misc</span>
</p>
<p class="c3">
<span class="c11 c7">
<br>
</span>
<span class="c7">
Sets the posting amount so as to make the balance assertion true. (The other amountless posting allows the transaction to balance)</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3 c16">
<span class="c10 c7">
</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c17 c16">
<span class="c10 c7">
</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h4 class="c9" id="h.au5ysr0kfa">
<span class="c18">
Directives</span>
</h4>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3 c16">
<span class="c10 c7">
</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3 c16">
<span class="c10 c7">
</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c17 c16">
<span class="c10 c7">
</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.3v5cafffbbft">
<span class="c12">
account, open </span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c10 c7">
account ACCOUNT</span>
</p>
<p class="c3">
<span class="c11 c7">
&nbsp; &nbsp; [SUBDIRECTIVES]<br>
<br>
account Revenues:Salary<br>
account Expenses:Food:Chicken<br>
&nbsp; &nbsp;note chicken food expenses<br>
&nbsp; &nbsp;alias food<br>
&nbsp; &nbsp;payee ^(KFC|Popeyes)$<br>
&nbsp; &nbsp;check commodity == &quot;$&quot;<br>
&nbsp; &nbsp;assert commodity == &quot;$&quot;<br>
&nbsp; &nbsp;eval print(&quot;Hello!&quot;)<br>
&nbsp; &nbsp;default<br>
<br>
</span>
<span class="c7">
Gives more error checking with </span>
<span class="c11 c7">
--strict</span>
<span class="c7">
&nbsp;or </span>
<span class="c11 c7">
--pedantic<br>
</span>
<span class="c0">
Optional subdirectives do more stuff</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3 c16">
<span class="c10 c7">
</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c17">
<span class="c11 c7">
DATE open ACCOUNT [COMMODITY[,...]] [METHOD]<br>
<br>
2014-05-01 open Assets:Cash USD,CAD<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</span>
<span class="c0">
Every account posted to needs an open directive with prior date</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.22qss13648tb">
<span class="c12">
close</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3 c16">
<span class="c10 c7">
</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3 c16">
<span class="c10 c7">
</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c17">
<span class="c7 c10">
DATE close ACCOUNT</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.n9q16dsjsoye">
<span class="c12">
commodity </span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
commodity COMMODITY<br>
<br>
commodity EUR<br>
commodity $<br>
&nbsp; note American Dollars<br>
&nbsp; format $1,000.00<br>
&nbsp; nomarket<br>
&nbsp; default<br>
<br>
</span>
<span class="c7">
Gives more error checking with </span>
<span class="c11 c7">
--strict</span>
<span class="c7">
&nbsp;or </span>
<span class="c11 c7">
--pedantic<br>
</span>
<span class="c7">
Optional subdirectives do more stuff</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3 c16">
<span class="c10 c7">
</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c17">
<span class="c11 c7">
DATE commodity COMMODITY<br>
&nbsp; &nbsp;[METADATA]<br>
<br>
1867-01-01 commodity CAD<br>
&nbsp; &nbsp;name: &quot;Canadian Dollar&quot;<br>
&nbsp; &nbsp;asset-class: &quot;cash&quot;<br>
<br>
<br>
<br>
</span>
<span class="c0">
Attaches metadata to a commodity</span>
</p>
</td>
</tr>
<tr class="c2">
<td class="c14" colspan="1" rowspan="1">
<h5 class="c9" id="h.wya8r85tgqsx">
<span>
market price</span>
</h5>
</td>
<td class="c1" colspan="1" rowspan="1">
<p class="c3">
<span class="c10 c7">
P DATE TIME COMMODITY UNITPRICE<br>
<br>
P 2004/06/21 02:18:02 AAPL $32.91<br>
P 2004/06/21 02:18:02 AU $400.00</span>
</p>
<p class="c3">
<span class="c11 c7">
<br>
</span>
<span class="c0">
Used by -V and -X<br>
Also set by transaction prices</span>
</p>
</td>
<td class="c13" colspan="1" rowspan="1">
<p class="c3">
<span class="c11 c7">
P DATE COMMODITY UNITPRICE<br>
<br>
P 2015/8/9 GBP $1.55<br>
<br>
<br>
</span>
<span class="c0">
Used by -V</span>
</p>
</td>
<td class="c5" colspan="1" rowspan="1">
<p class="c17">
<span class="c11 c7">
DATE price COMMODITY AMOUNT<br>
<br>
2014-07-09 price USD &nbsp;1.08 CAD<br>
<br>
<br>
</span>
<span class="c0">
Also set by transaction prices</span>
</p>
</td>
</tr>
</tbody>
</table>
<p class="c17 c16">
<span class="c11">
</span>
</p>
<p>
<span>
</span>
</p>
<p>
<span>
</span>
</p>
<p>
<span>
</span>
</p>
<p>
<span>
</span>
</p>
<p>
<span>
</span>
</p>
<p>
<span>
</span>
</p>
<p>
<span>
</span>
</p>
<p>
<span>
</span>
</p>
<p>
<span>
</span>
</p>
</div>
</body>
</html>