I have three bank accounts, and a Petty Cash account. For those four, all receipts gets processed through one form f02receipts to the t02receipts table. Every receipt get the next autonumber RCT000001 and so on. In a field BankName I can select the account from the 4 first mentioned. I can print ledger accounts for each bank on its own. It al works well. Payments work on the same basis.
I want following numbers for each of the 4 accounts as well. So maybe in the table t02Receipts the ID no RCT001000 is reached but in Bank account no 1 it is only receipt no 256.
I believe I understand the process should normally work from the other side. My thinking is then that 4 bank accounts may need 8 tables to get the autonumbering right. 4 for receipts, and 4 for payments. I know how to do that and it should result in what I want.
Does that mean when a new Bank Account is added it will need new tables? That is not what I want. My hard thinking fall short. My whole apllication should work in a way that when a user adds a new Bank account, no new tables should be needed, but each bank account should have numbering that follows on the previous number.