Incorrect transaction value after shift change

I think I may have not explained properly what is happening here so let me try again. The main point is that the procedure was developed sometime ago and has been working fine with V4. Now it has been put onto V5 it is no longer working.

To simplify it I have written a short report that only has cash and ticket details

The cash is reported in two ways using an SQL query and using the SambaPOS built in function. The SQL is

Let us now start the first work period and place some orders
image


If we now check the report is shows nothing which we would expect as nothing has been paid
image
Now payment is made and the report checked again. Both transactions are now correctly reported
image

Open two more tables and add some items


Do a shift change by setting open tables to pre-order and changing their colour by running SQL script
image
image

Close the current work period and run the report
image
This correctly shows the only two transactions that have taken place (i.e. been paid for) during the work period. Now start a new work period and release the table by reversing the previous actions
image


image
Open some new tables and add some items

Check report; correctly showing no transactions
image
Pay for the newly established tables (21 and 22) and check report again. Now correctly showing both transactions i.e. all transactions within the work period
image

Now add some items to table 11 and pay for both tables 11 and 12 (tables from previous work period)


And again check the report
image
Now it shows all the tickets correctly but only shows the cash value from the previous two tickets (tables 21 and 22) i.e. 730. The 1,460 from tables 11 and 12 is not being reported.

  • The first work period reported cash transactions of 475
  • The second work period reports cash of 730
  • Total for the day of 1,215.
    However the actual cash in the box includes an additional 1,460 for the unreported transactions on tables 11 & 12.

Let us now close the work period and run the report for the full day i.e. both shifts
image

The previously missing transaction for tables 11 & 12 are now being correctly reported and the reported cash matches what is in the cashbox.

Running the two shift reports again independently recreates the discrepancy
image
image

My apologies that was a bit long-winded but I hope it clarifies the issue I am hoping to resolve. The problem only happens to the tables that were tagged as pre-order during the shift change so my guess would be that they are being marked as paid somewhere else within SambaPOS but I can’t see where. Note that the original idea of using pre-order was from here