From ae1c0f9a963d71cd5c2cef6ccc59c8b8f444065b Mon Sep 17 00:00:00 2001 From: Nicolas Soreian Date: Tue, 17 Aug 2021 11:24:15 -0300 Subject: [PATCH] Merge con cambios que vinieron de la agencia Desarrolladora --- index.html | 2 +- js/main.js | 21 ++++++++++++-------- prgdmug/detalles_pedesp.php | 13 +++++------- users/index.php | 48 +++++++++++++++++++++++---------------------- 4 files changed, 44 insertions(+), 40 deletions(-) diff --git a/index.html b/index.html index 800c3b6..f96c663 100755 --- a/index.html +++ b/index.html @@ -31,7 +31,7 @@
- +
diff --git a/js/main.js b/js/main.js index d7f0cfa..09b61d4 100755 --- a/js/main.js +++ b/js/main.js @@ -58,7 +58,7 @@ function crear_detalles_pedido(nro,ido){ } /*ARMO PANTALLA*/ //var detallesList = '
'; - var detallesList =''; + var detallesList ='
COD ARTDescripciónCantUxBPrecioTotal ItemRentaP.Lista
'; for (var i = 0; i < response.document.pedido.detped.length ; i++) { detallesList +=''; @@ -74,10 +74,13 @@ function crear_detalles_pedido(nro,ido){ detallesList += '
';*/ } detallesList+='
cod artDescripcionCantUxBPrecioTotal ItemRentaP.Lista
'+response.document.pedido.detped[i].dep_art+''+response.document.pedido.detped[i].dep_des+''+response.document.pedido.detped[i].dep_cant+''+response.document.pedido.detped[i].dep_udad+'$'+response.document.pedido.detped[i].dep_prec+''+response.document.pedido.detped[i].totitem+''+response.document.pedido.detped[i].rentaitem+''+response.document.pedido.detped[i].dep_plista+'
'; - detallesList += ''; + detallesList += '
'; ido.parent().parent().after(detallesList); + $('#tplista').text("total precio lista :"+response.document.pedido.tplista); + $('#trenta').text(" Total renta obtenida :"+response.document.pedido.trenta); + $('#difpre').text("Diferencia de total precio lista :"+response.document.pedido.difpre); $( ".alta" ).click(function() { //var suc = document.getElementById("sucursal").value; var ped = $(this).attr("id"); @@ -116,10 +119,9 @@ function llenar_lista_pedido() data: parametros, dataType: 'json', success: function(response){ - for (var i = 0; i < response.CLIENTE.length ; i++){ var math=parseInt(response.CLIENTE[i].total)/100; - $('.lista-pedido').append(""+response.CLIENTE[i].pedido+""+response.CLIENTE[i].cliente+" "+response.CLIENTE[i].nomcli+"$"+parseInt(response.CLIENTE[i].total)/100+"
"); + $('.lista-pedido').append("
  • Pedido nª :

    "+response.CLIENTE[i].pedido+"

    CLIENTE :

    "+response.CLIENTE[i].cliente+" "+response.CLIENTE[i].nomcli+"

    Total:$

    "+parseInt(response.CLIENTE[i].total)/100+"


    ver mas

  • "); } $(".oculto").click(function() { @@ -138,6 +140,8 @@ function llenar_lista_pedido() $(".consulta").click(function() { var oID = $(this).attr("id"); + $(".consulta").removeClass("border-success"); + $( '#'+oID+'' ).addClass( "border-success" ); v_ped="ped_"+oID; v_numcli="numcli_"+oID; @@ -149,9 +153,10 @@ function llenar_lista_pedido() var total = $('#'+v_total+'').text(); $('#pedido').text("#"+ped); $('#cliente').text("Cliente: "+n_cli); - $('#total').text("Total: $"+total); - console.log(ped); - console.log(v_nomcli); + $('#total').text("Total $ :"+total); + $('#tplista').text("total precio lista :"+tplista); + $('#trenta').text(" Total renta obtenida :"+trenta); + $('#difpre').text("Diferencia de total precio lista :"+difpre); // "PVE_" + "Suc" + <"+suc+"> + "_" + + + "_" + + ".pdf" //var _href = $('#descarga').attr("href"); $('#descarga').attr("href",'../pdf/PVE_Suc'+suc+'_PE40_'+ped+'.pdf'); @@ -169,7 +174,7 @@ function llenar_lista_pedido() $(document).ready(function() { $("#myNavy").removeClass("invisible"); $("#myNavy").hide(); - //llenar_lista_pedido(); + llenar_lista_pedido(); $("#sucursal").change(function() { llenar_lista_pedido(); diff --git a/prgdmug/detalles_pedesp.php b/prgdmug/detalles_pedesp.php index 564bdc8..b5541bf 100644 --- a/prgdmug/detalles_pedesp.php +++ b/prgdmug/detalles_pedesp.php @@ -10,7 +10,7 @@ if($campo=="ped") $v_ped=$valor; } - error_log("---sucursal---: " . $v_suc ."---ped---:" . $v_ped); + //error_log("---sucursal---: " . $v_suc ."---ped---:" . $v_ped); $server= "localhost"; $port = 1030; $hs = "DEMIURGO10-MCANET"; @@ -20,21 +20,21 @@ $pid = getmypid(); $limit = 100; $veces_error_server = 0; - + /* Crea un objeto para el manejo postgres */ $ConDMUG = new ConexDMUG( $server , $port , $hs ,$user , $pass ); $ConDMUG->SetProgram( "Detalle_pedesp" ); - + $ConDMUG->SetParameter( "sucursal" , $v_suc ); $ConDMUG->SetParameter( "pedido" , $v_ped); if ( $ConDMUG->Execute_DMUG() < 0) { error_log("$veces_error_server".$veces_error_server); - $veces_error_server++; + $veces_error_server++; if ( $veces_error_server > 2 ) - { + { error_log("exit();"); exit(); } @@ -46,6 +46,3 @@ echo json_encode($ConDMUG->xmlrequest); $ConDMUG->CloseConex(); exit(); - - -?> \ No newline at end of file diff --git a/users/index.php b/users/index.php index cc38995..6944b20 100755 --- a/users/index.php +++ b/users/index.php @@ -1,40 +1,41 @@ + Pedidos de Ventas Especiales - + - + - + - + - + - + - + - + - + - + - + xmlrequest->{'STATUS'}=="OK") { +if ($ConDMUG->xmlrequest->{'STATUS'} == "OK") { $_SESSION['loggedin'] = true; - $_SESSION['username'] = $username; + $_SESSION['username'] = $v_user; $_SESSION['start'] = time(); $_SESSION['expire'] = $_SESSION['start'] + (5 * 60); } else { @@ -365,30 +366,31 @@ if ($ConDMUG->xmlrequest->{'STATUS'}=="OK") {
    - Pedido seleccionado: + Pedido seleccionado:
    - + - + - + - + - + - + - + - + - + + \ No newline at end of file