terminado. faltan pruebas

This commit is contained in:
75134972k
2024-04-01 15:26:51 +02:00
parent 922c811660
commit 22c2215f91
5 changed files with 6792 additions and 8 deletions

View File

@ -27,7 +27,7 @@ function asyncMessageDialog(title, msg, callback) {
$("#labelMsgMessageDialog").html(msg);
$("#okButton").off('click').click(function () {
callback();
$confirmDialog.modal("hide");
$messageDialog.modal("hide");
});
}

View File

@ -85,6 +85,13 @@
})
if(gotaNegro){
const domain = window.location.origin
const url = window.location.href;
const url_parts = url.split('/');
var id = -1;
if(url_parts[url_parts.length-2] == 'edit'){
id = url_parts[url_parts.length-1];
}
asyncMessageDialog('<?= lang("Basic.global.Warning") ?>', '<?= lang("Presupuestos.duplicarConTipologias") ?>', function() {
$.ajax({
type: 'post',
@ -295,9 +302,36 @@
<?php endif; ?>
<?php if (str_contains($formAction, 'edit')): ?>
<?= $this->section("additionalInlineJs") ?>
if(<?php echo $presupuestoEntity->is_duplicado?'true':'false'; ?>){
asyncMessageDialog(
'<?= lang("Basic.global.Warning") ?>',
'<?= lang("Presupuestos.presupuestoDuplicadoActualizacion") ?>',
function(){});
}
else if(<?php echo ($presupuestoEntity->cambios_lineas? 'true':'false'); ?> ||
<?php echo ($presupuestoEntity->cambios_servicios? 'true':'false'); ?> ||
<?php echo ($presupuestoEntity->cambios_envios ? 'true':'false'); ?>){
let text = '<?= lang("Presupuestos.actualizacionPrecios") ?>';
if(<?php echo ($presupuestoEntity->cambios_lineas ? 'true':'false'); ?>){
text += '<?= lang("Presupuestos.actualizacionPreciosLP") ?>';
}
else if (<?php echo ($presupuestoEntity->cambios_servicios ? 'true':'false'); ?>){
text += '<?= lang("Presupuestos.actualizacionPreciosServicios") ?>';
}
else if (<?php echo ($presupuestoEntity->cambios_envios ? 'true':'false'); ?>){
text += '<?= lang("Presupuestos.actualizacionPreciosEnvios") ?>';
}
asyncMessageDialog(
'<?= lang("Basic.global.Warning") ?>',
text,
function(){});
}
<?= $this->endSection() ?>
<?php endif; ?>
<!------------------------------------------->
<!-- Variables generales usadas en los ficheros js -->