There are two types of recurrence entries:
The fields and their meanings are:
Expense, Invoice and Charge
(plus all of
the others and any that you have created).
-t
option to all edit commands, this option allows
you to specify an existing (at the time of the recurrence entry running)
entry in the database named in the TableName field. You will not be able
to overwrite the templated entry, so if you have not changed the new
entry's unique ID in the Commands field then it will revert to 'new'.
once,
day, week, month and year
.
bk invoices -F
to obtain the field names. A basic set of commands to make an invoice
every month would look like:
Invoice = makeDate("CLI-%y-%m");
Client = 'someclient';
$tmp = 'Services invoice. Pay up by ';
Date = makeDate("%Y.%m%d");
Description = $tmp . incrDate( Date , 90);
From = makeDate("%Y.%m01");
To = makeDate("%Y.%m%l");
You can use the makeDate function to create dates based on the running date (which may or may not be the same as the current date). See the section on makeDate (4.2.1) for details.
There are some important caveat:
Directive are always in the format '%c', where c is any character. The directives are:
An example (run on February 10, 1997):
makeDate("%j: Happy b-day mom, %Y.%m%d")
would give:
41: Happy b-day mom, 1997.0210
$value = incrDate("1997.0901", 1, 2, 3);
This would increase the supplied date (Sept. 1, 1997) by 1 day, 2 months and 3 years.
You may also use negative values.
A useful example would be for creating an invoice and overriding the Client name. You could specify: Client = 'SGI' (with appropriate shell quoting, of course). And then have a line in the Commands field (note the space between Client and ';') such as:
Client = 'Bruce' if not Client ;