In a recurringOrder there are three fields (among others)
- NextBillDate
- PaidThruDate
- LastBillDate
Recently I’ve noticed that when a payment is made within Keap, the PaidThruDate is not always getting updated.
I had my client contact Keap support, but they (support) suggested to use the NextBillDate - which is not the same thing at all.
The NextBillDate gets updated when an invoice is raised. The LastBillDate gets updated at the same time - and the two should be separated by the time window dictated by the billing frequency and billing cycle.
Surely the PaidThruDate should be updated when the invoice has been paid. This may or may not be the same time the invoice is raised - but can often be quite a while later - especially if there are credit card issues etc.
I decided to work around it and just build something that checks for the most recent invoice on a job, then check for a valid payment on that invoice and finally update the PaidThruDate according to the billing cycle.
All done - no issues. However, whenever I update the PaidThruDate, something in the background (I can only assume at Keaps end) also updates the LastBillDate to match!
This is not remotely helpful.
I double checked the table schema - sometime between December last year (24) and now (March 25) someone has added the comment " PaidThruDate - This field is really the last billed date."
except it I could swear it never used to be the same as the LastBillDate, and indeed it shouldn’t be the same as it serves a totally different purpose.
Have there been some updates made to the tables recently?
I suspect this one should not have been made.
Can anyone comment on this please.