import2ledger/tests/data/templates.ini
Brett Smith eb329e92a0 ledger_entry: Only try to balance entry amounts when necessary.
This gives template authors the ability to write entries that
balance something other than the "main" amount.
2019-07-29 14:52:02 -04:00

81 lines
1.6 KiB
INI

[DEFAULT]
date_format = %%Y-%%m-%%d
signed_currencies = USD, CAD
signed_currency_format = ¤#,##0.###
unsigned_currency_format = #,##0.### ¤¤
[Simplest]
template = Accrued:Accounts Receivable {amount}
Income:Donations -{amount}
[FiftyFifty]
template =
Accrued:Accounts Receivable {amount}
Income:Donations -.5 * {amount}
Income:Sales -.5*{amount}
[Complex]
template =
;Tag: Value
;TransactionID: {txid}
Accrued:Accounts Receivable {amount}
;Entity: Supplier
Income:Donations:{program} -.955* {amount}
;Program: {program}
;Entity: {entity}
Income:Donations:General -.045 * {amount}
;Entity: {entity}
[Multivalue]
template =
Expenses:Taxes {tax}
;TaxAuthority: IRS
Accrued:Accounts Receivable {amount} - {tax}
Income:RBI -.1*{amount}
Income:Donations -.9*{amount}
[Custom Payee]
template = {custom_date} {payee} - Custom
Accrued:Accounts Receivable {amount}
Income:Donations -{amount}
[Multisplit]
template =
Assets:Cash {amount}
Income:Sales -{amount} + {item_sales}
; :NonItem:
Income:Sales -{item_sales}
; :Item:
[Conditional]
template =
Assets:Cash {amount} - (6 if {amount} > 50 else 3)
Expenses:Banking Fees (6 if {amount} > 50 else 3)
Income:Sales -{amount}
[StringConditional]
template =
Income:Sales {true} and -1
Income:Sales {false} or -2
Income:Sales -3 if 'x' not in {false} else -{amount}
Assets:Cash {amount}
[SelfBalanced]
template =
Income:Sales -5
Assets:Cash 5
[NondecimalWord]
template =
Income:Sales -5
Assets:Cash foo
[NondecimalVariable]
template =
Income:Sales -5
Assets:Cash {payee}
[Empty]
template =
[Nonexistent]