arraglados algunos bugs

This commit is contained in:
jaimejimenezortega
2024-05-22 17:14:49 +02:00
parent 9a98ffd6e6
commit 9e0ff7501e
5 changed files with 904 additions and 6 deletions

View File

@ -956,7 +956,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
$coste = $tarifas_envio[0]->precio;
}
}
if (count($data) > 0) {
if (count($data) > 0 && count($tarifas_envio) > 0){
$data[0]->coste = $coste;
$data[0]->tipo = $entregaPieCalle ? 'palets' : 'cajas';
$data[0]->margen = $margen;

View File

@ -500,7 +500,7 @@
<select id="papelGuardas" name="papelGuardas" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;">
<?php if (isset($datosPresupuesto->papelGuardas) && is_array($datosPresupuesto->papelGuardas) && !empty($datosPresupuesto->papelGuardas)) :
foreach ($datosPresupuesto->papelGuardas as $k => $v) : ?>
<option value="<?= $v->id ?>" <? echo ($v->id==$presupuestoEntity->papel_guardas?'selected':'');?> >
<option value="<?= $v->id ?>" <?php echo ($v->id==$presupuestoEntity->papel_guardas?'selected':'');?> >
<?= $v->nombre ?>
</option>
<?php endforeach;

View File

@ -214,9 +214,11 @@
submitButton: new FormValidation.plugins.SubmitButton()
}
}).on('core.form.valid', function () {
validationStepper.next();
initDirecciones();
initTiradasDirecciones();
if($('#tiradaPrecio1').length > 0) {
validationStepper.next();
initDirecciones();
initTiradasDirecciones();
}
});
const tirada = $('#tirada');

View File

@ -180,7 +180,7 @@ theTable = $('#tableOfPresupuestos').DataTable({
url: '<?= route_to('datatableOfPresupuestos') ?>',
method: 'POST',
data: function(q) {
q.cliente = <? echo $clienteId; ?>;
q.cliente = <?php echo $clienteId; ?>;
},
headers: {'X-Requested-With': 'XMLHttpRequest'},
async: true,