In some areas it's required to sequentially number payment slips / receipts.
At the moment this is not easily possible in Koha, as we don't have a sequential internal number for the payments, but will hopefully be possible in some point in the future with the work on the Accounts module.
*** Bug 20309 has been marked as a duplicate of this bug. ***
Do these actually need to be sequential?
At this point we could use the accountlineid for the 'payment' type accountline that's associated with the slip.
As I understood this is a legal requirement in some countries, possibly relating to anti-corruption laws, where they have to keep a tight track of all the monetary transactions. I believe the number has to be sequential to avoid problems (like getting asked about missing receipts for missing numbers).
Ah, also accountlines_id is on the wrong level I think - we want to number the payments - a payment might include changes to multiple accountlines.