mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadiendo lineas
This commit is contained in:
@ -88,4 +88,14 @@ class FacturaModel extends \App\Models\BaseModel {
|
||||
->orLike("t1.id", $search)
|
||||
->groupEnd();
|
||||
}
|
||||
|
||||
public function getCantidadLineaPedidoFacturada($linea_pedido_id)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table("facturas_pedidos_lineas t1")
|
||||
->select("SUM(t1.cantidad) AS cantidad")
|
||||
->where("t1.pedido_linea_id", $linea_pedido_id);
|
||||
|
||||
return $builder->get()->getRow()->cantidad;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user