Files @ 751cd7cd441e
Branch filter:

Location: NPO-Accounting/import2ledger/tests/data/templates.ini

Brett Smith
config/hooks: Date hooks configure themselves.

Broadly, this change gets date-specific configuration out of the Config
class, and into the date hooks. Following this pattern, we can have more
specific configuration for more hooks without growing a bunch of custom
methods on the Config class.

There's still more cleanup to be done to finish the job, but this commit is
about as big as I can stand, so this will serve as a good checkpoint.
[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:

[Empty]
template =

[Nonexistent]