Let me correct what I said earlier: It was the receipts, not invoices that were cluttering the database for the PREPAID card accounts.
I had a look at the code just today and it appears invoices should only be generated when customer is POSTPAID and balance is less than 0 or when there is a charge and there is not enough credit to cover it such as billing for DID and credit is low.
Meaning that if the account is PREPAID and balance is positive then no invoice is generated only a receipt. This makes sense logically, because you generally only want to invoice when you are owed money.
The question then is, why are invoices being generated for prepaid accounts with positive balances? Can you or anyone say for certain this is the case, because I am not seeing this.
As far as I know, and understand, the scenario is other...
Recepts: They are generated agains refiles to certify the balance purchase into the system, so receipt don't show any charge in the account, the show only the refile.
Invoice: As I don't use post paiy, excuse me, I have no idea, but for prepaid, invoices are showing the total expenses of the account into the billing cycle, including calls summary, DIDs, and other charges. It's necessary, as customers need an invoice for there taxes and accountancy issues, it's correct, but what's NOT correct that this invoice is being generated with status unpaid.
Other issue, as the status is showing unpaid, even, when the customer have balance, and as the service is prepaid, so calls are already being billed and charged... but when a customer go to his panel, and try to pay that invoice, vía paypal, for example, it's going to generate the payment order, the refile, but it's not changing the status as already paid, and customer have to call us, and we need to go to do it manually from the admin siad, to change the satatus... so 2 troubles here, the status, and the payment processing... The second it's not affecting us seriously, as if the first would be solve, cusomter don't need to go to pay it...
Correct me, if I'm misundetrstanding...