Files
inventree-stock-tool/QUICKSTART_WEB.md
grabowski 8dadd66f45 fix: Add support for ANSI MH10.8.2 barcode format
Fixes barcode parsing for ANSI MH10.8.2 format barcodes that don't use GS/RS separators.

Problem:
- Barcodes like [)>06PSAM9019-ND1PJL-100-25-T... were not being parsed
- Only separator-based and JSON formats were supported
- User's real-world barcodes were being added to queue as raw strings

Solution:
- Added ANSI MH10.8.2 format detection ([)>06 prefix)
- Extract part code between P and first field marker (1P, 30P)
- Extract quantity from Q<digits> pattern
- Updated both desktop and web app parsing logic

Tested with real barcode:
- Input: [)>06PSAM9019-ND1PJL-100-25-T30PSAM9019-NDK1...Q1811...
- Parsed: Part=SAM9019-ND, Qty=1811 

Files Changed:
- src/stocktool/stock_tool_gui_v2.py - Enhanced parse_scan()
- src/stocktool/web/static/js/app.js - Enhanced parseBarcode()
- test_barcode_parsing.py - Test script for validation
- test_barcode_analyze.py - Barcode structure analysis tool
- QUICKSTART_WEB.md - Quick start guide for web app

Supported Formats Now:
1. JSON-like: {PM:PART-CODE,QTY:10}
2. Separator-based: GS/RS (\x1D, \x1E) separated fields
3. ANSI MH10.8.2: [)>06P<part>...Q<qty>... (NEW!)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 11:29:20 +07:00

106 lines
2.0 KiB
Markdown

# Quick Start - Web Application
Get up and running with the InvenTree Stock Tool web interface in 5 minutes!
## Step 1: Install
```bash
cd stocktool
uv sync
```
## Step 2: Run
```bash
uv run stock-tool-web
```
You should see:
```
✅ Connected to InvenTree: https://your-server.com
🚀 Starting InvenTree Stock Tool Web Server...
📱 Open your browser to: http://localhost:5000
Press Ctrl+C to stop
```
## Step 3: Open Browser
Navigate to: **http://localhost:5000**
## Step 4: Start Using
### Quick Workflow:
1. **Select Location**
- Scan location barcode (e.g., `INV-SL123`)
- OR select from dropdown
2. **Choose Mode**
- Click "Add Stock", "Update Stock", "Check Stock", or "Locate Part"
3. **Scan Parts**
- Click in scan field
- Scan barcode or type part code
- Press Enter
### Unknown Parts:
When you scan a part that doesn't exist:
- ✅ It's automatically added to "Pending Imports"
- ✅ Import runs in background
- ✅ You can keep scanning other parts!
- ✅ Part is processed automatically when ready
## Barcode Commands
Scan these to control the app:
- `MODE:ADD` → Add Stock mode
- `MODE:CHECK` → Check Stock mode
- `LOCATE` → Locate Part mode
- `CHANGE_LOCATION` → Clear location
## Access from Phone/Tablet
1. Find your computer's IP:
```bash
# Windows
ipconfig
# Linux/Mac
hostname -I
```
2. On your device, open browser to:
```
http://YOUR_IP:5000
```
Example: `http://192.168.1.100:5000`
## Troubleshooting
### Can't connect?
- Check firewall allows port 5000
- Make sure server is running
- Try http://127.0.0.1:5000
### Import not working?
- Ensure `inventree-part-import` is installed
- Check your InvenTree API token has permissions
### WebSocket issues?
- Clear browser cache
- Try different browser
- Check browser console for errors (F12)
## What's Next?
- Read full docs: [WEB_APP.md](WEB_APP.md)
- Desktop version: `uv run stock-tool`
- Report issues: https://github.com/your-repo/issues
---
**That's it! You're ready to scan! 📱✨**