mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Implementados botones de imprimir factura y exportar lineas pedido
This commit is contained in:
@ -97,6 +97,32 @@ class FacturaLineaModel extends \App\Models\BaseModel {
|
||||
return $builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get resource data for creating PDFs.
|
||||
*
|
||||
* @param string $search
|
||||
*
|
||||
* @return \CodeIgniter\Database\BaseBuilder
|
||||
*/
|
||||
public function getResourceForExcel($factura_id = -1)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t2.numero AS ref_factura,
|
||||
t3.pedido_id AS pedido_id,
|
||||
t4.referencia_cliente AS referencia_cliente,
|
||||
t1.base AS base"
|
||||
)
|
||||
->join("facturas t2", "t2.id = t1.factura_id", "left")
|
||||
->join("pedidos_linea t3", "t3.id = t1.pedido_linea_impresion_id", "left")
|
||||
->join("presupuestos t4", "t4.id = t3.presupuesto_id", "left")
|
||||
->where("t1.factura_id", $factura_id)
|
||||
->where("t1.deleted_at", null);
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
|
||||
public function addFacturaPedidoLinea($factura_id, $pedido_linea_id, $cantidad)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user