Buy-Back
Buy-Back manages purchasing used devices from customers to resell as refurbished stock — recording the seller's ID and a clean-IMEI check for stolen-goods protection, printing a signed purchase receipt, and pushing purchased devices straight into your IMEI inventory.
Overview
Each buy-back record captures the seller's name and phone, device details (Device Type, Brand, Model, Color, Storage, IMEI), physical Condition (Excellent/Good/Fair/Poor/Parts Only), and a free-text description of any Issues/Damage.
A record moves through Status Pending → Inspected → Purchased → Rejected; only once Status is Purchased does the "Add to Inventory" action become available for that row.
For legal protection when buying second-hand devices, the form can capture a Seller ID Proof (Aadhaar/PAN/Driving Licence/Voter ID/Passport/Other) with its number, and an "IMEI verified clean" checkbox with a direct link out to the government CEIR IMEI-check portal.
Clicking the print icon opens a separate purchase receipt window containing the seller's details, ID proof, device info, amount paid, and a printed Seller Declaration ("...is not stolen, lost or encumbered...") with signature lines for both seller and shop — designed as your paper trail against buying stolen goods.
Before You Start
- No linked Product record is required — Device Type/Brand/Model are free text.
- To use "Add to Inventory", the record's Status must already be Purchased (the button is not shown otherwise).
- Capturing Seller ID Proof and running the CEIR IMEI check are both optional but strongly recommended before agreeing a Final Value, especially for high-value devices.
Step-by-Step Guide
1 Intake a used device from a customer
- Click Record Buy-Back.
- Enter Customer Name (required) and Customer Phone, plus Device Type, Brand, Model, Color, Storage and IMEI as applicable.
- Select the device's Condition (Excellent/Good/Fair/Poor/Parts Only) and describe any Issues/Description (cosmetic damage, faults, etc.).
- Optionally capture the seller's ID Proof type and number, and tick "IMEI verified clean" once you have checked the device is not reported lost/stolen — use the "Check on CEIR" link to open the government verification portal in a new tab.
- Enter the Offered Value and the Final Agreed Value, choose a Payment Mode (Cash/Bank Transfer/Store Credit) and the Received Date, then click Save — the record starts as Pending.
2 Inspect and finalize the purchase
- Click the edit (pencil) icon on a row — editing reveals a Status dropdown (Pending/Inspected/Purchased/Rejected) hidden on first creation.
- Move Status to Inspected once you have physically checked the device against what was declared, then to Purchased once payment is made and ownership transfers, or Rejected if you decline the device.
3 Print the purchase receipt with seller declaration
- Click the print icon on any row to open a separate print-formatted window.
- The receipt shows the store name, seller name/phone/ID proof, device details, IMEI, condition, known issues, amount paid and payment mode, an "IMEI Check: Verified clean" line if that box was ticked, and a Seller Declaration paragraph with signature lines for both parties.
- The browser print dialog opens automatically after a short delay — print or save it as your legal record of the transaction.
4 Push a purchased device into IMEI inventory
- On a row with Status = Purchased and not yet added, click Add to Inventory.
- Confirm the prompt — BazaarPOS automatically creates a new IMEI Registry entry using the buy-back's brand/model/color/storage, sets its Grade from the device Condition (Excellent → Grade A, Good → Grade B, Fair/Poor/Parts Only → Grade C), tags its Source as "Buy-Back", sets Status to In Stock, and uses the Final Value as its cost price.
- Once added, the Inventory column shows a green "In Stock" tag and the action is no longer available for that row (a device can only be added once).
5 Search, filter and clean up
- Use the All / Pending / Inspected / Purchased / Rejected filter pills to narrow the list; each shows a live count.
- Use the search box to filter by customer name, brand, model or IMEI.
- Click the trash icon to permanently delete a buy-back record after a confirmation prompt.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Record Buy-Back | Opens the form to log a new used-device purchase intake. |
Total Received / Purchased / Total Amount Paid / Added to Inventory tiles | Total Amount Paid sums Final Value only across PURCHASED records; Added to Inventory counts records with `addedToInventory = 1`. |
Status filter pills (All/Pending/Inspected/Purchased/Rejected) | Filters the table by status with a live count per pill. |
Search box | Filters by customer name, brand, model or IMEI as you type. |
Customer Name * / Customer Phone | Name is required; phone is optional. |
Device Type / Brand / Model / Color / Storage / IMEI | Descriptive device fields; all optional free text except Condition. |
Condition * | Excellent / Good / Fair / Poor / Parts Only — shown as a color-coded badge; also drives the auto-assigned inventory Grade. |
Issues / Description | Free-text note on known faults or cosmetic damage. |
Seller ID Proof / ID Proof Number | Aadhaar, PAN, Driving Licence, Voter ID, Passport or Other, plus the document number — printed on the purchase receipt for legal protection. |
IMEI verified clean checkbox + "Check on CEIR" link | Manually confirms the IMEI was checked as not lost/stolen; the link opens the government CEIR verification portal in a new tab (this app does not call the CEIR API automatically). |
Offered Value / Final Agreed Value | The initial quote versus the amount actually paid to the seller. |
Payment Mode | Cash / Bank Transfer / Store Credit — printed on the receipt. |
Received Date | The date the device was physically taken in. |
Status (edit mode only) | Pending / Inspected / Purchased / Rejected — only editable once a record already exists; new intakes always start Pending. |
Add to Inventory | Only shown once Status = Purchased and not already added; creates a matching IMEI Registry entry and marks the row "In Stock". |
Print (printer icon) | Opens the purchase receipt with the seller declaration and signature lines in a new print-ready window. |
Edit (pencil icon) / Delete (trash icon) | Edits any field, or permanently removes the record after confirmation. |
Tips & Best Practices
- Always tick "IMEI verified clean" (after actually checking on CEIR) before agreeing a Final Value on a used smartphone — it is your main defence against unknowingly buying a stolen device.
- Capture a Seller ID Proof for higher-value buy-backs; the printed receipt's declaration is only as useful as the identity behind the signature.
- Use Add to Inventory as soon as a device is marked Purchased so it starts showing up in your refurbished/resale stock immediately rather than sitting untracked.
- Print and keep the purchase receipt for every transaction — it documents both the price paid and the seller's declaration of lawful ownership.
Troubleshooting & FAQ
The Add to Inventory button isn't showing on a row.
I clicked Add to Inventory and got an error toast.
What Grade does a bought-back device get in IMEI inventory?
Can I print the receipt again after the transaction is done?
I can't save a new buy-back record.
🧑💻 Developer Notes
Source component(s):
frontend-app/pos-app-electronics/src/pages/electronics/BuyBackPage.jsxfrontend-app/packages/pos-react-lib/src/pages/electronics/BuyBackPage.jsx (actual implementation)
Backend endpoints used:
GET /electronics/buy-backPOST /electronics/buy-backPUT /electronics/buy-back/:idDELETE /electronics/buy-back/:idGET /settingsPOST /electronics/imei
Related tables (db-core repositories):
ElectronicsBuyBackElectronicsIMEI (created by Add to Inventory)
Feature flag key: billing
Thin re-export in pos-app-electronics; real component lives in shared pos-react-lib package. `idProofType`, `idProofNumber` and `imeiVerified` were added to the ElectronicsBuyBack table via later ALTER TABLE migrations (backend/src/lib/db.js) rather than being in the original CREATE TABLE — a sign this receipt/compliance functionality was added after the initial buy-back feature shipped. The purchase receipt is generated entirely client-side via `window.open` + inline HTML/CSS and `window.print()` — there is no server-side PDF generation. Add to Inventory is a two-step client-side flow: POST /electronics/imei to create the IMEI record, then PUT /electronics/buy-back/:id with `{ addedToInventory: 1, inventoryImeiId }`; if the first POST succeeds but the second PUT fails, the IMEI could exist without the buy-back row reflecting it — worth flagging to a developer as a non-atomic operation. Mounted at `/electronics/buy-back` behind `