LIGHTSTROKE
INVENTARIO PRO
Ingresa tus credenciales
LightStroke Inventario Pro 2026
Inventario
Precios: Público Asociado LS Distribuidor Dist. Select Black
Productos
ProductoCategoríaUbicación StockMín. PúblicoAsoc. LSDistrib.Dist. SelBlack Estado
Búsqueda de Existencias
Escanea el código de barras o escribe el SKU / nombre del producto
Resultados
ProductoSKUCategoríaUbicaciónStockPrecio PúblicoEstado
🔍

Escribe para buscar productos

Salida de Almacén
⚡ Escanea o escribe el SKU — presiona Enter para agregar
Productos para salida
📤

Agrega productos escaneando o buscando

Detalles de salida
Productos:0
Unidades:0
Total:$0
Pedidos / Órdenes
#Fecha / HoraSolicitanteTipoProductosEstadoNotas
📋

No hay órdenes registradas

Movimientos
Fecha y HoraProductoTipoCantidadDestinoUsuarioNotaStock resultado
📋

Sin movimientos

Alertas de Stock
ProductoUbicaciónStock actualMínimoEstadoAcción

Todo el inventario está en niveles correctos

Categorías
CategoríaProductosValor (Precio Público)
Ubicaciones
UbicaciónProductosValor Total
Usuarios
// ═══════ LOGIN ═══════ (function(){ // Limpiar sesion y usuarios cacheados para cargar los nuevos try{ localStorage.removeItem('ls2-cu'); localStorage.removeItem('ls2-users'); }catch(e){} var ls=document.getElementById('loginScreen'); if(ls){ ls.style.display='flex'; ls.style.zIndex='99999'; } var app=document.querySelector('.app'); if(app){ app.style.visibility='hidden'; app.style.pointerEvents='none'; } })(); function doLogin(){ var u=(document.getElementById('loginUser').value||'').trim().toLowerCase(); var p=document.getElementById('loginPass').value||''; var err=document.getElementById('loginErr'); // Buscar usuario en el array USERS por campo usuario y pass var found=USERS.find(function(x){return x.usuario===u && x.pass===p;}); if(found){ CURR_USER=found; try{localStorage.setItem('ls2-cu',JSON.stringify(found));}catch(e){} document.getElementById('loginScreen').style.display='none'; // Mostrar app var app=document.querySelector('.app'); if(app){ app.style.visibility='visible'; app.style.pointerEvents=''; } err.style.display='none'; var sn=document.getElementById('sidebar-name'); var av=document.getElementById('sidebar-av'); var sr=document.getElementById('sidebar-role'); if(sn)sn.textContent=found.nombre||'Usuario'; if(av)av.textContent=(found.nombre||'U').substring(0,2).toUpperCase(); if(sr)sr.textContent=found.rol||''; toast('Bienvenido '+(found.nombre||''),'ok'); }else{ err.style.display='block'; document.getElementById('loginPass').value=''; document.getElementById('loginPass').focus(); } } function doLogout(){ try{localStorage.removeItem('ls2-cu');}catch(e){} document.getElementById('loginUser').value=''; document.getElementById('loginPass').value=''; document.getElementById('loginErr').style.display='none'; document.getElementById('loginScreen').style.display='flex'; setTimeout(function(){document.getElementById('loginUser').focus();},100); } // ═══════ CAMARA ═══════ var _cam=false; function toggleCamara(){if(_cam){stopCamara();}else{if(typeof Quagga==='undefined'){var s=document.createElement('script');s.src='https://cdnjs.cloudflare.com/ajax/libs/quagga/0.12.1/quagga.min.js';s.onload=startCamara;s.onerror=function(){toast('Error cargando escaner','err');};document.head.appendChild(s);}else{startCamara();}}} function startCamara(){ var box=document.getElementById('camaraBox'),btn=document.getElementById('btnCamara'),msg=document.getElementById('camaraMensaje'); if(!box)return; box.style.display='block';if(btn)btn.textContent='Detener Camara';_cam=true; Quagga.init({inputStream:{name:'Live',type:'LiveStream',target:document.getElementById('camaraVisor'),constraints:{facingMode:'environment',width:640,height:230}},locator:{patchSize:'medium',halfSample:true},numOfWorkers:2,decoder:{readers:['ean_reader','ean_8_reader','code_128_reader','code_39_reader','upc_reader']},locate:true},function(err){ if(err){if(msg)msg.textContent='Sin acceso a camara (requiere HTTPS)';_cam=false;box.style.display='none';if(btn)btn.textContent='Usar Camara';return;} Quagga.start();if(msg)msg.textContent='Apunta al codigo de barras...'; }); var lc='',lt=0; Quagga.onDetected(function(d){ var code=d.codeResult.code,now=Date.now(); if(code===lc&&now-lt<2500)return;lc=code;lt=now;stopCamara(); var prod=P.find(function(p){return p.sku===code||p.barcode===code;}); var inp=document.getElementById('busq-input'); if(prod){if(inp){inp.value=prod.sku||code;inp.dispatchEvent(new Event('input'));}toast(prod.nom+' detectado','ok');} else{if(inp){inp.value=code;inp.dispatchEvent(new Event('input'));inp.focus();}toast('Codigo '+code+' buscado','warn');} }); } function stopCamara(){ if(!_cam)return;try{Quagga.stop();}catch(e){}_cam=false; var b=document.getElementById('camaraBox'),btn=document.getElementById('btnCamara'); if(b)b.style.display='none';if(btn)btn.textContent='Usar Camara'; } // ═══════ SURTIDO PARCIAL ═══════ var _ords=null; function abrirSurtir(id){ var o=PEDIDOS.find(function(x){return x.id===id;}); if(!o){toast('Orden no encontrada','err');return;} _ords=o; document.getElementById('surtirOrdenId').textContent='#'+id+' - '+o.solicitante; document.getElementById('surtirNota').value=''; document.getElementById('surtirResumen').style.display='none'; document.getElementById('modalSurtir').style.display='flex'; var c=document.getElementById('surtirProductos'); c.innerHTML=o.items.map(function(item){ var pr=P.find(function(p){return p.id===item.pid;}); var nom=item.nom||(pr?pr.nom:'Producto'); var sku=pr?pr.sku:''; var sol=parseInt(item.qty||1); var stk=pr?parseInt(pr.stock||0):0; var mx=Math.min(sol,stk); var sc=stk>=sol?'#60e0a0':stk>0?'#e8a020':'#ff6060'; var warn=mx0?'
Faltan '+(sol-stk)+' uds - quedaran pendientes
':''; var badge=stk===0?'Sin stock':mxStock insuf.':''; return '
'+ '
'+ '
'+nom+'
SKU: '+sku+'
'+ '
Solicitado: '+sol+'
'+ '
Stock: '+stk+'
'+ '
'+ 'Surtir:'+ ''+ ''+ ''+ '/ '+sol+''+badge+'
'+warn+'
'; }).join(''); updRes(); } function adjS(id,d,mx){var e=document.getElementById(id);if(!e)return;e.value=Math.max(0,Math.min(mx,parseInt(e.value||0)+d));updRes();} function clampS(e,mx){var v=parseInt(e.value||0);if(isNaN(v)||v<0)e.value=0;else if(v>mx)e.value=mx;} function updRes(){ if(!_ords)return; var r=document.getElementById('surtirResumen');if(!r)return; var ts=0,tq=0; _ords.items.forEach(function(it){var e=document.getElementById('si_'+it.pid);ts+=parseInt(e?e.value:0);tq+=parseInt(it.qty||1);}); if(ts===tq){r.style.cssText='background:rgba(96,224,160,.07);border:1px solid rgba(96,224,160,.2);border-radius:8px;padding:10px 14px;margin-bottom:16px;font-size:12px;color:#60e0a0;display:block';r.textContent='Surtido completo: '+ts+' de '+tq+' unidades';} else if(ts>0){r.style.cssText='background:rgba(232,160,32,.07);border:1px solid rgba(232,160,32,.25);border-radius:8px;padding:10px 14px;margin-bottom:16px;font-size:12px;color:#e8a020;display:block';r.textContent='Surtido parcial: '+ts+' de '+tq+' - '+(tq-ts)+' quedaran pendientes';} else r.style.display='none'; } function confirmarSurtir(){ if(!_ords)return; var ts=0,tq=0; _ords.items.forEach(function(it){ var e=document.getElementById('si_'+it.pid); var s=parseInt(e?e.value:0),sol=parseInt(it.qty||1); ts+=s;tq+=sol; if(s>0){var pr=P.find(function(p){return p.id===it.pid;});if(pr)pr.stock=Math.max(0,parseInt(pr.stock||0)-s);addMov(it.pid,'salida',s,'Orden #'+_ords.id+' - '+_ords.tipo,_ords.solicitante);} }); var nota=document.getElementById('surtirNota').value.trim(); _ords.estado=ts===0?'pendiente':ts