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) + }); + } });