Some of the transactions recur on a regular interval and it might be useful to know the next due date for such transactions. Recurring page shows the upcoming or recently missed transactions.
Paisa depends on the posting metadata to identify which transactions are recurring. This metadata can be added in couple of ways. Let's say you pay rent every month and you want to mark it as recurring, a typical journal would like below
You can manually tag a posting by adding
; Recurring: Rent.
The first part of the metadata before the colon is called tag name. It
Recurring. The second part is the tag value. This value is
used to group transactions.
Tagging each and every posting can be tiresome. Ledger has a feature called Automated Transaction which can make this process simpler.
The first line is the predicate and the line below it will get added to any matching posting. By default, it will match the posting account name. But you can target other attributes like payee, amount etc. You can find more examples below, more info about predicate is available on Ledger docs
= expr payee=~/^PPF$/ ; Recurring: PPF = expr payee=~/Mutual Fund/ ; Recurring: Mutual Fund = expr 'account=~/Expenses:Insurance/ and (payee=~/HDFC/)' ; Recurring: Life Insurance = expr 'account=~/Expenses:Insurance/ and !(payee=~/HDFC/)' ; Recurring: Bike Insurance = expr payee=~/Savings Interest/ ; Recurring: Savings Interest
Paisa will try to infer the recurring period of the transactions automatically, but this might not be perfect. Recurring period can also be explicitly specified via metadata.
Let's say your bank deposits the interest on the last day of the last month of the quarter, we can specify like the example above. Paisa editor recognizes period syntax and shows the upcoming 3 schedules right next to period metadata.
The syntax of the period is similar to cron, with the omission of seconds and hours.
|Field||Allowed values||Special characters|
|Day of month||
|Day of week||
* also known as wildcard represents all valid values.
? means you
want to omit the field, usually you use it on the day of month or day
L means last day of the month or week.
, can be used to
specify multiple entries.
- can be used to specify range.
the closest business day to given day of month
Multiple cron expressions can be specified by joining them using
|. Refer the wikipedia for more information. If you are not
sure, just type it out and the editor will show you whether it is
valid and the next 3 schedules if valid.
- Last day of every month
; Period: L * ?
- 5th every month
; Period: 5 * ?
- Every Sunday
; Period: ? * 0
- 1st of Jan and 7th of Feb
; Period 1 JAN ? | 7 FEB ?
- Closest business day to the 15th day of every month.
; Period 15W * ?