;journal: in generated-transaction:/posting: tags, add a space before the value
This commit is contained in:
		
							parent
							
								
									40c089dcfc
								
							
						
					
					
						commit
						6dcddadd9f
					
				| @ -87,107 +87,107 @@ instance Show PeriodicTransaction where | |||||||
| -- | -- | ||||||
| -- >>> _ptgen "monthly from 2017/1 to 2017/4" | -- >>> _ptgen "monthly from 2017/1 to 2017/4" | ||||||
| -- 2017/01/01 | -- 2017/01/01 | ||||||
| --     ; generated-transaction:~ monthly from 2017/1 to 2017/4 | --     ; generated-transaction: ~ monthly from 2017/1 to 2017/4 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/02/01 | -- 2017/02/01 | ||||||
| --     ; generated-transaction:~ monthly from 2017/1 to 2017/4 | --     ; generated-transaction: ~ monthly from 2017/1 to 2017/4 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/03/01 | -- 2017/03/01 | ||||||
| --     ; generated-transaction:~ monthly from 2017/1 to 2017/4 | --     ; generated-transaction: ~ monthly from 2017/1 to 2017/4 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- | -- | ||||||
| -- >>> _ptgen "monthly from 2017/1 to 2017/5" | -- >>> _ptgen "monthly from 2017/1 to 2017/5" | ||||||
| -- 2017/01/01 | -- 2017/01/01 | ||||||
| --     ; generated-transaction:~ monthly from 2017/1 to 2017/5 | --     ; generated-transaction: ~ monthly from 2017/1 to 2017/5 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/02/01 | -- 2017/02/01 | ||||||
| --     ; generated-transaction:~ monthly from 2017/1 to 2017/5 | --     ; generated-transaction: ~ monthly from 2017/1 to 2017/5 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/03/01 | -- 2017/03/01 | ||||||
| --     ; generated-transaction:~ monthly from 2017/1 to 2017/5 | --     ; generated-transaction: ~ monthly from 2017/1 to 2017/5 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/04/01 | -- 2017/04/01 | ||||||
| --     ; generated-transaction:~ monthly from 2017/1 to 2017/5 | --     ; generated-transaction: ~ monthly from 2017/1 to 2017/5 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- | -- | ||||||
| -- >>> _ptgen "every 2nd day of month from 2017/02 to 2017/04" | -- >>> _ptgen "every 2nd day of month from 2017/02 to 2017/04" | ||||||
| -- 2017/01/02 | -- 2017/01/02 | ||||||
| --     ; generated-transaction:~ every 2nd day of month from 2017/02 to 2017/04 | --     ; generated-transaction: ~ every 2nd day of month from 2017/02 to 2017/04 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/02/02 | -- 2017/02/02 | ||||||
| --     ; generated-transaction:~ every 2nd day of month from 2017/02 to 2017/04 | --     ; generated-transaction: ~ every 2nd day of month from 2017/02 to 2017/04 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/03/02 | -- 2017/03/02 | ||||||
| --     ; generated-transaction:~ every 2nd day of month from 2017/02 to 2017/04 | --     ; generated-transaction: ~ every 2nd day of month from 2017/02 to 2017/04 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- | -- | ||||||
| -- >>> _ptgen "every 30th day of month from 2017/1 to 2017/5" | -- >>> _ptgen "every 30th day of month from 2017/1 to 2017/5" | ||||||
| -- 2016/12/30 | -- 2016/12/30 | ||||||
| --     ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5 | --     ; generated-transaction: ~ every 30th day of month from 2017/1 to 2017/5 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/01/30 | -- 2017/01/30 | ||||||
| --     ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5 | --     ; generated-transaction: ~ every 30th day of month from 2017/1 to 2017/5 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/02/28 | -- 2017/02/28 | ||||||
| --     ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5 | --     ; generated-transaction: ~ every 30th day of month from 2017/1 to 2017/5 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/03/30 | -- 2017/03/30 | ||||||
| --     ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5 | --     ; generated-transaction: ~ every 30th day of month from 2017/1 to 2017/5 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/04/30 | -- 2017/04/30 | ||||||
| --     ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5 | --     ; generated-transaction: ~ every 30th day of month from 2017/1 to 2017/5 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- | -- | ||||||
| -- >>> _ptgen "every 2nd Thursday of month from 2017/1 to 2017/4" | -- >>> _ptgen "every 2nd Thursday of month from 2017/1 to 2017/4" | ||||||
| -- 2016/12/08 | -- 2016/12/08 | ||||||
| --     ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4 | --     ; generated-transaction: ~ every 2nd Thursday of month from 2017/1 to 2017/4 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/01/12 | -- 2017/01/12 | ||||||
| --     ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4 | --     ; generated-transaction: ~ every 2nd Thursday of month from 2017/1 to 2017/4 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/02/09 | -- 2017/02/09 | ||||||
| --     ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4 | --     ; generated-transaction: ~ every 2nd Thursday of month from 2017/1 to 2017/4 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/03/09 | -- 2017/03/09 | ||||||
| --     ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4 | --     ; generated-transaction: ~ every 2nd Thursday of month from 2017/1 to 2017/4 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- | -- | ||||||
| -- >>> _ptgen "every nov 29th from 2017 to 2019" | -- >>> _ptgen "every nov 29th from 2017 to 2019" | ||||||
| -- 2016/11/29 | -- 2016/11/29 | ||||||
| --     ; generated-transaction:~ every nov 29th from 2017 to 2019 | --     ; generated-transaction: ~ every nov 29th from 2017 to 2019 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2017/11/29 | -- 2017/11/29 | ||||||
| --     ; generated-transaction:~ every nov 29th from 2017 to 2019 | --     ; generated-transaction: ~ every nov 29th from 2017 to 2019 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2018/11/29 | -- 2018/11/29 | ||||||
| --     ; generated-transaction:~ every nov 29th from 2017 to 2019 | --     ; generated-transaction: ~ every nov 29th from 2017 to 2019 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- | -- | ||||||
| -- >>> _ptgen "2017/1" | -- >>> _ptgen "2017/1" | ||||||
| -- 2017/01/01 | -- 2017/01/01 | ||||||
| --     ; generated-transaction:~ 2017/1 | --     ; generated-transaction: ~ 2017/1 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- | -- | ||||||
| @ -214,21 +214,21 @@ instance Show PeriodicTransaction where | |||||||
| --   | --   | ||||||
| -- >>> _ptgenspan "every 3 months from 2019-05" (mkdatespan "2020-02-01" "2020-03-01") | -- >>> _ptgenspan "every 3 months from 2019-05" (mkdatespan "2020-02-01" "2020-03-01") | ||||||
| -- 2020/02/01 | -- 2020/02/01 | ||||||
| --     ; generated-transaction:~ every 3 months from 2019-05 | --     ; generated-transaction: ~ every 3 months from 2019-05 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- >>> _ptgenspan "every 3 days from 2018" (mkdatespan "2018-01-01" "2018-01-05") | -- >>> _ptgenspan "every 3 days from 2018" (mkdatespan "2018-01-01" "2018-01-05") | ||||||
| -- 2018/01/01 | -- 2018/01/01 | ||||||
| --     ; generated-transaction:~ every 3 days from 2018 | --     ; generated-transaction: ~ every 3 days from 2018 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- 2018/01/04 | -- 2018/01/04 | ||||||
| --     ; generated-transaction:~ every 3 days from 2018 | --     ; generated-transaction: ~ every 3 days from 2018 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- >>> _ptgenspan "every 3 days from 2018" (mkdatespan "2018-01-02" "2018-01-05") | -- >>> _ptgenspan "every 3 days from 2018" (mkdatespan "2018-01-02" "2018-01-05") | ||||||
| -- 2018/01/04 | -- 2018/01/04 | ||||||
| --     ; generated-transaction:~ every 3 days from 2018 | --     ; generated-transaction: ~ every 3 days from 2018 | ||||||
| --     a           $1.00 | --     a           $1.00 | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -372,18 +372,20 @@ commentJoin c1 c2 | |||||||
|   | otherwise = c1 <> ", " <> c2 |   | otherwise = c1 <> ", " <> c2 | ||||||
| 
 | 
 | ||||||
| -- | Add a tag to a comment, comma-separated from any prior content. | -- | Add a tag to a comment, comma-separated from any prior content. | ||||||
|  | -- A space is inserted following the colon, before the value. | ||||||
| commentAddTag :: Text -> Tag -> Text | commentAddTag :: Text -> Tag -> Text | ||||||
| commentAddTag c (t,v) | commentAddTag c (t,v) | ||||||
|   | T.null c' = tag |   | T.null c' = tag | ||||||
|   | otherwise = c' `commentJoin` tag |   | otherwise = c' `commentJoin` tag | ||||||
|   where |   where | ||||||
|     c'  = textchomp c |     c'  = textchomp c | ||||||
|     tag = t <> ":" <> v |     tag = t <> ": " <> v | ||||||
| 
 | 
 | ||||||
| -- | Add a tag on its own line to a comment, preserving any prior content. | -- | Add a tag on its own line to a comment, preserving any prior content. | ||||||
|  | -- A space is inserted following the colon, before the value. | ||||||
| commentAddTagNextLine :: Text -> Tag -> Text | commentAddTagNextLine :: Text -> Tag -> Text | ||||||
| commentAddTagNextLine cmt (t,v) = | commentAddTagNextLine cmt (t,v) = | ||||||
|   cmt <> if "\n" `T.isSuffixOf` cmt then "" else "\n" <> t <> ":" <> v  |   cmt <> if "\n" `T.isSuffixOf` cmt then "" else "\n" <> t <> ": " <> v  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| -- tests | -- tests | ||||||
| @ -417,13 +419,13 @@ tests_Posting = tests "Posting" [ | |||||||
|   ] |   ] | ||||||
| 
 | 
 | ||||||
|  ,tests "commentAddTag" [ |  ,tests "commentAddTag" [ | ||||||
|     commentAddTag "" ("a","") `is` "a:" |     commentAddTag "" ("a","") `is` "a: " | ||||||
|    ,commentAddTag "[1/2]" ("a","") `is` "[1/2], a:" |    ,commentAddTag "[1/2]" ("a","") `is` "[1/2], a: " | ||||||
|   ] |   ] | ||||||
| 
 | 
 | ||||||
|  ,tests "commentAddTagNextLine" [ |  ,tests "commentAddTagNextLine" [ | ||||||
|     commentAddTagNextLine "" ("a","") `is` "\na:" |     commentAddTagNextLine "" ("a","") `is` "\na: " | ||||||
|    ,commentAddTagNextLine "[1/2]" ("a","") `is` "[1/2]\na:" |    ,commentAddTagNextLine "[1/2]" ("a","") `is` "[1/2]\na: " | ||||||
|   ] |   ] | ||||||
|  ] |  ] | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -57,7 +57,7 @@ modifyTransactions tmods = map applymods | |||||||
| -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]} | -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]} | ||||||
| -- 0000/01/01 | -- 0000/01/01 | ||||||
| --     ping           $1.00 | --     ping           $1.00 | ||||||
| --     pong           $2.00  ; generated-posting:= | --     pong           $2.00  ; generated-posting: = | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "miss" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]} | -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "miss" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]} | ||||||
| -- 0000/01/01 | -- 0000/01/01 | ||||||
| @ -66,7 +66,7 @@ modifyTransactions tmods = map applymods | |||||||
| -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "ping" ["pong" `post` amount{aismultiplier=True, aquantity=3}]) nulltransaction{tpostings=["ping" `post` usd 2]} | -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "ping" ["pong" `post` amount{aismultiplier=True, aquantity=3}]) nulltransaction{tpostings=["ping" `post` usd 2]} | ||||||
| -- 0000/01/01 | -- 0000/01/01 | ||||||
| --     ping           $2.00 | --     ping           $2.00 | ||||||
| --     pong           $6.00  ; generated-posting:= ping | --     pong           $6.00  ; generated-posting: = ping | ||||||
| -- <BLANKLINE> | -- <BLANKLINE> | ||||||
| -- | -- | ||||||
| transactionModifierToFunction :: TransactionModifier -> (Transaction -> Transaction) | transactionModifierToFunction :: TransactionModifier -> (Transaction -> Transaction) | ||||||
|  | |||||||
| @ -51,7 +51,7 @@ hledger print -b 2016-11 -e 2017-02 -f - --forecast | |||||||
|     assets:cash |     assets:cash | ||||||
| 
 | 
 | ||||||
| 2017/01/01 * marked cleared, and with a description | 2017/01/01 * marked cleared, and with a description | ||||||
|     ; generated-transaction:~ monthly from 2016/1 |     ; generated-transaction: ~ monthly from 2016/1 | ||||||
|     income                    $-1000 |     income                    $-1000 | ||||||
|     expenses:food                $20 |     expenses:food                $20 | ||||||
|     expenses:leisure             $15 |     expenses:leisure             $15 | ||||||
| @ -118,7 +118,7 @@ Y 2000 | |||||||
| 
 | 
 | ||||||
| >>> | >>> | ||||||
| 2000/02/01 forecast | 2000/02/01 forecast | ||||||
|     ; generated-transaction:~ 2/1 |     ; generated-transaction: ~ 2/1 | ||||||
| 
 | 
 | ||||||
| >>>2 | >>>2 | ||||||
| >>>=0 | >>>=0 | ||||||
| @ -135,7 +135,7 @@ Y 2000 | |||||||
| 
 | 
 | ||||||
| >>> | >>> | ||||||
| 2000/01/15 forecast | 2000/01/15 forecast | ||||||
|     ; generated-transaction:~ 15 |     ; generated-transaction: ~ 15 | ||||||
| 
 | 
 | ||||||
| >>>2 | >>>2 | ||||||
| >>>=0 | >>>=0 | ||||||
| @ -152,7 +152,7 @@ Y 2000 | |||||||
| 
 | 
 | ||||||
| >>> | >>> | ||||||
| 2000/02/01 forecast | 2000/02/01 forecast | ||||||
|     ; generated-transaction:~ next month |     ; generated-transaction: ~ next month | ||||||
| 
 | 
 | ||||||
| >>>2 | >>>2 | ||||||
| >>>=0 | >>>=0 | ||||||
|  | |||||||
| @ -17,9 +17,9 @@ | |||||||
| $ hledger print -f- --auto | $ hledger print -f- --auto | ||||||
| 2016/01/01 paycheck  ; modified: | 2016/01/01 paycheck  ; modified: | ||||||
|     income:remuneration           $-100 |     income:remuneration           $-100 | ||||||
|     (liabilities:tax)              $-33  ; income tax, generated-posting:= ^income |     (liabilities:tax)              $-33  ; income tax, generated-posting: = ^income | ||||||
|     income:donations               $-15 |     income:donations               $-15 | ||||||
|     (liabilities:tax)               $-5  ; income tax, generated-posting:= ^income |     (liabilities:tax)               $-5  ; income tax, generated-posting: = ^income | ||||||
|     assets:bank |     assets:bank | ||||||
| 
 | 
 | ||||||
| 2016/01/01 withdraw | 2016/01/01 withdraw | ||||||
| @ -82,8 +82,8 @@ $ hledger register -f- --auto | |||||||
| $ hledger print -f- --auto | $ hledger print -f- --auto | ||||||
| 2018/10/07 * MARKET  ; modified: | 2018/10/07 * MARKET  ; modified: | ||||||
|     expenses:groceries:food |     expenses:groceries:food | ||||||
|     [budget:groceries]                 $-20  ; generated-posting:= ^expenses:groceries |     [budget:groceries]                 $-20  ; generated-posting: = ^expenses:groceries | ||||||
|     [assets:bank:checking]              $20  ; generated-posting:= ^expenses:groceries |     [assets:bank:checking]              $20  ; generated-posting: = ^expenses:groceries | ||||||
|     assets:bank:checking               $-20 |     assets:bank:checking               $-20 | ||||||
| 
 | 
 | ||||||
| >= | >= | ||||||
| @ -101,8 +101,8 @@ $ hledger print -f- --auto | |||||||
| $ hledger -f- print --auto -x | $ hledger -f- print --auto -x | ||||||
| 2018/01/01  ; modified: | 2018/01/01  ; modified: | ||||||
|     (assets:billable:client1)     0.50h @ $90 |     (assets:billable:client1)     0.50h @ $90 | ||||||
|     assets:receivable:client1    50.00h @ $90  ; generated-posting:= assets:billable:client1 |     assets:receivable:client1    50.00h @ $90  ; generated-posting: = assets:billable:client1 | ||||||
|     revenues:client1                   $-4500  ; generated-posting:= assets:billable:client1 |     revenues:client1                   $-4500  ; generated-posting: = assets:billable:client1 | ||||||
| 
 | 
 | ||||||
| >= | >= | ||||||
| 
 | 
 | ||||||
| @ -119,8 +119,8 @@ $ hledger -f- print --auto -x | |||||||
| $ hledger -f- print --auto -x | $ hledger -f- print --auto -x | ||||||
| 2018/01/01  ; modified: | 2018/01/01  ; modified: | ||||||
|     (assets:billable:client1)           0.50h |     (assets:billable:client1)           0.50h | ||||||
|     assets:receivable:client1             $50  ; generated-posting:= assets:billable:client1 |     assets:receivable:client1             $50  ; generated-posting: = assets:billable:client1 | ||||||
|     revenues:client1                     $-50  ; generated-posting:= assets:billable:client1 |     revenues:client1                     $-50  ; generated-posting: = assets:billable:client1 | ||||||
| 
 | 
 | ||||||
| >= | >= | ||||||
| 
 | 
 | ||||||
| @ -137,8 +137,8 @@ $ hledger -f- print --auto -x | |||||||
| $ hledger -f- print --auto -x | $ hledger -f- print --auto -x | ||||||
| 2018/01/01  ; modified: | 2018/01/01  ; modified: | ||||||
|     (assets:billable:client1)                       0.50h @ $90 |     (assets:billable:client1)                       0.50h @ $90 | ||||||
|     assets:receivable:client1    0.50 "Client1 Hours" @ $100.00  ; generated-posting:= assets:billable:client1 |     assets:receivable:client1    0.50 "Client1 Hours" @ $100.00  ; generated-posting: = assets:billable:client1 | ||||||
|     revenues:client1                                    $-50.00  ; generated-posting:= assets:billable:client1 |     revenues:client1                                    $-50.00  ; generated-posting: = assets:billable:client1 | ||||||
| 
 | 
 | ||||||
| >= | >= | ||||||
| 
 | 
 | ||||||
| @ -182,9 +182,9 @@ $ hledger print -f- --auto | |||||||
| $ hledger -f- print --auto | $ hledger -f- print --auto | ||||||
| 2018/01/01  ; modified: | 2018/01/01  ; modified: | ||||||
|     Expenses:Joint:Widgets     $100.00 @ £0.50 |     Expenses:Joint:Widgets     $100.00 @ £0.50 | ||||||
|     Expenses:Joint            $-100.00 @ £0.50  ; generated-posting:= ^Expenses:Joint |     Expenses:Joint            $-100.00 @ £0.50  ; generated-posting: = ^Expenses:Joint | ||||||
|     Liabilities:Joint:Bob       $50.00 @ £0.50  ; generated-posting:= ^Expenses:Joint |     Liabilities:Joint:Bob       $50.00 @ £0.50  ; generated-posting: = ^Expenses:Joint | ||||||
|     Liabilities:Joint:Bill      $50.00 @ £0.50  ; generated-posting:= ^Expenses:Joint |     Liabilities:Joint:Bill      $50.00 @ £0.50  ; generated-posting: = ^Expenses:Joint | ||||||
|     Assets:Joint:Bank                  £-50.00 |     Assets:Joint:Bank                  £-50.00 | ||||||
| 
 | 
 | ||||||
| >=0 | >=0 | ||||||
| @ -204,9 +204,9 @@ $ hledger -f- print --auto | |||||||
| $ hledger -f- print --auto | $ hledger -f- print --auto | ||||||
| 2018/01/01  ; modified: | 2018/01/01  ; modified: | ||||||
|     Expenses:Joint:Widgets     $100.00 @@ £50 |     Expenses:Joint:Widgets     $100.00 @@ £50 | ||||||
|     Expenses:Joint            $-100.00 @@ £50  ; generated-posting:= ^Expenses:Joint |     Expenses:Joint            $-100.00 @@ £50  ; generated-posting: = ^Expenses:Joint | ||||||
|     Liabilities:Joint:Bob       $50.00 @@ £25  ; generated-posting:= ^Expenses:Joint |     Liabilities:Joint:Bob       $50.00 @@ £25  ; generated-posting: = ^Expenses:Joint | ||||||
|     Liabilities:Joint:Bill      $50.00 @@ £25  ; generated-posting:= ^Expenses:Joint |     Liabilities:Joint:Bill      $50.00 @@ £25  ; generated-posting: = ^Expenses:Joint | ||||||
|     Assets:Joint:Bank                 £-50.00 |     Assets:Joint:Bank                 £-50.00 | ||||||
| 
 | 
 | ||||||
| >=0 | >=0 | ||||||
| @ -233,9 +233,9 @@ $ hledger -f- print --auto | |||||||
| $ hledger -f- print --auto | $ hledger -f- print --auto | ||||||
| 2018/01/01  ; modified: | 2018/01/01  ; modified: | ||||||
|     Expenses:Joint:Widgets            $100.00 |     Expenses:Joint:Widgets            $100.00 | ||||||
|     Expenses:Joint            $-100.00 @@ £50  ; generated-posting:= ^Expenses:Joint |     Expenses:Joint            $-100.00 @@ £50  ; generated-posting: = ^Expenses:Joint | ||||||
|     Liabilities:Joint:Bob       $50.00 @@ £25  ; generated-posting:= ^Expenses:Joint |     Liabilities:Joint:Bob       $50.00 @@ £25  ; generated-posting: = ^Expenses:Joint | ||||||
|     Liabilities:Joint:Bill      $50.00 @@ £25  ; generated-posting:= ^Expenses:Joint |     Liabilities:Joint:Bill      $50.00 @@ £25  ; generated-posting: = ^Expenses:Joint | ||||||
|     Assets:Joint:Bank                 £-50.00 |     Assets:Joint:Bank                 £-50.00 | ||||||
| 
 | 
 | ||||||
| >=0 | >=0 | ||||||
| @ -264,11 +264,11 @@ $ hledger print -f- --auto --forecast -b 2016-01 -e 2016-03 | |||||||
|     assets:bank |     assets:bank | ||||||
| 
 | 
 | ||||||
| 2016/02/01 paycheck | 2016/02/01 paycheck | ||||||
|     ; generated-transaction:~ monthly from 2016-01, modified: |     ; generated-transaction: ~ monthly from 2016-01, modified:  | ||||||
|     income:remuneration           $-100 |     income:remuneration           $-100 | ||||||
|     (liabilities:tax)              $-33  ; income tax, generated-posting:= ^income |     (liabilities:tax)              $-33  ; income tax, generated-posting: = ^income | ||||||
|     income:donations               $-15 |     income:donations               $-15 | ||||||
|     (liabilities:tax)               $-5  ; income tax, generated-posting:= ^income |     (liabilities:tax)               $-5  ; income tax, generated-posting: = ^income | ||||||
|     assets:bank |     assets:bank | ||||||
| 
 | 
 | ||||||
| >= | >= | ||||||
| @ -280,7 +280,7 @@ $ hledger print -f- --forecast -b 2016-01 -e 2016-03 | |||||||
|     assets:bank |     assets:bank | ||||||
| 
 | 
 | ||||||
| 2016/02/01 paycheck | 2016/02/01 paycheck | ||||||
|     ; generated-transaction:~ monthly from 2016-01 |     ; generated-transaction: ~ monthly from 2016-01 | ||||||
|     income:remuneration           $-100 |     income:remuneration           $-100 | ||||||
|     income:donations               $-15 |     income:donations               $-15 | ||||||
|     assets:bank |     assets:bank | ||||||
|  | |||||||
| @ -87,7 +87,7 @@ D $1000. | |||||||
| >>> | >>> | ||||||
| 2018/01/01  ; modified: | 2018/01/01  ; modified: | ||||||
|     (a)              €1 |     (a)              €1 | ||||||
|     (b)              €2  ; generated-posting:= a |     (b)              €2  ; generated-posting: = a | ||||||
| 
 | 
 | ||||||
| >>>= | >>>= | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -12,9 +12,9 @@ hledger rewrite -f- ^income --add-posting '(liabilities:tax)  *.33  ; income tax | |||||||
| >>> | >>> | ||||||
| 2016/01/01 paycheck  ; modified: | 2016/01/01 paycheck  ; modified: | ||||||
|     income:remuneration           $-100 |     income:remuneration           $-100 | ||||||
|     (liabilities:tax)              $-33  ; income tax, generated-posting:= ^income |     (liabilities:tax)              $-33  ; income tax, generated-posting: = ^income | ||||||
|     income:donations               $-15 |     income:donations               $-15 | ||||||
|     (liabilities:tax)               $-5  ; income tax, generated-posting:= ^income |     (liabilities:tax)               $-5  ; income tax, generated-posting: = ^income | ||||||
|     assets:bank |     assets:bank | ||||||
| 
 | 
 | ||||||
| 2016/01/01 withdraw | 2016/01/01 withdraw | ||||||
| @ -43,7 +43,7 @@ hledger rewrite -f- expenses:gifts --add-posting '(budget:gifts)  *-1' | |||||||
| 2016/01/01 gift  ; modified: | 2016/01/01 gift  ; modified: | ||||||
|     assets:cash               $-15 |     assets:cash               $-15 | ||||||
|     expenses:gifts      ; [1/2] |     expenses:gifts      ; [1/2] | ||||||
|     (budget:gifts)            $-15  ; [2016/01/02], generated-posting:= expenses:gifts |     (budget:gifts)            $-15  ; [2016/01/02], generated-posting: = expenses:gifts | ||||||
| 
 | 
 | ||||||
| >>>2 | >>>2 | ||||||
| >>>=0 | >>>=0 | ||||||
| @ -69,15 +69,15 @@ hledger rewrite -f- | |||||||
| >>> | >>> | ||||||
| 2017/04/24 * 09:00-09:25  ; modified: | 2017/04/24 * 09:00-09:25  ; modified: | ||||||
|     (assets:unbilled:client1)           0.42h |     (assets:unbilled:client1)           0.42h | ||||||
|     (assets:to bill:client1)        42.00 CAD  ; generated-posting:= ^assets:unbilled:client1 |     (assets:to bill:client1)        42.00 CAD  ; generated-posting: = ^assets:unbilled:client1 | ||||||
| 
 | 
 | ||||||
| 2017/04/25 * 10:00-11:15  ; modified: | 2017/04/25 * 10:00-11:15  ; modified: | ||||||
|     (assets:unbilled:client1)           1.25h |     (assets:unbilled:client1)           1.25h | ||||||
|     (assets:to bill:client1)       125.00 CAD  ; generated-posting:= ^assets:unbilled:client1 |     (assets:to bill:client1)       125.00 CAD  ; generated-posting: = ^assets:unbilled:client1 | ||||||
| 
 | 
 | ||||||
| 2017/04/25 * 14:00-15:32  ; modified: | 2017/04/25 * 14:00-15:32  ; modified: | ||||||
|     (assets:unbilled:client2)           1.54h |     (assets:unbilled:client2)           1.54h | ||||||
|     (assets:to bill:client2)       231.00 CAD  ; generated-posting:= ^assets:unbilled:client2 |     (assets:to bill:client2)       231.00 CAD  ; generated-posting: = ^assets:unbilled:client2 | ||||||
| 
 | 
 | ||||||
| >>>2 | >>>2 | ||||||
| >>>=0 | >>>=0 | ||||||
| @ -106,18 +106,18 @@ hledger rewrite -f- -B | |||||||
| >>> | >>> | ||||||
| 2017/04/24 * 09:00-09:25  ; modified: | 2017/04/24 * 09:00-09:25  ; modified: | ||||||
|     (assets:unbilled:client1)           0.42h |     (assets:unbilled:client1)           0.42h | ||||||
|     assets:to bill:client1             $42.00  ; generated-posting:= ^assets:unbilled:client1 |     assets:to bill:client1             $42.00  ; generated-posting: = ^assets:unbilled:client1 | ||||||
|     income:consulting:client1      ; generated-posting:= ^assets:unbilled:client1 |     income:consulting:client1      ; generated-posting: = ^assets:unbilled:client1 | ||||||
| 
 | 
 | ||||||
| 2017/04/25 * 10:00-11:15  ; modified: | 2017/04/25 * 10:00-11:15  ; modified: | ||||||
|     (assets:unbilled:client1)           1.25h |     (assets:unbilled:client1)           1.25h | ||||||
|     assets:to bill:client1            $125.00  ; generated-posting:= ^assets:unbilled:client1 |     assets:to bill:client1            $125.00  ; generated-posting: = ^assets:unbilled:client1 | ||||||
|     income:consulting:client1      ; generated-posting:= ^assets:unbilled:client1 |     income:consulting:client1      ; generated-posting: = ^assets:unbilled:client1 | ||||||
| 
 | 
 | ||||||
| 2017/04/25 * 14:00-15:32  ; modified: | 2017/04/25 * 14:00-15:32  ; modified: | ||||||
|     (assets:unbilled:client2)           1.54h |     (assets:unbilled:client2)           1.54h | ||||||
|     assets:to bill:client2            $231.00  ; generated-posting:= ^assets:unbilled:client2 |     assets:to bill:client2            $231.00  ; generated-posting: = ^assets:unbilled:client2 | ||||||
|     income:consulting:client2      ; generated-posting:= ^assets:unbilled:client2 |     income:consulting:client2      ; generated-posting: = ^assets:unbilled:client2 | ||||||
| 
 | 
 | ||||||
| >>>2 | >>>2 | ||||||
| >>>=0 | >>>=0 | ||||||
| @ -142,14 +142,14 @@ hledger rewrite -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee  $5'  - | |||||||
| 2016/01/01 withdraw  ; modified: | 2016/01/01 withdraw  ; modified: | ||||||
|     assets:cash              $20 |     assets:cash              $20 | ||||||
|     assets:bank |     assets:bank | ||||||
|     expenses:fee              $5  ; generated-posting:= assets:bank and amt:<0 |     expenses:fee              $5  ; generated-posting: = assets:bank and amt:<0 | ||||||
|     assets:bank              $-5  ; generated-posting:= assets:bank and amt:<0 |     assets:bank              $-5  ; generated-posting: = assets:bank and amt:<0 | ||||||
| 
 | 
 | ||||||
| 2016/01/02 withdraw  ; modified: | 2016/01/02 withdraw  ; modified: | ||||||
|     assets:cash |     assets:cash | ||||||
|     assets:bank             $-30 |     assets:bank             $-30 | ||||||
|     expenses:fee              $5  ; generated-posting:= assets:bank and amt:<0 |     expenses:fee              $5  ; generated-posting: = assets:bank and amt:<0 | ||||||
|     assets:bank              $-5  ; generated-posting:= assets:bank and amt:<0 |     assets:bank              $-5  ; generated-posting: = assets:bank and amt:<0 | ||||||
| 
 | 
 | ||||||
| >>>2 | >>>2 | ||||||
| >>>=0 | >>>=0 | ||||||
| @ -190,30 +190,30 @@ hledger rewrite -f- date:2017/1  --add-posting 'Here comes Santa  $0' | |||||||
| >>> | >>> | ||||||
| 2016/12/31  ; modified: | 2016/12/31  ; modified: | ||||||
|     expenses:housing         $600.00 |     expenses:housing         $600.00 | ||||||
|     (budget:housing)        $-600.00  ; generated-posting:= ^expenses:housing |     (budget:housing)        $-600.00  ; generated-posting: = ^expenses:housing | ||||||
|     assets:cash |     assets:cash | ||||||
| 
 | 
 | ||||||
| 2017/01/01  ; modified: | 2017/01/01  ; modified: | ||||||
|     expenses:food             $20.00 |     expenses:food             $20.00 | ||||||
|     (budget:food)            $-20.00  ; generated-posting:= ^expenses:grocery ^expenses:food |     (budget:food)            $-20.00  ; generated-posting: = ^expenses:grocery ^expenses:food | ||||||
|     Here comes Santa               0  ; generated-posting:= date:2017/1 |     Here comes Santa               0  ; generated-posting: = date:2017/1 | ||||||
|     expenses:leisure          $15.00 |     expenses:leisure          $15.00 | ||||||
|     (budget:misc)            $-15.00  ; generated-posting:= ^expenses not:housing not:grocery not:food |     (budget:misc)            $-15.00  ; generated-posting: = ^expenses not:housing not:grocery not:food | ||||||
|     Here comes Santa               0  ; generated-posting:= date:2017/1 |     Here comes Santa               0  ; generated-posting: = date:2017/1 | ||||||
|     expenses:grocery          $30.00 |     expenses:grocery          $30.00 | ||||||
|     (budget:food)            $-30.00  ; generated-posting:= ^expenses:grocery ^expenses:food |     (budget:food)            $-30.00  ; generated-posting: = ^expenses:grocery ^expenses:food | ||||||
|     Here comes Santa               0  ; generated-posting:= date:2017/1 |     Here comes Santa               0  ; generated-posting: = date:2017/1 | ||||||
|     assets:cash |     assets:cash | ||||||
|     Here comes Santa               0  ; generated-posting:= date:2017/1 |     Here comes Santa               0  ; generated-posting: = date:2017/1 | ||||||
| 
 | 
 | ||||||
| 2017/01/02  ; modified: | 2017/01/02  ; modified: | ||||||
|     assets:cash              $200.00 |     assets:cash              $200.00 | ||||||
|     Here comes Santa               0  ; generated-posting:= date:2017/1 |     Here comes Santa               0  ; generated-posting: = date:2017/1 | ||||||
|     assets:bank |     assets:bank | ||||||
|     assets:bank               $-1.60  ; generated-posting:= ^assets:bank$ date:2017/1 amt:<0 |     assets:bank               $-1.60  ; generated-posting: = ^assets:bank$ date:2017/1 amt:<0 | ||||||
|     expenses:fee               $1.60  ; cash withdraw fee, generated-posting:= ^assets:bank$ date:2017/1 amt:<0 |     expenses:fee               $1.60  ; cash withdraw fee, generated-posting: = ^assets:bank$ date:2017/1 amt:<0 | ||||||
|     (budget:misc)             $-1.60  ; generated-posting:= ^expenses not:housing not:grocery not:food |     (budget:misc)             $-1.60  ; generated-posting: = ^expenses not:housing not:grocery not:food | ||||||
|     Here comes Santa               0  ; generated-posting:= date:2017/1 |     Here comes Santa               0  ; generated-posting: = date:2017/1 | ||||||
| 
 | 
 | ||||||
| 2017/02/01 | 2017/02/01 | ||||||
|     assets:cash         $100.00 |     assets:cash         $100.00 | ||||||
| @ -240,14 +240,14 @@ hledger rewrite --diff -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee | |||||||
| +2016/01/01 withdraw  ; modified: | +2016/01/01 withdraw  ; modified: | ||||||
|      assets:cash              $20 |      assets:cash              $20 | ||||||
|      assets:bank |      assets:bank | ||||||
| +    expenses:fee              $5  ; generated-posting:= assets:bank and amt:<0 | +    expenses:fee              $5  ; generated-posting: = assets:bank and amt:<0 | ||||||
| +    assets:bank              $-5  ; generated-posting:= assets:bank and amt:<0 | +    assets:bank              $-5  ; generated-posting: = assets:bank and amt:<0 | ||||||
| @@ -5,3 +7,5 @@ | @@ -5,3 +7,5 @@ | ||||||
| -2016/01/02 withdraw | -2016/01/02 withdraw | ||||||
| +2016/01/02 withdraw  ; modified: | +2016/01/02 withdraw  ; modified: | ||||||
|      assets:cash |      assets:cash | ||||||
|      assets:bank             $-30 |      assets:bank             $-30 | ||||||
| +    expenses:fee              $5  ; generated-posting:= assets:bank and amt:<0 | +    expenses:fee              $5  ; generated-posting: = assets:bank and amt:<0 | ||||||
| +    assets:bank              $-5  ; generated-posting:= assets:bank and amt:<0 | +    assets:bank              $-5  ; generated-posting: = assets:bank and amt:<0 | ||||||
| >>>2 | >>>2 | ||||||
| >>>=0 | >>>=0 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user