Sub LockoutCheckout( lock As Boolean ) As Boolean
If lock Then
If Starter.CheckoutIsLocked Then
Msgbox("CHECKOUT IS ALREADY RUNNING." & CRLF & CRLF & _
"This is a safetey check to protect against" & CRLF & _
"double posting of transactions." & CRLF & _
"It appears CHECKOUT is ALREADY RUNNING." & CRLF & _
"Please give this 30 seconds to complete." & CRLF & CRLF & _
"If after 30 seconds you find yourself here again" & CRLF & _
"then EXIT the EljayDelivery app" & CRLF & _
"(close all windows, or if needed power-off the tablet)" & CRLF & _
"then restart the EljayDelivery app" & CRLF & _
"and try CHECKOUT again.","CHECKOUT DOUBLE POSTING PROTECTION")
Return False
Else
Starter.CheckoutIsLocked = True
Return True
End If
Else
Starter.CheckoutIsLocked = False
End If
Return False
End Sub