This commit is contained in:
jaimejimenezortega
2024-06-28 20:45:41 +02:00
parent ca901b14f3
commit 1fb9977094
4 changed files with 1 additions and 17 deletions

View File

@ -72,9 +72,7 @@ class FacturaModel extends \App\Models\BaseModel {
"t1.id AS id, t1.numero AS numero, t1.fecha_factura_at AS fecha_factura_at,
t2.nombre AS cliente, t1.base AS base, t1.total AS total, t1.pendiente AS pendiente,
t1.creditoAsegurado AS creditoAsegurado, t1.estado AS estado, t1.estado_pago AS estado_pago,
t4.nombre AS forma_pago, t3.fecha_vencimiento_at AS venciemento,
DAFEDIFF(days, NOW(), t3.fecha_vencimiento_at) AS dias"
//'DATEDIFF((SELECT MIN(facturas_pagos.fecha_vencimiento_at) FROM facturas_pagos WHERE facturas_pagos.deleted_at is null and factura_id = facturas.id), facturas.fecha_factura_at)
t4.nombre AS forma_pago, t3.fecha_vencimiento_at AS venciemento"
);
$builder->join("clientes t2", "t2.id = t1.cliente_id", "left");