Deposit Funds now works properly. Another task done in the big accounting software rewrite. The action commands seem to take about a week apiece. There are five left to do, so they probably will take another month to finish.
The original Deposit Funds code dates from the late 1990s. It’s complicated. Deposits can come from projects, cash sales or billed sales. Later we added rental transactions. Still later we added events (used for our training classes). Sales branches also play a part.
Deposit Funds has a big data structure that gets passed around to each of those classes. It includes a list of accounts, each with their own list of details. Afterwards, the whole mess travels to a bank transaction to actually create a deposit. The code is scattered all over the place.
Bach then, our staff figured things out as we went along. Several people worked on Deposit Funds, spread out over several years. The code ended up as a bit of a Frankenstein. Revisiting it twenty years later, it was baffling. Construction accounting software will always be complicated, but this was much worse.
On top of all that, for the first few years Goldenseal had Payment Receipts. They were intermediate transactions in between sales or project bills, and deposits. Having them made everything twice as complicated and twice as confusing. We finally removed them, and used printed forms instead. Sadly, the code still lived on inside Deposit Funds. Payment Receipts were a bad idea, and it’s time to escape them.
One way to improve software is something called refactoring. Its goal is to make code less confusing and more reliable. To refactor you first break things, then fix them. It’s kinda like doing a gut/rehab construction project, except that the gutting part has to be gradual.
Step one is to remove one bit of code that doesn’t make sense. The compiler then complains, with a list of other code that it breaks. Step two, our staff looks at each error to figure out where and how the mystery code is used. Sometimes it isn’t even needed, so we can delete it. If not, step three is to rename the data and methods to make more sense. Maybe add some comments to explain the quirks. Get the compiler happy again. Then repeat for the next bit that’s confusing.
After a few days of refactoring, the Deposit Funds data structure was about half as big, and the code explained itself. It also was more similar to Pay Bills and Reconcile. That made it easier to connect to the Qt interface.
Sometimes refactoring fixes bugs. Sometimes it adds new ones. Ditto for a major rewrite like TurtleSoft Pro. So, we still need to test everything with real-world data. That phase is coming up soon.
The best way to alpha-test TurtleSoft Pro will be to run the TurtleSoft business with it. Right now is too early to switch over completely, but we’ll run the new code in parallel with the current Goldenseal for a while, and make sure they both act the same. Or in some cases, similar but improved.
It’s ready for that kind of testing now. But the process will work best by having two monitors and two mice/keyboards side by side. To accomplish that requires serious desk de-cluttering, or maybe another desk. Still figuring that out. It may mean moving some file cabinets.
Meanwhile, our programmers have moved on to Project Billing. In Goldenseal that is split up into five different menu commands. We probably can merge them in TurtleSoft Pro.