From e5a5071a6be023376aed0f12e2d8ae6866ac6ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Fri, 5 Apr 2024 13:44:26 +0200 Subject: [PATCH] =?UTF-8?q?arreglado=20que=20s=C3=B3lo=20se=20podia=20dupl?= =?UTF-8?q?icar=20presupuestos=20con=20rotativas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../viewCosidotapablandaForm.php | 40 +++++++++++++++---- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php index e5a4c17c..83aec91c 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php @@ -84,14 +84,16 @@ } }) + 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]; + } + 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('', '', function() { $.ajax({ type: 'post', @@ -117,6 +119,30 @@ }); }) } + else{ + $.ajax({ + type: 'post', + url: '', + + data: { + tipo: 'duplicar', + presupuesto_id: id, + : v + }, + dataType: 'json', + success:function(response){ + + token=response.; + yeniden(token); + // redirect + new_location = '' + response.id + window.location.href = new_location; + } + }).fail(function (jqXHR, textStatus, error) { + // Handle error here + console.log(jqXHR) + }); + } });