hechos modelos y entidades para facturas

This commit is contained in:
jaimejimenezortega
2024-06-25 20:08:17 +02:00
parent 20702a47f8
commit fcaacfbb5d
6 changed files with 231 additions and 0 deletions

View File

@ -0,0 +1,55 @@
<?php
namespace App\Entities\Facturas;
class FacturaEntity extends \CodeIgniter\Entity\Entity
{
protected $attributes = [
'id' => null,
'pedido_id' => null,
'factura_retificada_id' => null,
'factura_retificativa_id' => null,
'cliente_id' => null,
'serie_id' => null,
'numero' => null,
'estado' => null,
'estado_pago' => null,
'fecha_factura_at' => null,
'notas' => null,
'base' => null,
'total' => null,
'pendiente' => null,
'total_pagos' => null,
'creditoAsegurado' => null,
'cliente_nombre' => null,
'cliente_address' => null,
'cliente_cif' => null,
'cliente_pais' => null,
'cliente_cp' => null,
'cliente_ciudad' => null,
'cliente_provincia' => null,
'created_at' => null,
'updated_at' => null,
'deleted_at' => null,
'user_created_id' => null,
'user_update_id' => null,
];
protected $casts = [
'id' => 'int',
'pedido_id' => 'int',
'factura_retificada_id' => 'int',
'factura_retificativa_id' => 'int',
'cliente_id' => 'int',
'serie_id' => 'int',
'estado' => 'int',
'estado_pago' => 'int',
'base' => 'float',
'total' => 'float',
'pendiente' => 'float',
'total_pagos' => 'float',
'creditoAsegurado' => 'float',
];
}

View File

@ -0,0 +1,39 @@
<?php
namespace App\Entities\Facturas;
class FacturaLineaEntity extends \CodeIgniter\Entity\Entity
{
protected $attributes = [
'id' => null,
'factura_id' => null,
'pedido_impresion_id' => null,
'pedido_maquetacion_id' => null,
'descripcion' => null,
'cantidad' => null,
'precio_unidad' => null,
'iva' => null,
'base' => null,
'total_iva' => null,
'total' => null,
'data' => null,
'deleted_at' => null,
'user_update_id' => null,
];
protected $casts = [
'id' => 'int',
'factura_id' => 'int',
'pedido_impresion_id' => 'int',
'pedido_maquetacion_id' => 'int',
'cantidad' => 'float',
'precio_unidad' => 'float',
'iva' => 'float',
'base' => 'float',
'total_iva' => 'float',
'total' => 'float',
];
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Entities\Facturas;
class FacturaPagoEntity extends \CodeIgniter\Entity\Entity
{
protected $attributes = [
'id' => null,
'factura_id' => null,
'notes' => null,
'fecha_pago_at' => null,
'fecha_vencimiento_at' => null,
'forma_pago_id' => null,
'total' => null,
'deleted_at' => null,
'user_update_id' => null,
];
protected $casts = [
'id' => 'int',
'factura_id' => 'int',
'forma_pago_id' => 'int',
'total' => 'float',
];
}