diff --git a/ci4/app/Services/PresupuestoService.php b/ci4/app/Services/PresupuestoService.php index 74c73088..0709eede 100755 --- a/ci4/app/Services/PresupuestoService.php +++ b/ci4/app/Services/PresupuestoService.php @@ -309,7 +309,7 @@ class PresupuestoService extends BaseService $linea['fields']['precio_click'], $maquina->velocidad ); - [$precio_hora, $margen_precio_hora] = $clientePreciosModel->get_precio_hora($cliente_id, $config, $tiempo); + [$precio_hora, $margen_precio_hora] = $clientePreciosModel->get_precio_hora($cliente_id, $config, round($tiempo, 2)); if (is_null($precio_hora)) { return []; diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/resumen.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/resumen.js index 098b33cf..89f1dccb 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/resumen.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/resumen.js @@ -11,13 +11,18 @@ class Resumen { const self = this; this.toastPresupuestoTotal = null $(".update-totales").on("change", function () { - self.updateTotales(null, { updateLP: true, updateServicios: true, updateEnvio: true }); + self.updateTotales({ updateLP: true, updateServicios: true, updateEnvio: true }); }); $(document).on('update-totales', async function () { await self.updateTotales(); $(document).trigger('update-totales-completed'); }); + + $('#total_descuentoPercent').on('change', function () { + this.updateTotales({ updateLP: false, updateServicios: false, updateEnvio: false }, false); + }.bind(this)); + $("#totalDespuesDecuento").on('change', this.updateToastSummary.bind(this)) }