editar factura

This commit is contained in:
2024-07-07 19:25:39 +02:00
parent c7d8d0c5cc
commit 5605a88846
21 changed files with 1132 additions and 31 deletions

View File

@ -28,7 +28,7 @@ class FacturaModel extends \App\Models\BaseModel {
'pedido_id',
'factura_retificada_id',
'factura_retificativa_id',
'customer_id',
'cliente_id',
'serie_id',
'numero',
'estado',
@ -40,13 +40,13 @@ class FacturaModel extends \App\Models\BaseModel {
'pendiente',
'total_pagos',
'creditoAsegurado',
'customer_nombre',
'customer_address',
'customer_cif',
'customer_pais',
'customer_cp',
'customer_ciudad',
'customer_provincia',
'cliente_nombre',
'cliente_address',
'cliente_cif',
'cliente_pais',
'cliente_cp',
'cliente_ciudad',
'cliente_provincia',
'created_at',
'updated_at',
'deleted_at',
@ -69,10 +69,10 @@ class FacturaModel extends \App\Models\BaseModel {
$builder = $this->db
->table($this->table . " t1")
->select(
"t1.id AS id, t1.numero AS numero, t1.fecha_factura_at AS fecha_factura_at,
"t1.id AS id, t1.numero AS numero, DATE_FORMAT(t1.fecha_factura_at, '%d/%m/%Y') 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"
t4.nombre AS forma_pago, DATE_FORMAT(t3.fecha_vencimiento_at, '%d/%m/%Y') AS vencimiento"
);
$builder->join("clientes t2", "t2.id = t1.cliente_id", "left");