*`charge` - input a batch of csv lines representing incoming and outgoing payments
*`ct` - charge, then make transfer (interactive assistent)
*`cts` - like ct, but output finally status of all
*`ctr` - like ct, but output finally reports of all
*`report` - get only reports
*`sql` - execute sqlite3 shell with all necessary pragmata and with line output
*`status` - get only statuses
*`transfer` - only make transfers (interactive assistent)
*`tr` - transfer, and output report
*`ts` - transfer, and output statuses
Input to `./trsr charge`
------------------------
You can separate the fields of each line by a comma and optional whitespace, or at least one whitespace. The order of columns is:
* The booking date in format YYYY-MM-DD,
* The account name,
* The value if it is a debit,
* The value if it is a credit,
* The purpose (in the case of a debit, it must start with bill ID and colon),
* Optional: "<<Comma-separatedlistofcreditIDsusedtopaythedebt"or">> Comma-separated list of bill IDs the booked income is used for", respectively
### Multi-line purposes
Multi-line purposes must either be surrounded by " (escape literal " by doubling it), or started in the next line and terminated with an empty one.
### How to book an incoming payment
In the credit column must be a value greater than 0. Cent must be passed as a decimal part, i.e. "100" really mean 100.00, not 1.00! In the debit column you MAY input a name starting with a letter (otherwise it needs to be just "+"), by which you can refer to a credit in lines below instead of the number.
### How to enter a target credit
A target credit is defined as initially equal 0.
### How to make an internal debt
A debit, recognized by an amount in the debit column, can have a target credit name or number in the credit column.
### How to book an outgoing payment
An outgoing payment must not have a target credit. Leave that field empty.
HTTP interface
--------------
Treasure DB includes a rudimentary HTTP interface. It requires Mojolicious. The interface
is developped and tested on version 7.13 onwards.
You can start it with `./trsr server`. It will stay in the foreground. To start it in daemon mode,
use `./trsr server >/tmp/trsr_db.log 2>&1 & disown` in the bash shell.
After first start, you will need to create a user: `./httpuser -a $username -g 2`.
The link that will be output leads you to an extended login form. Please enter a (good) password
twice, so typos are unlikely. The -g (or --grade) argument can be 0, 1 or 2:
* 2 is admin who has complete read-write access.
* 1 means auditor with complete view without writing permission.
* 0 means auditor who can view only the type-less accounts, e.g.
the club account is recommended to be without type, or(!) an account