DowaKhana without internet: what keeps working
DowaKhana needs an ordinary connection. If it drops, the counter keeps selling for cash or card for up to one shift, keeps those sales on the device, and sends them by itself when the connection is back. Selling on account, receiving and reports wait for the connection.
What happens when the internet drops mid-sale?
You finish the sale as usual. If the app can't reach the server, the sale is kept on the device and the screen says "Sold. Saved on this phone; it will be sent when the internet returns."
A bar above the counter reads "Offline: sales are kept on this phone", with how many sales are waiting to be sent. Nothing is queued without you seeing it.
How does it know what's in stock while offline?
Each time the counter loads your stock from the server (when it opens, and after every sale), it keeps a copy of all of it on the device. Offline, it sells from that copy and shows "Stock as of" with the time it was last read.
Each sale you make offline comes off the batch it was sold from in that copy, so the counter won't offer you a box you've already sold.
How do the sales get sent when the internet is back?
- The app tries on its own: when the page opens, when the connection returns, and every 15 seconds. There's nothing to tap.
- Sales go oldest first.
- Each sale is sent under its own key, so if it's sent twice it's recorded once.
- A sale counts at the time it was made and under the person who made it, not when it arrived. One that arrives more than a shift later counts when it arrives and is marked "sent late" in Today's sales.
What if the server refuses a sale?
Stock and expiry dates are checked when the sale arrives. If the batch sold out on another device, or expired in the meantime, the sale isn't recorded and isn't thrown away either. It moves to a red list on the counter, "Sales made offline that were not recorded", showing what was sold, the total and the reason.
Each one has two buttons: "Send again", under the same key, and "Dealt with", once you've sorted it out by hand. If two devices both sell the last pack while offline, one sale is recorded and the other lands on this list.
What waits for the connection?
- Selling on account. The counter says "Selling on account needs the internet. Sell for cash, or wait for the connection."
- Printing the sale's receipt.
- Receiving a delivery and reading a supplier invoice from a photo.
- Reports.
- Signing in for the first time on a new device.
How long can it sell offline?
One device can sell without a connection for one shift: 12 hours from the oldest sale not yet sent, and up to 500 sales. After that it asks you to reconnect and send them before you sell more.
Getting ready before the internet goes
- Sign in on every device you sell from while you're online.
- Open the counter on it once. The app keeps a copy of the pages you've opened, so if the internet drops later, the counter still opens.
- When the connection comes back, do nothing. Just check whether the red list appeared.