I’m new to Glide, and this is my first post—hoping someone can assist me!
In my app, I’m facing an issue with the Current Balance column when handling partial payments. I have a Due Balance of $1,000 and a Payment Made column. When I receive a partial payment of $400, the balance correctly updates to $600. However, if I receive another $200, instead of subtracting it from the remaining balance ($600), it deducts it from the original due balance ($1,000), leaving me with an incorrect balance of $800 instead of $400.
How can I ensure that each payment is subtracted from the updated remaining balance rather than the original due amount?
It looks like you are recording payments in the same table?
I would not do that, I would record them in a separate table, with one payment per row, and include a column that relates to the original sales order. Then you can easily calculate an outstanding balance at any time by doing a rollup->sum of related payments, and subtracting that from the original purchase price.
Thank you for your kind response! That’s correct—I’m trying to save the payment data in the same table. Previously, I had a separate Payments table, but I struggled to link the Sales Order ID to it whenever a new entry was created in the Sales Order table. However, I believe I’ve now managed to solve this using workflows. When a new sales order is created, I add its Row ID to the Payments table through a workflow, allowing me to retrieve all related data via relationships.