I have a file which needs few improvements and add few functions i,e save and send Invoices by portal row each Invoice should save and send with attached file with invoice references.
Track the payment incoming/Outgoing amount as if you have 1000 or as much to add or less i,e that much amount is out. once that amount has been clicked as Paid then that should add back into 1000 and that much fee/profit function. will return. as more than 50% explains in the file.