Inventario: la caja en la pestaña y sus dos reportes con la forma del diseño
LA PESTAÑA TENÍA NOMBRE Y NO CARA. `PanelTabIcon` es una cadena de casos por xmlid y el de Inventario faltaba, así que salía pelada entre cinco hermanas con icono. Entra una CAJA —tapa, cuerpo y asa—, de contorno y en currentColor como las otras cinco. No es el cubo del lanzador, que es un bloque relleno de 48 px y a 17 se lee como una mancha, ni el de Catálogo, que está a dos pestañas de distancia. LAS DOS PUERTAS DEL ALMACÉN se envuelven en una insignia redonda con tinte: rojo lo que se acabó, azul lo que entró y salió, y el glifo pasa de fa a SVG. Los dos tintes ya eran token; el verde claro faltaba y entra como `$inv-verde-tinte` junto a `$inv-verde`. Y LAS DOS PANTALLAS toman la forma del mockup: la plaza en versalita sobre el título —un reporte que se descarga y se manda no puede llevar la sucursal solo en la pantalla anterior—, el mes con flechas en vez del selector nativo y sin poder pasar del actual, las tarjetas de resumen reutilizando la misma pieza que la lista de existencias, el día y la hora en dos renglones, y las pastillas de estado con su punto. Las columnas de las dos tablas salen a variable —`$inv-cols-agotados` y `$inv-cols-libro`, junto a `$inv-cols`— y los iconos de Excel y PDF, que se usaban cuatro veces, a plantilla. De paso, un defecto que se veía: «cuándo se agotó» enseñaba la marca UTC cruda, «2026-09-03 13:32:25». Ahora dice «3 de septiembre / 07:32», con el huso de la casa. El dato crudo sigue viajando igual y el Excel y el PDF no cambian. Ninguna prueba nueva. Dos guardas de la del navegador apuntaban al marcado viejo del libro y pasan a apuntar al nuevo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
54138e1fdc
commit
eb6735aff5
6 files changed
+765
-164
No files matched your search
@@ -165,6 +165,17 @@
|
||||
<path d="M3.5 7.5 12 12l8.5-4.5M12 12v9" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</t>
|
||||
<t t-elif="seccion.xmlid === 'beyond_inventory.menu_beyond_inventario'">
|
||||
<!-- Una CAJA, no el cubo del lanzador: ese es un bloque relleno
|
||||
de 48 px y a 17, junto al texto, se lee como una mancha.
|
||||
Tampoco el cubo de Catálogo, que ya está a dos pestañas de
|
||||
distancia: ninguno de estos iconos comparte dibujo con otro. -->
|
||||
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<path d="M4.4 8.4h15.2v10.4a1.6 1.6 0 0 1-1.6 1.6H6a1.6 1.6 0 0 1-1.6-1.6V8.4Z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/>
|
||||
<path d="M3.2 4.6h17.6v3.8H3.2z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/>
|
||||
<path d="M10 12.4h4" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</t>
|
||||
<t t-elif="seccion.xmlid === 'beyond_branch.menu_personal'">
|
||||
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<rect x="3.2" y="6.6" width="17.6" height="13.8" rx="2.2" stroke="currentColor" stroke-width="1.7"/>
|
||||
|
||||
@@ -13,7 +13,7 @@ el dato y arriesgar que no coincidan.
|
||||
from datetime import datetime, time, timedelta
|
||||
|
||||
import pytz
|
||||
from babel.dates import format_datetime
|
||||
from babel.dates import format_date, format_datetime
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import AccessError, UserError
|
||||
@@ -184,6 +184,42 @@ class BeyondInventarioPantalla(models.AbstractModel):
|
||||
return format_datetime(local, "d 'de' MMM 'de' y",
|
||||
locale=self.env.lang or 'es_MX')
|
||||
|
||||
@api.model
|
||||
def _beyond_dia_y_hora(self, momento, mes_largo=False):
|
||||
"""(«9 de sept», «10:52») en hora local, para la celda «cuándo».
|
||||
|
||||
DOS PIEZAS Y NO UNA CADENA: la pantalla las pinta en dos renglones
|
||||
—el día se lee, la hora acompaña— y partir aquí una cadena ya
|
||||
formateada sería adivinar dónde está la coma. El huso es el de la
|
||||
casa (`TZ_LOCAL`), igual que en el resto de esta pantalla.
|
||||
"""
|
||||
if not momento:
|
||||
return '', ''
|
||||
local = pytz.utc.localize(momento).astimezone(TZ_LOCAL)
|
||||
lang = self.env.lang or 'es_MX'
|
||||
return (format_datetime(local, "d 'de' MMMM" if mes_largo else "d 'de' MMM",
|
||||
locale=lang),
|
||||
format_datetime(local, 'HH:mm', locale=lang))
|
||||
|
||||
@api.model
|
||||
def _beyond_mes_texto(self, mes):
|
||||
"""'2026-09' → «septiembre de 2026», para el paso de mes."""
|
||||
desde, _tope = self._beyond_mes_limites(mes)
|
||||
return format_date(desde.date(), "MMMM 'de' y",
|
||||
locale=self.env.lang or 'es_MX')
|
||||
|
||||
@api.model
|
||||
def _beyond_rango_texto(self, desde, hasta):
|
||||
"""«1 al 30 de septiembre», o con los dos meses si los cruza."""
|
||||
lang = self.env.lang or 'es_MX'
|
||||
if desde == hasta:
|
||||
return format_date(desde, "d 'de' MMMM", locale=lang)
|
||||
if (desde.year, desde.month) == (hasta.year, hasta.month):
|
||||
return '%s al %s' % (desde.day,
|
||||
format_date(hasta, "d 'de' MMMM", locale=lang))
|
||||
return '%s al %s' % (format_date(desde, "d 'de' MMM", locale=lang),
|
||||
format_date(hasta, "d 'de' MMM", locale=lang))
|
||||
|
||||
# ── 2 · Recibir mercancía ───────────────────────────────────────────
|
||||
|
||||
@api.model
|
||||
@@ -393,17 +429,24 @@ class BeyondInventarioPantalla(models.AbstractModel):
|
||||
continue # el PRIMER quiebre del mes; los demás son eco
|
||||
vistos.add(articulo.id)
|
||||
hoy = Existencia.beyond_cantidad_de(articulo, sucursal)
|
||||
# `fecha` es el dato crudo —ordena la lista y viaja al archivo—;
|
||||
# `dia` y `hora` son cómo se lee en pantalla. Se mandan los tres
|
||||
# para no formatear en dos sitios ni partir cadenas en el cliente.
|
||||
dia, hora = self._beyond_dia_y_hora(movimiento.fecha, mes_largo=True)
|
||||
filas.append({
|
||||
'id': articulo.id,
|
||||
'nombre': articulo.name,
|
||||
'fecha': fields.Datetime.to_string(movimiento.fecha),
|
||||
'dia': dia,
|
||||
'hora': hora,
|
||||
'quedo': movimiento.resultante,
|
||||
'hoy': hoy,
|
||||
'repuesto': hoy > 0,
|
||||
})
|
||||
filas.sort(key=lambda f: f['fecha'])
|
||||
return {'sucursal': {'id': sucursal.id, 'nombre': sucursal.name},
|
||||
'mes': mes, 'filas': filas,
|
||||
'mes': mes, 'mes_texto': self._beyond_mes_texto(mes),
|
||||
'filas': filas,
|
||||
'sucursales': [{'id': b.id, 'nombre': b.name}
|
||||
for b in self._beyond_sucursales_elegibles()]}
|
||||
|
||||
@@ -527,9 +570,12 @@ class BeyondInventarioPantalla(models.AbstractModel):
|
||||
es_entrada = m.tipo == 'entrada'
|
||||
con_costo = m.costo_unitario > 0
|
||||
importe = m.cantidad * m.costo_unitario if con_costo else None
|
||||
dia, hora = self._beyond_dia_y_hora(m.fecha)
|
||||
filas.append({
|
||||
'id': m.id,
|
||||
'fecha': self._beyond_cuando_largo(m.fecha),
|
||||
'dia': dia,
|
||||
'hora': hora,
|
||||
'articulo': m.product_tmpl_id.name,
|
||||
'tipo': m.tipo,
|
||||
'movimiento': etiquetas.get(m.tipo, m.tipo),
|
||||
@@ -552,7 +598,8 @@ class BeyondInventarioPantalla(models.AbstractModel):
|
||||
sin_costo += 1
|
||||
return {'sucursal': {'id': sucursal.id, 'nombre': sucursal.name},
|
||||
'periodo': {'desde': desde.isoformat(),
|
||||
'hasta': hasta.isoformat(), 'etiqueta': etiqueta},
|
||||
'hasta': hasta.isoformat(), 'etiqueta': etiqueta,
|
||||
'texto': self._beyond_rango_texto(desde, hasta)},
|
||||
'tipo': tipo, 'filas': filas,
|
||||
'resumen': {'entro': entro, 'salio': salio,
|
||||
'movimientos': len(filas),
|
||||
|
||||
@@ -144,11 +144,42 @@ export class BeyondInventario extends Component {
|
||||
[this.state.mesAgotados, this.state.filtros.branch_id]);
|
||||
}
|
||||
|
||||
async cambiarMesAgotados(ev) {
|
||||
this.state.mesAgotados = ev.target.value;
|
||||
/** Un mes a la vez, hacia atrás sin tope y hacia delante hasta el
|
||||
* actual: el reporte de un mes que no ha ocurrido siempre sale vacío,
|
||||
* y un vacío sin explicación se lee como que algo falla. */
|
||||
async pasoMes(cuantos) {
|
||||
const [anio, mes] = this.state.mesAgotados.split("-").map(Number);
|
||||
const destino = new Date(Date.UTC(anio, mes - 1 + cuantos, 1))
|
||||
.toISOString()
|
||||
.slice(0, 7);
|
||||
if (destino > this.mesDeHoy) {
|
||||
return;
|
||||
}
|
||||
this.state.mesAgotados = destino;
|
||||
await this.cargarAgotados();
|
||||
}
|
||||
|
||||
get mesDeHoy() {
|
||||
return new Date().toISOString().slice(0, 7);
|
||||
}
|
||||
|
||||
get mesSiguienteBloqueado() {
|
||||
return this.state.mesAgotados >= this.mesDeHoy;
|
||||
}
|
||||
|
||||
/** Las tres cifras de arriba salen de los MISMOS renglones que se
|
||||
* pintan: contarlas aparte en el servidor sería tener dos verdades
|
||||
* sobre la misma lista. */
|
||||
get resumenAgotados() {
|
||||
const filas = this.state.agotados?.filas || [];
|
||||
const repuestos = filas.filter((f) => f.repuesto).length;
|
||||
return {
|
||||
total: filas.length,
|
||||
repuestos,
|
||||
pendientes: filas.length - repuestos,
|
||||
};
|
||||
}
|
||||
|
||||
async descargarAgotados(formato) {
|
||||
if (this.state.descargando) {
|
||||
return;
|
||||
|
||||
@@ -12,6 +12,9 @@ $inv-ambar: #8A6410;
|
||||
$inv-ambar-tinte: #FBF1DC;
|
||||
// Verde: hay de sobra.
|
||||
$inv-verde: #1F6B4A;
|
||||
// Su tinte, para las insignias y pastillas que dicen «sí, ya está»: lo
|
||||
// piden las tarjetas de «Ya repuestos» y «Entró» y la pastilla de repuesto.
|
||||
$inv-verde-tinte: #E6F0E8;
|
||||
// Piezas locales del lienzo.
|
||||
$inv-linea: #F3F1EB;
|
||||
$inv-campo: #FBFAF7;
|
||||
@@ -23,6 +26,12 @@ $inv-campo: #FBFAF7;
|
||||
// columnas hacia la derecha respecto a las filas.
|
||||
$inv-cols: 1.5fr 1fr 0.8fr 0.5fr 0.9fr 180px;
|
||||
|
||||
// Las otras dos tablas de la sección, por el mismo motivo: encabezado y
|
||||
// filas son rejillas HERMANAS y la retícula se declara una vez para las dos.
|
||||
$inv-cols-agotados: minmax(0, 2fr) minmax(150px, 1.2fr) minmax(80px, .6fr)
|
||||
minmax(64px, .6fr) minmax(110px, 1fr);
|
||||
$inv-cols-libro: .9fr minmax(0, 2.4fr) .9fr .5fr .6fr .8fr .85fr minmax(0, 1.5fr);
|
||||
|
||||
// `.o_action` de Odoo es height:100% + overflow:hidden: el que desplaza es
|
||||
// ESTE. El max-width va en la hoja de adentro, nunca aquí.
|
||||
.o_beyond_inventario {
|
||||
@@ -1117,92 +1126,429 @@ body.beyond_panel_azul {
|
||||
// .beyond_tabla_eje` —seis columnas— y sus retículas propias no se
|
||||
// aplicaban. El libro salía partido en dos renglones (8-sep).
|
||||
.o_beyond_inventario {
|
||||
.beyond_inventario_agotados_btn {
|
||||
border: 1px solid $inv-linea;
|
||||
border-radius: 10px;
|
||||
padding: 10px 14px;
|
||||
background: #fff;
|
||||
i { margin-right: 6px; }
|
||||
|
||||
// ── Las dos puertas del almacén ─────────────────────────────────────
|
||||
// Insignia redonda con tinte y el nombre al lado: es lo que las separa
|
||||
// de un botón cualquiera de la barra. El tinte dice de qué van —rojo lo
|
||||
// que se acabó, azul lo que entró y salió— sin tener que leer.
|
||||
.beyond_puerta {
|
||||
all: unset;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 6px 20px 6px 6px;
|
||||
border-radius: 999px;
|
||||
background: $beyond-panel-tarjeta;
|
||||
border: 1px solid $beyond-surface-active;
|
||||
font-size: 14.5px;
|
||||
font-weight: 800;
|
||||
letter-spacing: -.01em;
|
||||
color: $beyond-ink;
|
||||
white-space: nowrap;
|
||||
transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
|
||||
|
||||
&:hover, &:focus-visible {
|
||||
background: $beyond-surface-hover;
|
||||
border-color: $beyond-panel-anillo;
|
||||
}
|
||||
|
||||
&:active { transform: scale(.98); }
|
||||
}
|
||||
.beyond_agotados_mes {
|
||||
border: 1px solid $inv-linea;
|
||||
border-radius: 8px;
|
||||
padding: 8px 10px;
|
||||
|
||||
.beyond_puerta_insignia {
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.beyond_puerta_agotados .beyond_puerta_insignia {
|
||||
background: $beyond-panel-rojo-suave;
|
||||
color: $beyond-panel-rojo;
|
||||
}
|
||||
|
||||
.beyond_puerta_libro .beyond_puerta_insignia {
|
||||
background: $beyond-panel-azul-tinte;
|
||||
color: $beyond-panel-azul-inventario;
|
||||
}
|
||||
|
||||
// ── El encabezado de las dos pantallas ──────────────────────────────
|
||||
.beyond_volver {
|
||||
all: unset;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 11px 22px;
|
||||
border-radius: 999px;
|
||||
background: $beyond-surface-hover;
|
||||
color: $beyond-ink;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
white-space: nowrap;
|
||||
transition: background 140ms ease;
|
||||
|
||||
&:hover, &:focus-visible { background: $beyond-surface-active; }
|
||||
}
|
||||
|
||||
// El título con la plaza encima: en un reporte que se descarga y se
|
||||
// manda, de qué sucursal es no puede quedarse en la pantalla anterior.
|
||||
.beyond_inventario_pila {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.beyond_inventario_plaza_rotulo {
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
letter-spacing: .08em;
|
||||
text-transform: uppercase;
|
||||
color: $beyond-ink-muted;
|
||||
}
|
||||
|
||||
.beyond_inventario_pila .beyond_inventario_titulo { font-size: 21px; }
|
||||
|
||||
.beyond_paso_mes {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 4px;
|
||||
border-radius: 999px;
|
||||
background: $beyond-panel-tarjeta;
|
||||
border: 1px solid $beyond-surface-active;
|
||||
|
||||
button {
|
||||
all: unset;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 999px;
|
||||
color: $beyond-ink-soft;
|
||||
transition: background 140ms ease;
|
||||
|
||||
&:hover, &:focus-visible { background: $inv-linea; }
|
||||
|
||||
// Adelante no se puede pasar del mes en curso: el reporte de un
|
||||
// mes que no ha ocurrido sale vacío siempre.
|
||||
&:disabled { cursor: default; opacity: .35; background: none; }
|
||||
}
|
||||
}
|
||||
|
||||
.beyond_paso_mes_texto {
|
||||
min-width: 150px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
color: $beyond-ink;
|
||||
}
|
||||
|
||||
.beyond_agotados_relleno { flex: 1; }
|
||||
.beyond_agotados_descarga { border: 1px solid $inv-linea; }
|
||||
|
||||
.beyond_descarga {
|
||||
all: unset;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 10px 18px;
|
||||
border-radius: 999px;
|
||||
background: $beyond-surface-hover;
|
||||
color: $beyond-ink-soft;
|
||||
font-size: 13.5px;
|
||||
font-weight: 800;
|
||||
transition: background 140ms ease;
|
||||
|
||||
&:hover, &:focus-visible { background: $beyond-surface-active; }
|
||||
&:disabled { cursor: default; opacity: .55; }
|
||||
}
|
||||
|
||||
// La hoja va en tinta y la marca del formato en su color: se distinguen
|
||||
// de reojo sin leer las tres letras.
|
||||
.beyond_icono_excel { color: $inv-verde; }
|
||||
.beyond_icono_pdf { color: $beyond-panel-rojo; }
|
||||
|
||||
// ── Las tarjetas de resumen, las mismas de existencias ──────────────
|
||||
// Aquí no filtran —el mes o el periodo ya son el filtro—, así que no
|
||||
// son botones: mismo dibujo, sin la promesa de que se pican.
|
||||
.beyond_indicador_fijo {
|
||||
cursor: default;
|
||||
|
||||
&:hover { box-shadow: none; }
|
||||
}
|
||||
|
||||
.beyond_repuesto .beyond_cifra {
|
||||
background: $inv-verde-tinte;
|
||||
color: $inv-verde;
|
||||
}
|
||||
|
||||
// El dinero no cabe en un cuadro de 44: la insignia crece con él.
|
||||
.beyond_cifra_ancha {
|
||||
width: auto;
|
||||
min-width: 44px;
|
||||
padding: 0 14px;
|
||||
font-size: 17px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// ── Las dos tablas ──────────────────────────────────────────────────
|
||||
.beyond_agotados_eje,
|
||||
.beyond_agotados_fila {
|
||||
display: grid;
|
||||
grid-template-columns: 1.6fr 1fr 0.6fr 0.6fr 0.7fr;
|
||||
gap: 12px;
|
||||
grid-template-columns: $inv-cols-agotados;
|
||||
gap: 14px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.beyond_libro_eje,
|
||||
.beyond_libro_fila {
|
||||
display: grid;
|
||||
grid-template-columns: 0.9fr 1.5fr 0.7fr 0.5fr 0.5fr 0.6fr 0.7fr 1.3fr;
|
||||
gap: 12px;
|
||||
grid-template-columns: $inv-cols-libro;
|
||||
gap: 14px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.beyond_eje_centro { text-align: center; }
|
||||
|
||||
// El punto de color delante del nombre: dice de un vistazo si eso sigue
|
||||
// sin resolverse, sin gastar una columna en decirlo.
|
||||
.beyond_articulo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.beyond_punto {
|
||||
flex: none;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
border-radius: 999px;
|
||||
background: $beyond-panel-anillo;
|
||||
}
|
||||
|
||||
.beyond_punto_azul { background: $beyond-panel-azul-inventario; }
|
||||
.beyond_punto_rojo { background: $beyond-panel-rojo; }
|
||||
|
||||
// El día se lee; la hora acompaña. Dos renglones y no una cadena con
|
||||
// coma: el día es lo que se busca y tiene que poder saltarse a la vista.
|
||||
.beyond_cuando {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.beyond_cuando_dia {
|
||||
font-size: 14.5px;
|
||||
font-weight: 700;
|
||||
color: $beyond-ink;
|
||||
}
|
||||
|
||||
.beyond_cuando_hora {
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
color: $beyond-ink-muted;
|
||||
}
|
||||
|
||||
.beyond_cifra_fila {
|
||||
font-size: 19px;
|
||||
font-weight: 800;
|
||||
line-height: 1;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.beyond_resultante {
|
||||
font-size: 15px;
|
||||
font-weight: 800;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.beyond_importe { font-weight: 800; }
|
||||
|
||||
.beyond_hay { color: $inv-verde; }
|
||||
.beyond_falta { color: $beyond-panel-rojo; }
|
||||
.beyond_apagado { color: $beyond-ink-muted; }
|
||||
|
||||
// ── Pastillas de estado ─────────────────────────────────────────────
|
||||
.beyond_agotados_pildora,
|
||||
.beyond_libro_tipo {
|
||||
// `justify-self` y no solo `inline-flex`: en una rejilla, el hijo se
|
||||
// estira a toda la columna aunque sea inline, y la pastilla salía
|
||||
// como una barra de 140 px. Ocupa lo que dice su texto.
|
||||
justify-self: start;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
padding: 5px 12px;
|
||||
border-radius: 999px;
|
||||
font-size: 12.5px;
|
||||
font-weight: 800;
|
||||
white-space: nowrap;
|
||||
background: $beyond-surface-hover;
|
||||
color: $beyond-ink-soft;
|
||||
}
|
||||
|
||||
.beyond_pildora_punto {
|
||||
flex: none;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 999px;
|
||||
background: currentColor;
|
||||
}
|
||||
|
||||
.beyond_agotados_pildora.beyond_hay {
|
||||
background: $inv-verde-tinte;
|
||||
color: $inv-verde;
|
||||
}
|
||||
|
||||
// «Aún no» no es un error, es una tarea pendiente: ámbar y no rojo.
|
||||
.beyond_agotados_pildora.beyond_falta {
|
||||
background: $inv-ambar-tinte;
|
||||
color: $inv-ambar;
|
||||
}
|
||||
|
||||
.beyond_libro_entrada {
|
||||
background: $inv-verde-tinte;
|
||||
color: $inv-verde;
|
||||
}
|
||||
|
||||
.beyond_libro_venta {
|
||||
background: $beyond-panel-rojo-suave;
|
||||
color: $beyond-panel-rojo;
|
||||
}
|
||||
|
||||
.beyond_libro_ajuste {
|
||||
background: $inv-ambar-tinte;
|
||||
color: $inv-ambar;
|
||||
}
|
||||
|
||||
// ── Los filtros del libro ───────────────────────────────────────────
|
||||
.beyond_libro_filtros {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
padding: 12px 16px;
|
||||
margin-bottom: 12px;
|
||||
background: #fff;
|
||||
border: 1px solid $inv-linea;
|
||||
border-radius: 12px;
|
||||
gap: 22px;
|
||||
}
|
||||
|
||||
.beyond_libro_grupo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.beyond_libro_etiqueta {
|
||||
font-size: 0.75rem;
|
||||
letter-spacing: 0.04em;
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
letter-spacing: .08em;
|
||||
text-transform: uppercase;
|
||||
color: #7a7a7a;
|
||||
color: $beyond-ink-muted;
|
||||
}
|
||||
.beyond_libro_pastilla {
|
||||
border: 1px solid $inv-linea;
|
||||
background: #fff;
|
||||
|
||||
// El riel bajo las pastillas: el grupo se lee como UN control con una
|
||||
// opción puesta, y no como cuatro botones sueltos que casualmente van
|
||||
// juntos.
|
||||
.beyond_libro_riel {
|
||||
display: flex;
|
||||
padding: 3px;
|
||||
border-radius: 999px;
|
||||
padding: 6px 14px;
|
||||
font-size: 0.9rem;
|
||||
background: $beyond-surface-hover;
|
||||
}
|
||||
|
||||
.beyond_libro_pastilla {
|
||||
all: unset;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
padding: 9px 18px;
|
||||
border-radius: 999px;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
color: $beyond-ink-soft;
|
||||
white-space: nowrap;
|
||||
transition: background 140ms ease, color 140ms ease;
|
||||
|
||||
&.beyond_activa {
|
||||
background: $beyond-panel-azul-inventario;
|
||||
border-color: $beyond-panel-azul-inventario;
|
||||
color: #fff;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
.beyond_libro_tipo { font-size: 0.85rem; }
|
||||
.beyond_libro_periodo { color: #7a7a7a; font-size: 0.85rem; }
|
||||
.beyond_libro_resumen {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
padding: 12px 16px;
|
||||
margin-bottom: 12px;
|
||||
background: #fff;
|
||||
border: 1px solid $inv-linea;
|
||||
border-radius: 12px;
|
||||
b { font-weight: 600; margin-right: 6px; }
|
||||
}
|
||||
// Sin costo se DICE, nunca $0 (ADR-029): ámbar, no un número falso.
|
||||
.beyond_libro_sin_costo,
|
||||
.beyond_libro_sin_costo_celda {
|
||||
color: #b26a00;
|
||||
font-style: italic;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
.beyond_libro_nota {
|
||||
|
||||
// Las dos fechas son UN dato, así que van en una sola pieza. Se aplican
|
||||
// cuando las dos están puestas: con una sola el periodo no existe.
|
||||
.beyond_libro_rango {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 16px;
|
||||
border-radius: 999px;
|
||||
background: $beyond-panel-tarjeta;
|
||||
border: 1px solid $beyond-surface-active;
|
||||
color: $beyond-panel-azul-inventario;
|
||||
|
||||
input {
|
||||
all: unset;
|
||||
box-sizing: border-box;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: $beyond-ink;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.beyond_libro_a {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: $beyond-ink-muted;
|
||||
}
|
||||
|
||||
// Sin costo se DICE, nunca $0 (ADR-029): ámbar, no un número falso.
|
||||
.beyond_libro_sin_costo,
|
||||
.beyond_libro_sin_costo_celda {
|
||||
color: $inv-ambar;
|
||||
font-size: 12.5px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.beyond_libro_sin_costo_celda { font-style: italic; }
|
||||
|
||||
// Quién arriba y el detalle abajo: son dos datos y no una frase, y en
|
||||
// una columna estrecha la frase se partía por donde tocara.
|
||||
.beyond_libro_nota {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.beyond_libro_quien {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: $beyond-ink;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.beyond_libro_detalle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
color: $beyond-ink-muted;
|
||||
min-width: 0;
|
||||
|
||||
> :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
}
|
||||
}
|
||||
@@ -74,13 +74,33 @@
|
||||
t-on-click="abrirRecepcion">
|
||||
<i class="fa fa-inbox"/>Recibir mercancía
|
||||
</button>
|
||||
<button type="button" class="beyond_inventario_agotados_btn"
|
||||
<!-- Las dos puertas a los reportes del almacén. La
|
||||
insignia redonda con tinte es lo que las distingue
|
||||
de un botón cualquiera: rojo lo que se acabó, azul
|
||||
lo que entró y salió. -->
|
||||
<button type="button" class="beyond_puerta beyond_puerta_agotados"
|
||||
t-on-click="abrirAgotados">
|
||||
<i class="fa fa-calendar-times-o"/>Agotados del mes
|
||||
<span class="beyond_puerta_insignia">
|
||||
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<rect x="3.4" y="5.4" width="17.2" height="15.2" rx="3.2"
|
||||
stroke="currentColor" stroke-width="1.8"/>
|
||||
<path d="M7.8 3.4v3.6M16.2 3.4v3.6M3.4 10.2h17.2"
|
||||
stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
|
||||
<path d="M9.9 13.8l4.2 4.2M14.1 13.8l-4.2 4.2"
|
||||
stroke="currentColor" stroke-width="1.9" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</span>Agotados del mes
|
||||
</button>
|
||||
<button type="button" class="beyond_inventario_agotados_btn"
|
||||
<button type="button" class="beyond_puerta beyond_puerta_libro"
|
||||
t-on-click="abrirLibro">
|
||||
<i class="fa fa-exchange"/>Entradas y salidas
|
||||
<span class="beyond_puerta_insignia">
|
||||
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<path d="M4.2 9h14.2M15.2 5.8 18.6 9" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M19.8 15H5.6M8.6 18.2 5.2 15" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>Entradas y salidas
|
||||
</button>
|
||||
|
||||
</div>
|
||||
@@ -161,126 +181,241 @@
|
||||
repuesto — lo que revela un abasto que falla repetido. -->
|
||||
<t t-if="state.pantalla === 'agotados'">
|
||||
<div class="beyond_inventario_encabezado">
|
||||
<button type="button" class="beyond_volver"
|
||||
t-on-click="volver">
|
||||
<i class="fa fa-arrow-left"/> Inventario
|
||||
<button type="button" class="beyond_volver" t-on-click="volver">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<path d="M14.5 6l-6 6 6 6" stroke="currentColor" stroke-width="2.2"
|
||||
stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>Inventario
|
||||
</button>
|
||||
<span class="beyond_inventario_titulo">Agotados del mes</span>
|
||||
<input type="month" class="beyond_agotados_mes"
|
||||
t-att-value="state.mesAgotados"
|
||||
t-on-change="cambiarMesAgotados"/>
|
||||
<!-- La plaza encima del título: en un reporte que se
|
||||
descarga y se manda, de qué sucursal es no puede
|
||||
estar solo en el selector de la pantalla anterior. -->
|
||||
<div class="beyond_inventario_pila">
|
||||
<span class="beyond_inventario_plaza_rotulo"
|
||||
t-esc="state.agotados?.sucursal?.nombre || sucursalActual"/>
|
||||
<span class="beyond_inventario_titulo">Agotados del mes</span>
|
||||
</div>
|
||||
<!-- Un mes a la vez, y no se puede pasar del actual: el
|
||||
reporte de un mes que no ha ocurrido siempre está
|
||||
vacío, y un vacío sin explicación se lee como error. -->
|
||||
<div class="beyond_paso_mes">
|
||||
<button type="button" aria-label="Mes anterior"
|
||||
t-on-click="() => this.pasoMes(-1)">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<path d="M14.5 6l-6 6 6 6" stroke="currentColor" stroke-width="2.2"
|
||||
stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<span class="beyond_paso_mes_texto" t-esc="state.agotados?.mes_texto || ''"/>
|
||||
<button type="button" aria-label="Mes siguiente"
|
||||
t-att-disabled="mesSiguienteBloqueado"
|
||||
t-on-click="() => this.pasoMes(1)">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<path d="M9.5 6l6 6-6 6" stroke="currentColor" stroke-width="2.2"
|
||||
stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<span class="beyond_agotados_relleno"/>
|
||||
<button type="button" class="btn beyond_agotados_descarga"
|
||||
<button type="button" class="beyond_descarga"
|
||||
t-att-disabled="state.descargando"
|
||||
t-on-click="() => this.descargarAgotados('xlsx')">
|
||||
<i class="fa fa-file-excel-o"/> Excel
|
||||
<t t-call="beyond_inventory.IconoExcel"/>Excel
|
||||
</button>
|
||||
<button type="button" class="btn beyond_agotados_descarga"
|
||||
<button type="button" class="beyond_descarga"
|
||||
t-att-disabled="state.descargando"
|
||||
t-on-click="() => this.descargarAgotados('pdf')">
|
||||
<i class="fa fa-file-pdf-o"/> PDF
|
||||
<t t-call="beyond_inventory.IconoPdf"/>PDF
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div t-if="!state.agotados" class="beyond_inventario_vacio">Cargando…</div>
|
||||
<div t-elif="!state.agotados.filas.length" class="beyond_inventario_vacio">
|
||||
<i class="fa fa-check-circle"/>
|
||||
<b>Nada se agotó en este mes</b>
|
||||
<span>Ningún artículo de <t t-esc="state.agotados.sucursal.nombre"/>
|
||||
tocó cero durante <t t-esc="state.agotados.mes"/>.</span>
|
||||
</div>
|
||||
<div t-else="" class="beyond_tabla">
|
||||
<div class="beyond_tabla_eje beyond_agotados_eje">
|
||||
<span>Artículo</span>
|
||||
<span>Cuándo se agotó</span>
|
||||
<span class="beyond_eje_derecha">Quedó en</span>
|
||||
<span class="beyond_eje_derecha">Hoy</span>
|
||||
<span>¿Repuesto?</span>
|
||||
</div>
|
||||
<t t-foreach="state.agotados.filas" t-as="fila" t-key="fila.id">
|
||||
<div class="beyond_tabla_fila beyond_agotados_fila">
|
||||
<span class="beyond_tabla_nombre" t-esc="fila.nombre"/>
|
||||
<span t-esc="fila.fecha"/>
|
||||
<span class="beyond_eje_derecha" t-esc="numero(fila.quedo)"/>
|
||||
<span class="beyond_eje_derecha" t-esc="numero(fila.hoy)"/>
|
||||
<span t-att-class="fila.repuesto ? 'beyond_hay' : 'beyond_falta'"
|
||||
class="beyond_agotados_pildora"
|
||||
t-esc="fila.repuesto ? 'Sí' : 'Aún no'"/>
|
||||
<t t-else="">
|
||||
<!-- Las mismas tarjetas que la pantalla de existencias:
|
||||
cuántos se acabaron, cuántos volvieron y cuántos
|
||||
siguen sin nada. No filtran —el mes ya es el filtro—,
|
||||
así que aquí son de leer y no botones. -->
|
||||
<div class="beyond_inventario_indicadores">
|
||||
<div class="beyond_indicador beyond_indicador_fijo beyond_negativa">
|
||||
<span class="beyond_cifra" t-esc="resumenAgotados.total"/>
|
||||
<div class="beyond_indicador_texto">
|
||||
<span class="beyond_indicador_titulo">Se agotaron</span>
|
||||
<span class="beyond_indicador_pie">Llegaron a cero o abajo este mes</span>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
<div class="beyond_indicador beyond_indicador_fijo beyond_repuesto">
|
||||
<span class="beyond_cifra" t-esc="resumenAgotados.repuestos"/>
|
||||
<div class="beyond_indicador_texto">
|
||||
<span class="beyond_indicador_titulo">Ya repuestos</span>
|
||||
<span class="beyond_indicador_pie">Volvieron a tener existencia</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="beyond_indicador beyond_indicador_fijo beyond_alerta">
|
||||
<span class="beyond_cifra" t-esc="resumenAgotados.pendientes"/>
|
||||
<div class="beyond_indicador_texto">
|
||||
<span class="beyond_indicador_titulo">Siguen en cero</span>
|
||||
<span class="beyond_indicador_pie">Conviene recibirlos pronto</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="!state.agotados.filas.length" class="beyond_inventario_vacio">
|
||||
<i class="fa fa-check-circle"/>
|
||||
<b>Nada se agotó en <t t-esc="state.agotados.mes_texto"/></b>
|
||||
<span>Ningún artículo de <t t-esc="state.agotados.sucursal.nombre"/>
|
||||
tocó cero en ese mes. Cambia de mes para ver otros periodos.</span>
|
||||
</div>
|
||||
<div t-else="" class="beyond_tabla">
|
||||
<div class="beyond_tabla_eje beyond_agotados_eje">
|
||||
<span>Artículo</span>
|
||||
<span>Cuándo se agotó</span>
|
||||
<span class="beyond_eje_derecha">Quedó en</span>
|
||||
<span class="beyond_eje_derecha">Hoy</span>
|
||||
<span class="beyond_eje_centro">¿Repuesto?</span>
|
||||
</div>
|
||||
<t t-foreach="state.agotados.filas" t-as="fila" t-key="fila.id">
|
||||
<div class="beyond_tabla_fila beyond_agotados_fila">
|
||||
<span class="beyond_articulo">
|
||||
<span class="beyond_punto"
|
||||
t-att-class="fila.repuesto ? 'beyond_punto_azul' : 'beyond_punto_rojo'"/>
|
||||
<span class="beyond_tabla_nombre" t-esc="fila.nombre"/>
|
||||
</span>
|
||||
<span class="beyond_cuando">
|
||||
<span class="beyond_cuando_dia" t-esc="fila.dia"/>
|
||||
<span class="beyond_cuando_hora" t-esc="fila.hora"/>
|
||||
</span>
|
||||
<span class="beyond_eje_derecha beyond_cifra_fila beyond_falta"
|
||||
t-esc="numero(fila.quedo)"/>
|
||||
<span class="beyond_eje_derecha beyond_cifra_fila"
|
||||
t-att-class="fila.repuesto ? '' : 'beyond_apagado'"
|
||||
t-esc="numero(fila.hoy)"/>
|
||||
<span class="beyond_eje_centro">
|
||||
<span class="beyond_agotados_pildora"
|
||||
t-att-class="fila.repuesto ? 'beyond_hay' : 'beyond_falta'">
|
||||
<span class="beyond_pildora_punto"/>
|
||||
<t t-esc="fila.repuesto ? 'Sí' : 'Aún no'"/>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<!-- ══ 1c · El libro del almacén ══
|
||||
El historial por artículo cuenta la vida de UNO; este la del
|
||||
almacén: todo lo que entró y salió en el periodo (8-sep).
|
||||
Los atajos son de calendario, como en Gastos, y el rango a
|
||||
mano manda sobre el atajo. Sin costo se DICE, nunca $0. -->
|
||||
<t t-if="state.pantalla === 'libro'">
|
||||
<div class="beyond_inventario_encabezado">
|
||||
<button type="button" class="beyond_volver"
|
||||
t-on-click="volver">
|
||||
<i class="fa fa-arrow-left"/> Inventario
|
||||
<button type="button" class="beyond_volver" t-on-click="volver">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<path d="M14.5 6l-6 6 6 6" stroke="currentColor" stroke-width="2.2"
|
||||
stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>Inventario
|
||||
</button>
|
||||
<span class="beyond_inventario_titulo">Entradas y salidas</span>
|
||||
<div class="beyond_inventario_pila">
|
||||
<span class="beyond_inventario_plaza_rotulo"
|
||||
t-esc="state.libro?.sucursal?.nombre || sucursalActual"/>
|
||||
<span class="beyond_inventario_titulo">Entradas y salidas</span>
|
||||
</div>
|
||||
<span class="beyond_agotados_relleno"/>
|
||||
<button type="button" class="btn beyond_agotados_descarga"
|
||||
<button type="button" class="beyond_descarga"
|
||||
t-att-disabled="state.descargando"
|
||||
t-on-click="() => this.descargarLibro('xlsx')">
|
||||
<i class="fa fa-file-excel-o"/> Excel
|
||||
<t t-call="beyond_inventory.IconoExcel"/>Excel
|
||||
</button>
|
||||
<button type="button" class="btn beyond_agotados_descarga"
|
||||
<button type="button" class="beyond_descarga"
|
||||
t-att-disabled="state.descargando"
|
||||
t-on-click="() => this.descargarLibro('pdf')">
|
||||
<i class="fa fa-file-pdf-o"/> PDF
|
||||
<t t-call="beyond_inventory.IconoPdf"/>PDF
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="beyond_libro_filtros">
|
||||
<div class="beyond_libro_grupo">
|
||||
<span class="beyond_libro_etiqueta">Periodo</span>
|
||||
<t t-foreach="[['hoy','Hoy'],['semana','Esta semana'],['mes','Este mes'],['anio','Este año']]"
|
||||
t-as="atajo" t-key="atajo[0]">
|
||||
<button type="button" class="beyond_libro_pastilla"
|
||||
t-att-class="{ beyond_activa: !state.filtrosLibro.desde and state.filtrosLibro.periodo === atajo[0] }"
|
||||
t-on-click="() => this.periodoLibro(atajo[0])"
|
||||
t-esc="atajo[1]"/>
|
||||
</t>
|
||||
<div class="beyond_libro_riel">
|
||||
<t t-foreach="[['hoy','Hoy'],['semana','Esta semana'],['mes','Este mes'],['anio','Este año']]"
|
||||
t-as="atajo" t-key="atajo[0]">
|
||||
<button type="button" class="beyond_libro_pastilla"
|
||||
t-att-class="{ beyond_activa: !state.filtrosLibro.desde and state.filtrosLibro.periodo === atajo[0] }"
|
||||
t-on-click="() => this.periodoLibro(atajo[0])"
|
||||
t-esc="atajo[1]"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<div class="beyond_libro_grupo">
|
||||
<span class="beyond_libro_etiqueta">Rango de fechas</span>
|
||||
<input type="date" class="beyond_agotados_mes"
|
||||
t-att-value="state.filtrosLibro.desde"
|
||||
t-on-change="(ev) => this.rangoLibro('desde', ev)"/>
|
||||
<input type="date" class="beyond_agotados_mes"
|
||||
t-att-value="state.filtrosLibro.hasta"
|
||||
t-on-change="(ev) => this.rangoLibro('hasta', ev)"/>
|
||||
<span class="beyond_libro_etiqueta">Rango</span>
|
||||
<!-- Las dos fechas en una sola pieza: son un dato, no
|
||||
dos. Se aplica solo cuando las dos están puestas
|
||||
—con una sola el periodo no existe todavía—. -->
|
||||
<div class="beyond_libro_rango">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<rect x="3.4" y="5.4" width="17.2" height="15.2" rx="3.2"
|
||||
stroke="currentColor" stroke-width="1.8"/>
|
||||
<path d="M7.8 3.4v3.6M16.2 3.4v3.6M3.4 10.2h17.2"
|
||||
stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<input type="date" t-att-value="state.filtrosLibro.desde"
|
||||
t-on-change="(ev) => this.rangoLibro('desde', ev)"/>
|
||||
<span class="beyond_libro_a">a</span>
|
||||
<input type="date" t-att-value="state.filtrosLibro.hasta"
|
||||
t-on-change="(ev) => this.rangoLibro('hasta', ev)"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="beyond_libro_grupo">
|
||||
<span class="beyond_libro_etiqueta">Movimientos</span>
|
||||
<t t-foreach="[['todo','Todos'],['entradas','Entradas'],['salidas','Salidas'],['ajustes','Ajustes']]"
|
||||
t-as="cual" t-key="cual[0]">
|
||||
<button type="button" class="beyond_libro_pastilla"
|
||||
t-att-class="{ beyond_activa: state.filtrosLibro.tipo === cual[0] }"
|
||||
t-on-click="() => this.tipoLibro(cual[0])"
|
||||
t-esc="cual[1]"/>
|
||||
</t>
|
||||
<div class="beyond_libro_riel">
|
||||
<t t-foreach="[['todo','Todos'],['entradas','Entradas'],['salidas','Salidas'],['ajustes','Ajustes']]"
|
||||
t-as="cual" t-key="cual[0]">
|
||||
<button type="button" class="beyond_libro_pastilla"
|
||||
t-att-class="{ beyond_activa: state.filtrosLibro.tipo === cual[0] }"
|
||||
t-on-click="() => this.tipoLibro(cual[0])"
|
||||
t-esc="cual[1]"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="!state.libro" class="beyond_inventario_vacio">Cargando…</div>
|
||||
<t t-else="">
|
||||
<div class="beyond_libro_resumen">
|
||||
<span><b>Entró</b> <t t-esc="numero(state.libro.resumen.entro)"/></span>
|
||||
<span><b>Salió</b> <t t-esc="numero(state.libro.resumen.salio)"/></span>
|
||||
<span><b>Movimientos</b> <t t-esc="state.libro.resumen.movimientos"/></span>
|
||||
<span><b>Costo de lo ingresado</b>
|
||||
<t t-esc="dinero(state.libro.resumen.costo_entradas)"/></span>
|
||||
<span t-if="state.libro.resumen.sin_costo"
|
||||
class="beyond_libro_sin_costo"
|
||||
t-esc="state.libro.resumen.sin_costo + ' entradas sin costo'"/>
|
||||
<span class="beyond_libro_periodo"
|
||||
t-esc="state.libro.periodo.desde + ' a ' + state.libro.periodo.hasta"/>
|
||||
<div class="beyond_inventario_indicadores">
|
||||
<div class="beyond_indicador beyond_indicador_fijo beyond_repuesto">
|
||||
<span class="beyond_cifra" t-esc="numero(state.libro.resumen.entro)"/>
|
||||
<div class="beyond_indicador_texto">
|
||||
<span class="beyond_indicador_titulo">Entró</span>
|
||||
<span class="beyond_indicador_pie">Piezas que llegaron</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="beyond_indicador beyond_indicador_fijo beyond_negativa">
|
||||
<span class="beyond_cifra" t-esc="numero(state.libro.resumen.salio)"/>
|
||||
<div class="beyond_indicador_texto">
|
||||
<span class="beyond_indicador_titulo">Salió</span>
|
||||
<span class="beyond_indicador_pie">Ventas, consumo y merma</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="beyond_indicador beyond_indicador_fijo">
|
||||
<span class="beyond_cifra" t-esc="state.libro.resumen.movimientos"/>
|
||||
<div class="beyond_indicador_texto">
|
||||
<span class="beyond_indicador_titulo">Movimientos</span>
|
||||
<span class="beyond_indicador_pie" t-esc="state.libro.periodo.texto"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="beyond_indicador beyond_indicador_fijo">
|
||||
<span class="beyond_cifra beyond_cifra_ancha"
|
||||
t-esc="dinero(state.libro.resumen.costo_entradas)"/>
|
||||
<div class="beyond_indicador_texto">
|
||||
<span class="beyond_indicador_titulo">Costo de lo ingresado</span>
|
||||
<!-- Cuántas entradas llegaron sin precio: sin
|
||||
esto, el total parece la verdad entera. -->
|
||||
<span t-if="state.libro.resumen.sin_costo"
|
||||
class="beyond_indicador_pie beyond_libro_sin_costo">
|
||||
<t t-esc="state.libro.resumen.sin_costo"/>
|
||||
<t t-if="state.libro.resumen.sin_costo === 1"> entrada sin costo</t>
|
||||
<t t-else=""> entradas sin costo</t>
|
||||
</span>
|
||||
<span t-else="" class="beyond_indicador_pie">Todas las entradas con costo</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="!state.libro.filas.length" class="beyond_inventario_vacio">
|
||||
<i class="fa fa-inbox"/>
|
||||
<b>Sin movimientos en este periodo</b>
|
||||
@@ -300,40 +435,48 @@
|
||||
</div>
|
||||
<t t-foreach="state.libro.filas" t-as="fila" t-key="fila.id">
|
||||
<div class="beyond_tabla_fila beyond_libro_fila">
|
||||
<span t-esc="fila.fecha"/>
|
||||
<span class="beyond_cuando">
|
||||
<span class="beyond_cuando_dia" t-esc="fila.dia"/>
|
||||
<span class="beyond_cuando_hora" t-esc="fila.hora"/>
|
||||
</span>
|
||||
<span class="beyond_tabla_nombre" t-esc="fila.articulo"/>
|
||||
<span class="beyond_libro_tipo"
|
||||
t-att-class="'beyond_libro_' + fila.tipo"
|
||||
t-esc="fila.movimiento"/>
|
||||
<span class="beyond_eje_derecha"
|
||||
t-att-class="'beyond_libro_' + fila.tipo">
|
||||
<span class="beyond_pildora_punto"/>
|
||||
<t t-esc="fila.movimiento"/>
|
||||
</span>
|
||||
<span class="beyond_eje_derecha beyond_cifra_fila"
|
||||
t-att-class="fila.cantidad < 0 ? 'beyond_falta' : 'beyond_hay'"
|
||||
t-esc="conSigno(fila.cantidad)"/>
|
||||
<span class="beyond_eje_derecha" t-esc="numero(fila.resultante)"/>
|
||||
<span class="beyond_eje_derecha beyond_resultante"
|
||||
t-att-class="fila.resultante < 0 ? 'beyond_falta' : ''"
|
||||
t-esc="numero(fila.resultante)"/>
|
||||
<t t-if="fila.costo !== null">
|
||||
<span class="beyond_eje_derecha" t-esc="dinero(fila.costo)"/>
|
||||
<span class="beyond_eje_derecha" t-esc="dinero(fila.importe)"/>
|
||||
<span class="beyond_eje_derecha beyond_importe"
|
||||
t-esc="dinero(fila.importe)"/>
|
||||
</t>
|
||||
<t t-elif="fila.tipo === 'entrada'">
|
||||
<span class="beyond_eje_derecha beyond_libro_sin_costo_celda">
|
||||
sin costo registrado
|
||||
</span>
|
||||
<span class="beyond_eje_derecha">—</span>
|
||||
<span class="beyond_eje_derecha beyond_apagado">—</span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span class="beyond_eje_derecha">—</span>
|
||||
<span class="beyond_eje_derecha">—</span>
|
||||
<span class="beyond_eje_derecha beyond_apagado">—</span>
|
||||
<span class="beyond_eje_derecha beyond_apagado">—</span>
|
||||
</t>
|
||||
<span class="beyond_libro_nota">
|
||||
<t t-esc="fila.quien"/>
|
||||
<t t-if="fila.detalle">
|
||||
· <t t-esc="fila.detalle"/>
|
||||
</t>
|
||||
<a t-foreach="fila.adjuntos" t-as="adj" t-key="adj.id"
|
||||
class="beyond_movimiento_adjunto"
|
||||
t-att-href="'/web/content/' + adj.id + '?download=true'"
|
||||
t-att-title="adj.nombre">
|
||||
<i class="fa fa-paperclip"/>
|
||||
</a>
|
||||
<span class="beyond_libro_quien" t-esc="fila.quien"/>
|
||||
<span class="beyond_libro_detalle">
|
||||
<t t-esc="fila.detalle"/>
|
||||
<a t-foreach="fila.adjuntos" t-as="adj" t-key="adj.id"
|
||||
class="beyond_movimiento_adjunto"
|
||||
t-att-href="'/web/content/' + adj.id + '?download=true'"
|
||||
t-att-title="adj.nombre">
|
||||
<i class="fa fa-paperclip"/>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
@@ -689,4 +832,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<!-- Los dos iconos de descarga se usan en las dos pantallas: van a
|
||||
plantilla en vez de repetir el mismo path cuatro veces. -->
|
||||
<t t-name="beyond_inventory.IconoExcel">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<path d="M6.4 3.6h8l4.2 4.2v12.6H6.4z" stroke="currentColor" stroke-width="1.8"
|
||||
stroke-linejoin="round"/>
|
||||
<path d="M9 13l2.4 3-2.4 3M15 13l-2.4 3 2.4 3" stroke="currentColor" stroke-width="1.8"
|
||||
stroke-linecap="round" stroke-linejoin="round" class="beyond_icono_excel"/>
|
||||
</svg>
|
||||
</t>
|
||||
|
||||
<t t-name="beyond_inventory.IconoPdf">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<path d="M6.4 3.6h8l4.2 4.2v12.6H6.4z" stroke="currentColor" stroke-width="1.8"
|
||||
stroke-linejoin="round"/>
|
||||
<path d="M9.2 17v-6h2a1.9 1.9 0 0 1 0 3.8h-2" stroke="currentColor" stroke-width="1.8"
|
||||
stroke-linecap="round" stroke-linejoin="round" class="beyond_icono_pdf"/>
|
||||
</svg>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
@@ -427,7 +427,10 @@ class TestInventarioEnNavegador(HttpCase):
|
||||
await hasta('.beyond_libro_eje');
|
||||
await esperar(1200);
|
||||
|
||||
seVe('.beyond_libro_resumen', 'el resumen de lo movido');
|
||||
// El resumen de lo movido son las tarjetas de arriba desde
|
||||
// el 9-sep: la misma pieza que la pantalla de existencias,
|
||||
// en vez de una tira de texto propia de esta pantalla.
|
||||
seVe('.beyond_inventario_indicadores', 'el resumen de lo movido');
|
||||
|
||||
// La retícula, que es lo que esta prueba NO miraba y por eso
|
||||
// dejó pasar una tabla partida en dos renglones (8-sep): el
|
||||
@@ -462,7 +465,7 @@ class TestInventarioEnNavegador(HttpCase):
|
||||
+ 'las columnas no se alinean');
|
||||
}
|
||||
seVe('.beyond_libro_pastilla', 'los atajos de periodo');
|
||||
seVe('.beyond_agotados_descarga', 'las descargas del libro');
|
||||
seVe('.beyond_descarga', 'las descargas del libro');
|
||||
const tabla = () => document.querySelector('.beyond_tabla').textContent;
|
||||
if (!tabla().includes('ZZ crema navegador')) {
|
||||
throw new Error('lo sembrado no está en el libro');
|
||||
|
||||
Reference in new issue
Block a user