mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en pagos (datepicker)
This commit is contained in:
@ -51,7 +51,7 @@ class FacturaModel extends \App\Models\BaseModel {
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
'user_created_id',
|
||||
'user_update_id'
|
||||
'user_updated_id'
|
||||
];
|
||||
|
||||
protected $returnType = "App\Entities\Facturas\FacturaEntity";
|
||||
@ -79,6 +79,7 @@ class FacturaModel extends \App\Models\BaseModel {
|
||||
$builder->join("facturas_pagos t3", "t3.factura_id = t1.id", "left");
|
||||
$builder->join("formas_pago t4", "t3.forma_pago_id = t4.id", "left");
|
||||
|
||||
$builder->where("t1.deleted_at IS NULL");
|
||||
|
||||
return empty($search)
|
||||
? $builder
|
||||
@ -98,5 +99,14 @@ class FacturaModel extends \App\Models\BaseModel {
|
||||
|
||||
return $builder->get()->getRow()->cantidad;
|
||||
}
|
||||
|
||||
|
||||
public function deleteFacturasLineasPedido($factura_id, $pedido_linea_id, $cantidad)
|
||||
{
|
||||
$this->db->table("facturas_pedidos_lineas")
|
||||
->where("factura_id", $factura_id)
|
||||
->where("pedido_linea_id", $pedido_linea_id)
|
||||
->where("cantidad", $cantidad)
|
||||
->delete();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user