Key Features
Barcode Scanner Support
Automatic detection of USB barcode scanners with sub-50ms keystroke detection
Auto-Calculations
Automatic calculation of total weight and total cost based on quantity
Duplicate Detection
Prevents duplicate entries within 30 seconds to avoid accidental re-submissions
Smart Shift Detection
Automatically detects current shift based on system time
Registration Workflow
Scan or Search Part Number
Use a USB barcode scanner or type the part number manually. The system searches the
catnp catalog and auto-fills:- Material name
- Unit weight (kg)
- Unit cost (USD)
- Part type
The scanner must be configured to send Enter (CR) after each scan and operate in HID keyboard mode.
Select Location
Choose the production area, line chain, and shift:
- Area: Auto-populates the associated chain
- Chain: Optional, can be changed manually
- Shift: Auto-detected based on current time
Enter Quantity and Unit
Specify the scrap quantity and measurement unit:
- Use quick-add buttons: +1, +5, +10, +25, +50, +100
- Select unit: pieces (pzas), kilograms (kg), meters (m), grams (g)
- View real-time calculations:
- Total Weight = Unit Weight × Quantity
- Total Cost = Unit Cost × Quantity
Add Classification
Optionally classify the scrap:
- Category: e.g., Material, Process, Quality
- Failure Mode: Select from active failure reasons
- Comments: Add additional observations
Barcode Scanner Integration
The system supports USB barcode scanners with automatic detection.Scanner Configuration
- Hardware Setup
- Scanner Settings
- Testing
- Connect USB barcode scanner to the workstation
- No drivers required (uses HID keyboard emulation)
- Scanner must be in Keyboard Wedge mode
Detection Logic
The scanner detection uses keystroke timing analysis:- Keystroke interval < 80ms indicates scanner input
- Manual typing has > 80ms intervals
- Auto-triggers search after 150ms of inactivity
- Minimum 3 characters required for search
Data Structure
Each scrap registration creates aPesaje record:
Form Validation
The system validates:Required Fields
- Area
- Shift
- Part Number
- Quantity > 0
Business Rules
- No duplicate within 30 seconds
- Part must exist in catalog
- Area must be active
- User must have
register_scrappermission
Quick Actions
Quick Add Buttons
Speed up quantity entry with preset increment buttons:Smart Form Reset
The form resets automatically after successful submission but preserves:- Selected area
- Selected shift
- Supervisor name
Success & Error Handling
- Success
- Validation Errors
- Duplicate Detection
- Part Not Found
On successful registration:
- Green confirmation banner appears for 3 seconds
- Form clears (except area/shift/supervisor)
- Total records counter increments
- Record immediately appears in dashboard
Permissions
All authenticated users withregister_scrap permission can access this module. Default roles:
- ✅ Operator — Can register scrap
- ✅ Supervisor — Can register scrap
- ✅ Quality — Can register scrap
- ✅ Admin — Full access
Best Practices
For Operators:
- Scan parts immediately when scrapped
- Double-check quantity before submitting
- Add comments for unusual cases
- Report scanner issues to supervisor
- Review daily totals at shift end
- Verify failure mode classifications
- Update part catalog when new parts arrive
- Train operators on proper scanning technique
Troubleshooting
Scanner not detecting
Scanner not detecting
- Check USB connection
- Verify scanner is in HID keyboard mode
- Click “Scanner activo” toggle to re-enable
- Test by scanning into a text editor first
- Ensure scanner sends CR suffix
Part not auto-filling
Part not auto-filling
- Verify part exists in Catalog → Part Numbers
- Check part is marked as active (
activo = 1) - Ensure exact match (case-insensitive)
- Add missing parts via admin panel
Cannot submit form
Cannot submit form
- Check all required fields are filled
- Ensure quantity > 0
- Wait 30 seconds if duplicate warning appears
- Verify you have
register_scrappermission - Check internet connection (if using API mode)
Calculations seem wrong
Calculations seem wrong
Unit cost and weight come from the
catnp catalog:- Total Weight = Unit Weight × Quantity
- Total Cost = Unit Cost × Quantity
Related Pages
Dashboard
View aggregated scrap metrics and charts
Reports
Generate detailed reports with filters
Catalog Management
Manage part numbers, areas, and failure modes