πŸ₯ͺ Sandwich Grill – Billing Software Guide

Version 2 Β· Bills saved in the cloud (Supabase) Β· Opened from a secure https:// address in Google Chrome or Microsoft Edge

What is new in Version 2 (read this first)

Everything below this section is the Version 1 guide. It still explains the menu, bills, reports and the printer. Where it talks about opening index.html, browser storage or restoring a backup, the Version 2 rules here replace it.
Contents Β· What is new in Version 2
  1. The simple approach (how it works)
  2. The files and folders
  3. Run it on your Windows laptop
  4. First-time setup: shop details, menu, costs
  5. Daily use (for the person at the counter)
  6. Connect and test the thermal printer
  7. Backup every day, and restore
  8. How sales, pending, cancelled bills and profit are counted
  9. Limits you must know
  10. Test it yourself (checklist)
  11. Menu details to confirm
  12. Problems and fixes
  13. How the code works (for learning)

1. The simple approach

The app is a set of normal web files (HTML, CSS, JavaScript) that you keep in a folder on your laptop. You open index.html in Chrome or Edge, and the app runs inside the browser.

Why IndexedDB and not "localStorage"? Both are built into the browser. localStorage only holds about 5 MB, which a busy shop could fill in a few months of bills. IndexedDB can hold much more, so it is safer for years of bills.

2. The files and folders

SandwichGrill\                 ← the main folder (keep it in one place)
β”‚  index.html                   ← OPEN THIS to start the app
β”‚  GUIDE.html                   ← this guide
β”‚  README.txt                   ← short start instructions
β”œβ”€ css\
β”‚     style.css                 ← colours and layout of the app
β”‚     receipt.css               ← how the printed bill looks
└─ js\
      default-data.js           ← your starting menu + prices (used only the first time)
      utils.js                  ← helpers: money format, dates, pop-ups, downloads
      storage.js                ← saving/loading data, bill numbers, calculations
      receipt.js                ← builds the 80mm / 58mm receipt and opens Print
      billing.js                ← the Billing screen
      orders.js                 ← the Orders page (search, status, reprint, delete)
      reports.js                ← Dashboard and Reports pages
      menu-admin.js             ← the Menu page (items, sizes, prices, costs, combos)
      settings.js               ← Settings, test print, backup and restore
      main.js                   ← starts the app and switches pages

You do not need to edit any file to change prices, items or the shop name. Do that inside the app.

3. Run it on your Windows laptop

  1. Download the file sandwich-billing.zip.
  2. Open File Explorer β†’ Downloads. Right-click sandwich-billing.zip β†’ Extract All…
  3. In the box, type C:\SandwichGrill and click Extract. (Any folder is fine, but then never move or rename it later.)
  4. Open C:\SandwichGrill. You should see index.html, GUIDE.html, and the folders css and js.
    If you see one more folder inside, open it: the files must be directly in the folder you use.
  5. Right-click index.html β†’ Open with β†’ Google Chrome (or Microsoft Edge). The Billing screen appears with your menu.
  6. Make it easy for your father: in Chrome press Ctrl+D to bookmark it. Press F11 for full screen (press F11 again to exit).

Make a desktop icon (recommended)

  1. Right-click on the desktop β†’ New β†’ Shortcut.
  2. Paste this as the location (for Chrome):
    "C:\Program Files\Google\Chrome\Application\chrome.exe" --start-fullscreen "file:///C:/SandwichGrill/index.html"
    For Edge use:
    "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --start-fullscreen "file:///C:/SandwichGrill/index.html"
  3. Click Next, name it Sandwich Grill Billing, click Finish.
Choose ONE browser and stick to it. Chrome and Edge keep separate data. Bills made in Chrome will not appear in Edge. Also always open the same index.html from the same folder, and do not use Incognito / InPrivate windows.

4. First-time setup

a) Shop name and contact details

  1. Click βš™οΈ Settings & Backup.
  2. Shop name is already Sandwich Grill. Fill in Address line 1, Address line 2, Phone number, and an optional extra line (e.g. Instagram).
  3. Check the thank-you message and "Bill number starts with" (default SG-, so bills are SG-0001, SG-0002 …).
  4. Click πŸ’Ύ Save settings.

b) Check the menu and prices

  1. Click πŸ” Menu. All 43 items from your printed menu are loaded in 9 categories.
  2. Click Edit on any item to change its name, category, sizes, selling price or cost. Click πŸ’Ύ Save item.
  3. Use the Available switch to turn an item off when it is sold out. It shows as "Not available" on the Billing screen.
  4. Categories tab: add, rename, delete (only empty ones) and change the order of categories.
  5. Sauces tab: sauce prices start at β‚Ή0 because your menu does not give a price for each sauce. Type the price and click πŸ’Ύ Save sauces.
  6. Combo offers tab: click Create combo, add the items inside it, type the combo price, and the estimated cost (the "use item costs" button adds up the item costs for you).

c) Preparation cost (for profit reports)

The menu does not show your costs, so every cost starts at β‚Ή0 and reports warn you. For each item, click Edit and type your estimated cost to make one (bread, filling, cheese, sauce, packing…). Until you do this, the "estimated gross profit" is too high.

Price and cost changes apply to new bills only. Old bills keep the price they were sold at, so your past reports stay correct.

5. Daily use (for the counter)

  1. Open the app. The Billing screen shows categories on the left, items in the middle, the bill on the right.
  2. Tap a category, then tap an item. If the item has sizes (Medium/Large, Steam/Fried, Sandwich/Wrap) or sauces, a window asks you to choose; tap βž• Add to bill.
  3. Use + and βˆ’ to change quantity. To type a big number (e.g. 6), click on the number itself. Tap βœ• to remove an item.
  4. Discount: type the amount, and choose β‚Ή (rupees) or % (percent).
  5. Choose Cash, UPI or Card.
  6. Finish the bill:
    • πŸ–¨οΈ Complete & Print – customer has paid; saves and prints.
    • βœ… Complete – customer has paid; saves without printing.
    • ⏳ Save as Pending – order taken but not paid / not handed over yet.
  7. Pending orders: click ⏳ Pending orders (top of Billing) or the Orders page. Click βœ… Complete when paid. Click View β†’ ✏️ Edit items to add items to a pending order.
  8. For UPI: check that the money has arrived on your phone/UPI app before clicking Complete. This software does not check UPI or card payments; it only records what you select.

6. Connect and test the thermal printer

I have not been able to test with a real POSIFLOW Shreyans printer. The receipt is designed for 80mm paper and tested as an 80mm and 58mm PDF. Please check compatibility with the steps below before depending on it in the shop.

a) Before buying – check compatibility

b) Install the driver

  1. Download the Windows driver for your exact model from POSIFLOW's "Drivers & Demo" page (or use the CD/pen drive in the box). Only download from the official site.
  2. Run the installer as the instructions say. Choose the USB port when asked. Some drivers ask you to choose a model name like "POS-80" – pick the one the manual says.
  3. Plug in the printer, load the paper (shiny side towards the print head – usually paper comes out from under the roll), close the lid, switch it on.
  4. Printer self-test: most thermal printers print a self-test page if you hold the FEED button while switching on. Check your manual.
  5. Open Settings β†’ Bluetooth & devices β†’ Printers & scanners. The printer should be listed. Click it β†’ Print test page.

c) Printer settings in Windows

  1. In Printers & scanners β†’ your printer β†’ Printing preferences.
  2. Paper size: choose the 80mm roll size (names differ: e.g. 80mm Γ— 297mm, 72mm Γ— Receipt, Roll Paper 80 Γ— 3276mm).
  3. If there is a cut option (auto cutter), choose "cut at end of document / page".
  4. Tip: do not set it as the default printer if you also use a normal printer; Chrome remembers the last printer you used anyway.

d) Print the test receipt from the app

  1. App β†’ βš™οΈ Settings & Backup. Paper width: 80 mm. Click πŸ–¨οΈ Print test receipt.
  2. In the print window: Destination = your thermal printer.
  3. Click More settings: Margins = None, Scale = Default, untick Headers and footers.
  4. Click Print. Chrome remembers these settings for next time.

Check: shop name at the top, all text inside the paper, β‚Ή symbol visible, total in bold, paper cut after the thank-you line.

ProblemFix
Text too small / too bigSettings β†’ Text size on receipt β†’ change β†’ Save β†’ test again.
Right side cut offCheck Margins = None and Scale = Default. Choose the 80mm paper size in Printing preferences.
Bill split onto 2 pieces, or very long blank paperSettings β†’ Page length β†’ "Let the printer decide" β†’ Save β†’ test again.
Nothing printsIs the printer on, with paper and lid closed? Does the Windows test page print? If not, the driver is the problem, not the app.
Very faint printPaper loaded upside down (thermal paper prints only on one side), or poor-quality paper.
Optional (only after printing works well): to print without the print window every time, add --kiosk-printing to the desktop shortcut, before the "file:///…" part. Chrome then prints straight to the default printer, so the thermal printer must be the Windows default printer.

7. Backup every day, and restore

Daily backup (2 minutes after closing)

  1. Click βš™οΈ Settings & Backup β†’ ⬇️ Download full backup (or the orange button in the yellow reminder bar).
  2. A file like sandwich-grill-backup_2026-10-17_2215.json is saved in Downloads.
  3. Copy it to a pen drive and/or upload it to Google Drive. Keep at least the last 7 days. A copy only on the same laptop does not protect you if the laptop breaks.

The app shows a yellow reminder at the top on any day you have bills but no backup.

Restore (only when needed)

  1. Settings & Backup β†’ πŸ“‚ Choose backup file… β†’ select the backup file.
  2. The app checks the file. If it is damaged or from another program, nothing is changed.
  3. You see what is in the file next to what is in the browser now (number of bills, items, shop name), and a warning if the file has fewer bills.
  4. Type RESTORE and click Replace my data with this backup. The app first downloads a SAFETY backup of your current data, then replaces it.

Excel / CSV exports

8. How the numbers are counted

SituationWhat the app does
Completed billCounted in sales, payment totals, best sellers and profit.
Pending billNot counted as sales. Shown separately ("Pending orders") until you mark it Completed. Each order has only one status: Pending or Completed.
Customer cancelled / refund givenOpen the bill β†’ πŸ—‘οΈ Delete bill β†’ type the reason (e.g. "Refund given – cold food"). The bill is removed from all sales, and a copy is kept in Orders β†’ Deleted bills with the reason and time. Its bill number is never reused, so a gap in numbers can always be explained. Partial refunds are not supported in this version: delete and re-bill the correct items.
Bill dateReports use the date and time the bill was first created.
DiscountSubtracted from the bill. Sales figures are after discount.
Estimated gross profitFinal amount βˆ’ (preparation cost Γ— quantity) for completed bills. It is not net profit: rent, salaries, electricity, gas and other expenses are not included. It is only as correct as the costs you enter.

9. Limits you must know

10. Test it yourself (10 minutes)

I tested all of these automatically in Chrome (48 checks, all passed). Do them once on your laptop too, before the shop starts using it:

  1. Add Veg Sandwich β†’ choose Wrap + Garlic Mayo β†’ qty 2. Add Coke 3 times, French Fries Large. Check the subtotal: 158 + 60 + 159 = β‚Ή377.
  2. Type discount 10 β†’ total β‚Ή367. Choose % β†’ total β‚Ή339.30. Set it back to β‚Ή.
  3. Choose UPI β†’ Save as Pending. Bill SG-0001 appears in Pending orders.
  4. Make another bill with 6 Γ— Masala Bread Omelette (click the quantity and type 6) β†’ Complete.
  5. Close the browser and open the app again. Both bills are still there (Orders page).
  6. Orders β†’ SG-0001 β†’ βœ… Complete. Dashboard shows today's sales, Cash and UPI split.
  7. Reports β†’ Today β†’ Report CSV and open it in Excel.
  8. Settings β†’ Print test receipt (choose "Save as PDF" if the printer is not connected yet).
  9. Settings β†’ Download full backup. Then Orders β†’ delete one bill with a reason. Then restore the backup file: the bill comes back.
  10. When you are happy, reset everything for real use: see "Start fresh" below.

Start fresh after testing

Test bills stay in the data. When testing is finished: Settings & Backup β†’ πŸ—‘οΈ Delete all bills β†’ type DELETE. All bills are removed and numbering starts again at SG-0001. Your menu, prices, costs and shop details are kept, and a safety backup is downloaded first.

11. Menu details to confirm

12. Problems and fixes

ProblemFix
All my bills are goneAre you in the same browser (Chrome vs Edge), not an Incognito window, opening the same index.html? If data was cleared, restore the latest backup.
"The billing app could not start"Use Chrome or Edge (not Internet Explorer), not a private window. Press F5.
Menu items missing on BillingCheck the item's category and the Available switch on the Menu page.
Screen does not fitPress F11 for full screen, or Ctrl+βˆ’ to zoom out (Ctrl+0 to reset).
Backup file not foundLook in Downloads. In Chrome press Ctrl+J to see downloads.

13. How the code works (for learning)