From 616c12002eb6eb5474ec91448f68986f3dc753fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Thu, 24 Apr 2025 11:01:38 +0200 Subject: [PATCH] solucionado el totl aceptado --- ci4/app/Models/Facturas/FacturaLineaModel.php | 2 +- .../Views/themes/vuexy/form/facturas/_facturaLineasItems.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ci4/app/Models/Facturas/FacturaLineaModel.php b/ci4/app/Models/Facturas/FacturaLineaModel.php index f86a1494..5335c9be 100755 --- a/ci4/app/Models/Facturas/FacturaLineaModel.php +++ b/ci4/app/Models/Facturas/FacturaLineaModel.php @@ -39,7 +39,7 @@ class FacturaLineaModel extends \App\Models\BaseModel { t1.pedido_linea_impresion_id AS pedido_linea_impresion_id, t1.pedido_maquetacion_id AS pedido_maquetacion_id, t1.descripcion AS descripcion, t1.cantidad as cantidad, t1.iva AS iva, t1.base AS base, t1.total_iva AS total_iva, t1.total AS total, t1.data AS data, t2.pedido_id AS pedido_id, - t3.total_aceptado_revisado AS total_aceptado, t4.tirada_flexible AS tirada_flexible, t4.descuento_tirada_flexible AS descuento_tirada_flexible, + t3.total_aceptado AS total_aceptado, t3.total_aceptado_revisado AS total_aceptado_revisado, t4.tirada_flexible AS tirada_flexible, t4.descuento_tirada_flexible AS descuento_tirada_flexible, t6.cantidad AS cantidad_albaran" ) ->join("pedidos_linea t2", "t2.id = t1.pedido_linea_impresion_id", "left") diff --git a/ci4/app/Views/themes/vuexy/form/facturas/_facturaLineasItems.php b/ci4/app/Views/themes/vuexy/form/facturas/_facturaLineasItems.php index 00412097..3257e01a 100755 --- a/ci4/app/Views/themes/vuexy/form/facturas/_facturaLineasItems.php +++ b/ci4/app/Views/themes/vuexy/form/facturas/_facturaLineasItems.php @@ -321,7 +321,9 @@ var tableLineas = $('#tableOfLineasFactura').DataTable({ if(row.pedido_linea_impresion_id != null && user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) ? 0 : 1 ?>){ // se convierten a float data.total_aceptado y subtotal - var total_aceptado = parseFloat(row.total_aceptado); + var total_aceptado_revisado = parseFloat(row.total_aceptado_revisado); + var total_aceptado = total_aceptado_revisado?total_aceptado_revisado: parseFloat(row.total_aceptado); + var subtotal = parseFloat(row.base); var error_text = '';