trabajando en la lista de envios proximos

This commit is contained in:
2025-05-15 23:55:09 +02:00
parent cfdc8d64e1
commit decdcf3703
10 changed files with 453 additions and 213 deletions

View File

@ -35,7 +35,7 @@ class EnvioLineaModel extends Model
$builder = $this->db
->table($this->table . " t1")
->select(
"t1.id, t1.pedido_id as pedido, t3.id as presupuesto,
"t1.id, t1.pedido_id as pedido, t3.id as presupuesto, t4.id as ordenTrabajo,
t3.titulo as titulo, t1.unidades_envio as unidadesEnvio, t1.unidades_envio as unidadesEnvioRaw,
t1.unidades_total as unidadesTotal, t2.tipo_envio as tipo_envio,
IFNULL((
@ -59,6 +59,7 @@ class EnvioLineaModel extends Model
);
$builder->join("envios t2", "t1.envio_id = t2.id", "left");
$builder->join("presupuestos t3", "t1.presupuesto_id = t3.id", "left");
$builder->join("ordenes_trabajo t4", "t1.pedido_id = t4.pedido_id", "left");
$builder->where("t1.envio_id", $envio_id);