Browse Source

Fixes menores

master
Nicolas Soreian 4 years ago
parent
commit
8a96dbdae6
  1. 4
      js/main.js
  2. 22
      users/index.php

4
js/main.js

@ -76,7 +76,7 @@ function crear_detalles_pedido(nro,ido){
detallesList+='</tbody></table >'; detallesList+='</tbody></table >';
detallesList += '<button type="button" id='+response.document.pedido.cap_ped+' class="btn btn-outline-success btn-block col-sm-2 font-weight-bold my-4 alta">Confirmar pedido</button></td></tr>'; detallesList += '<button type="button" id='+response.document.pedido.cap_ped+' class="btn btn-outline-success btn-block col-sm-2 font-weight-bold my-4 alta">Confirmar pedido</button></td></tr>';
ido.parent().after(detallesList);
ido.parent().parent().after(detallesList);
$( ".alta" ).click(function() { $( ".alta" ).click(function() {
//var suc = document.getElementById("sucursal").value; //var suc = document.getElementById("sucursal").value;
@ -150,6 +150,8 @@ function llenar_lista_pedido()
$('#pedido').text("#"+ped); $('#pedido').text("#"+ped);
$('#cliente').text("Cliente: "+n_cli); $('#cliente').text("Cliente: "+n_cli);
$('#total').text("Total: $"+total); $('#total').text("Total: $"+total);
console.log(ped);
console.log(v_nomcli);
// "PVE_" + "Suc" + <"+suc+"> + "_" + <Tipo Comp> + <Operacion> + "_" + <Nro.Comprobante> + ".pdf" // "PVE_" + "Suc" + <"+suc+"> + "_" + <Tipo Comp> + <Operacion> + "_" + <Nro.Comprobante> + ".pdf"
//var _href = $('#descarga').attr("href"); //var _href = $('#descarga').attr("href");
$('#descarga').attr("href",'../pdf/PVE_Suc'+suc+'_PE40_'+ped+'.pdf'); $('#descarga').attr("href",'../pdf/PVE_Suc'+suc+'_PE40_'+ped+'.pdf');

22
users/index.php

@ -33,15 +33,15 @@ require_once '../prgdmug/login.php';
//$_SESSION['loggedin'] = true; //$_SESSION['loggedin'] = true;
//$_SESSION['username'] = 'Test'; //$_SESSION['username'] = 'Test';
if ($ConDMUG->xmlrequest->{'STATUS'}=="OK") { if ($ConDMUG->xmlrequest->{'STATUS'}=="OK") {
$_SESSION['loggedin'] = true;
$_SESSION['username'] = $username;
$_SESSION['start'] = time();
$_SESSION['expire'] = $_SESSION['start'] + (5 * 60);
} else {
session_destroy();
header("Location: ../index.html");
die();
}
$_SESSION['loggedin'] = true;
$_SESSION['username'] = $username;
$_SESSION['start'] = time();
$_SESSION['expire'] = $_SESSION['start'] + (5 * 60);
} else {
session_destroy();
header("Location: ../index.html");
die();
}
?> ?>
@ -64,7 +64,7 @@ if ($ConDMUG->xmlrequest->{'STATUS'}=="OK") {
<div class="col-5 col-md-3 col-lg-2 offset-lg-1 order-2"> <div class="col-5 col-md-3 col-lg-2 offset-lg-1 order-2">
<div class="d-none d-md-block text-right"> <div class="d-none d-md-block text-right">
<a class="btn btn-secondary btn-sm btn-block" href="logout.php"> <a class="btn btn-secondary btn-sm btn-block" href="logout.php">
<?php print $_SESSION['username'] ?>
<?php print $_SESSION['username'] ? $_SESSION['username'] : 'Cerrar sesión'; ?>
<i class="fa fa-times ml-2" aria-hidden="true"></i> <i class="fa fa-times ml-2" aria-hidden="true"></i>
</a> </a>
</div> </div>
@ -77,7 +77,7 @@ if ($ConDMUG->xmlrequest->{'STATUS'}=="OK") {
</div> </div>
<div class="collapse navbar-collapse justify-content-start mt-3" id="mainNavbar"> <div class="collapse navbar-collapse justify-content-start mt-3" id="mainNavbar">
<a class="btn btn-secondary btn-sm btn-block" href="logout.php"> <a class="btn btn-secondary btn-sm btn-block" href="logout.php">
<?php print $_SESSION['username'] ? $_SESSION['username'] : 'Cerrar sesión' ?>
<?php print $_SESSION['username'] ? $_SESSION['username'] : 'Cerrar sesión'; ?>
<i class="fa fa-times ml-2" aria-hidden="true"></i> <i class="fa fa-times ml-2" aria-hidden="true"></i>
</a> </a>
</div> </div>

Loading…
Cancel
Save