mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fix chat
This commit is contained in:
@ -47,7 +47,7 @@
|
||||
<dt class="col-5 fw-normal text-end">Total Costes</dt>
|
||||
<dd id="totalCostes" class="col-6 text-end"><?= old('0', $presupuestoEntity->total_costes) ?>€</dd>
|
||||
<dt class="col-5 fw-normal text-end">Total Margen</dt>
|
||||
<dd id="porcentajeMargen" class="col-3 text-end py-1"><?= old('0', round(100*$presupuestoEntity->total_margenes/($presupuestoEntity->total_costes+$presupuestoEntity->total_margenes),0)) ?>%</dd>
|
||||
<dd id="porcentajeMargen" class="col-3 text-end py-1"><?= old('0', round(($presupuestoEntity->total_costes+$presupuestoEntity->total_margenes)>0? 100*$presupuestoEntity->total_margenes/($presupuestoEntity->total_costes+$presupuestoEntity->total_margenes) : 0,0)) ?>%</dd>
|
||||
<dd id="totalMargenes" class="col-3 text-end py-1"><?= old('0', $presupuestoEntity->total_margenes) ?>€</dd>
|
||||
</dl>
|
||||
|
||||
@ -64,9 +64,9 @@
|
||||
<dt class="col-5 fw-normal text-end">Precio unidad</dt>
|
||||
<dd id="precioUnidadPresupuesto" class="col-6 text-end mb-2"><?= old('0', $presupuestoEntity->total_precio_unidad) ?>€</dd>
|
||||
<dt class="col-5 fw-normal text-end" style="font-size: smaller !important;">Factor</dt>
|
||||
<dd id="factor" class="col-6 text-end mb-2" style="font-size: smaller !important;"><?= old('0', $presupuestoEntity->total_factor) ?></dd>
|
||||
<dd id="factor" class="col-6 text-end mb-2" style="font-size: smaller !important;"><?= old('0', is_numeric($presupuestoEntity->total_factor) ? $presupuestoEntity->total_factor : 0) ?></dd>
|
||||
<dt class="col-5 fw-normal text-end" style="font-size: smaller !important;">Factor Ponderado</dt>
|
||||
<dd id="factor_ponderado" class="col-6 text-end mb-0" style="font-size: smaller !important;"><?= old('0', $presupuestoEntity->total_factor_ponderado) ?></dd>
|
||||
<dd id="factor_ponderado" class="col-6 text-end mb-0" style="font-size: smaller !important;"><?= old('0', is_numeric($presupuestoEntity->total_factor_ponderado) ? $presupuestoEntity->total_factor_ponderado : 0) ?></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="d-grid float-end mb-4">
|
||||
|
||||
@ -198,7 +198,7 @@ function updateTotales(updateLP=true, updateServicios=true, updateEnvio=true){
|
||||
|
||||
var totalCostes = parseFloat(totalPapel.toFixed(2)) + parseFloat(totalImpresion.toFixed(2)) + parseFloat(totalServicios.toFixed(2)) + parseFloat(totalEnvios.toFixed(2))
|
||||
var totalMargenes = parseFloat(margenPapel.toFixed(2)) + parseFloat(margenImpresion.toFixed(2)) + parseFloat(margenServicios.toFixed(2)) + parseFloat(margenEnvios.toFixed(2))
|
||||
var porcentajeMargen = (100*totalMargenes/(totalCostes+totalMargenes)).toFixed(0)
|
||||
var porcentajeMargen = totalCostes+totalMargenes>0? (100*totalMargenes/(totalCostes+totalMargenes)).toFixed(0) : 0
|
||||
$('#totalCostes').text((addSeparatorsNF(totalCostes.toFixed(2), ".", ",", ".")) + "€")
|
||||
$('#totalMargenes').text((addSeparatorsNF(totalMargenes.toFixed(2), ".", ",", ".")) + "€")
|
||||
$('#totalCostes').attr('val',(totalCostes).toFixed(2) + '€')
|
||||
|
||||
Reference in New Issue
Block a user