transactions missing someting
transactions are not really ideal right now.
right now anything is booked as "in" leaving an alwas positive and ever growing balance - that is wrong
also paying by credit balance also raises the balance - wrong again
everyting could have been so easy just with a very slight adjustment WHMCS could have get rid of all the headache
transaction should work like this.
payment comes in (either automatic or manual) record
amoutn x - IN - raises the balance
once you pay an invoice with it (or add payment to invoice)
amount x - out to invoice
in case you record something like a mail in payment to an invoice it should generate !!! 2 !!! transactions
one for money goes in, antoher for money goes out "into" the invoice
that would clearup the transaction balance
this would render "credits" redundant - a positive balance is already the credit
no need for additional functions or extra logic
just plain a simple transaction log, in and out properly and everything is solved.
further with a simple addon (currency id) whmcs could be properly and fully multicurrency able
just add a currency id into the transaction log, everythign is solved then
that would mean a customer would have virtually a seperated balance sheet for any different currency he used.
without adding any logic, jsut a different view / sql select
but right now transactions are simply broken. it cant be that a payment done by (transaction on credit balance) generates a frhter positive balance... were mssing the second side of every transaction, right now its just pure going in