further optimised checkouts behaviour

This commit is contained in:
2023-01-11 15:29:37 +01:00
parent 3c18e7e360
commit 780f9a8c28
+15 -17
View File
@@ -168,26 +168,24 @@ namespace Caisses
{ {
NotFullCheckouts.Add(checkout); NotFullCheckouts.Add(checkout);
} }
}
}
foreach (GraphicalCheckout checkout in Checkouts) //Checkout behaviour
{ if (checkout.Clients.Count > 0)
if (checkout.Open && checkout.Clients.Count > 0)
{
Client cClient = checkout.Clients[0];
if (cClient.State != Client.ClientState.Checkout)
cClient.State = Client.ClientState.Checkout;
if (cClient.CheckoutTime <= 0)
{ {
checkout.Clients.Remove(cClient); Client cClient = checkout.Clients[0];
//We dont load the next because he should be loaded the next time this function is loaded if (cClient.State != Client.ClientState.Checkout)
} cClient.State = Client.ClientState.Checkout;
foreach (GraphicalClient ccClient in checkout.Clients) if (cClient.CheckoutTime <= 0)
{ {
ccClient.Tick(); checkout.Clients.Remove(cClient);
//We dont load the next because he should be loaded the next time this function is loaded
}
foreach (GraphicalClient ccClient in checkout.Clients)
{
ccClient.Tick();
}
} }
} }
} }