mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadido facturas. faltan filtros pedidos
This commit is contained in:
@ -232,6 +232,21 @@ class PedidoModel extends \App\Models\BaseModel
|
||||
return $presupuesto_ficheros;
|
||||
}
|
||||
|
||||
|
||||
public function getPedidosClienteForm($cliente_id = -1){
|
||||
$builder = $this->db
|
||||
->table($this->table . " p")
|
||||
->select('p.id, p.created_at as fecha, p.fecha_entrega_real as fecha_entrega,
|
||||
pr.paginas as paginas, p.total_tirada, p.total_precio, p.estado')
|
||||
->join('pedidos_linea pl', 'pl.pedido_id = p.id', 'left')
|
||||
->join('presupuestos pr', 'pr.id = pl.presupuesto_id', 'left')
|
||||
//->where('pr.deleted_at IS NULL')
|
||||
->where('pr.cliente_id', $cliente_id)
|
||||
->orderBy('p.created_at', 'DESC')
|
||||
->groupBy('p.id');
|
||||
return $builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crea una orden de trabajo asociada al pedido
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user