trabajando en pagos (datepicker)

This commit is contained in:
2024-07-16 22:11:21 +02:00
parent ce7ba82bda
commit 67fbc2589f
24 changed files with 1225 additions and 228 deletions

View File

@ -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();
}
}