trabajando en albaranes. Voy a quitar las cajas

This commit is contained in:
2025-04-20 20:02:14 +02:00
parent 65c9b34f56
commit 61abcb3dbd
18 changed files with 345 additions and 1654 deletions

View File

@ -37,8 +37,9 @@ class EnvioLineaModel extends Model
$builder = $this->db
->table($this->table . " t1")
->select(
"t1.id, t1.pedido_id as pedido, t3.id as presupuesto,t1.cajas,
t3.titulo as titulo, t1.unidades_envio as unidadesEnvio, t1.unidades_total as unidadesTotal,
"t1.id, t1.pedido_id as pedido, t3.id as presupuesto,t1.cajas, t1.cajas as cajasRaw,
t3.titulo as titulo, t1.unidades_envio as unidadesEnvio, t1.unidades_envio as unidadesEnvioRaw,
t1.unidades_total as unidadesTotal,
IFNULL((
SELECT SUM(t_sub.unidades_envio)
FROM " . $this->table . " t_sub