Just noticed that the account transaction date is the same as the ticket opening date, not the actual time that the payment (i.e. account transaction) was made.
Has this always been the case or is this a change in recent versions (5.1.61 and up)? My client was using 5.1.58 previously and didn’t mention anything, however since upgrading them to the latest version they have reported this to me as a “bug” so got the impression it may have changed in the latest version?
But anyway, shouldn’t the account transaction date really be the actual date/time the associated payment takes place and not the ticket opening time?
Probably you’re looking to account transaction document date.
As @emre mentions, the Accounts screens show the Document Date (from
[AccountTransactionDocuments] table), not the Transaction Date.
That said, @markjw is somewhat correct, I think. The
[AccountTransactions] table has no
[Date] field, so we can ignore that. However, the
[AccountTransactionValues] table does have a
[Date] field, and the date being used there is the same as the Document Date, but it should probably be using the Date/Time when the Transaction was inserted. This is outlined in Red in the image.
[Payments] table on the other hand also has a
[Date] field, and that is where the “Last Payment” date/time is being retrieved from. This is outlined in Green in the image.
Yeah, this is how I spotted it. I was adding an integration with a hotel booking system and just querying the
[AccountTransactionValues] table since we only care about transactions that are charged to the room. I noticed the date wasn’t the actual date of the payment, which I had assumed it would have been given the account transaction is related to a payment and not the ticket.
I modified our integration to use the ticket
[lastPaymentDate] instead which works fine.
But the other reason for my question was whether this was always the same or a recent change? My client had an integration they created themselves in the past using a separate app to connect to the database and capture the relevant details from SambaPOS. They used that previously on V5.1.58, I had to upgrade them as I used GraphQL for parts of the integration. Their SQL query used the same
[Date] field from
[AccountTransactionValues] as I am using, but they never complained then, but after my integration they said the times didn’t match the payment / close time, which led me to believe there may have been a change in this date recently?
I cannot find any evidence of that. Looking back at TransactionValues seems to indicate that the Date used has always been the Document Date.