\n\
Quantita presa espressa in unita di misura \n\
MERCE PRESENTE IN DEPOSITO\n\
\n\
\n\
\n\
Quantita presa espressa in unita di misura \n\
MERCE IN ARRIVO DA MESSINA\n\
\n\
\n\
\n\
\n\
\n\
\n\
\n\
';
var form_aggiungi_art='';
return form_aggiungi_art;
}
function aggiunge_articolo_in_ordine(giro, id_ordine, campoMerceInDeposito, campoMerceInArrivo, ambito)
{
//alert("Aggiungi l'articolo direttamente in GEORDC, e poi fai la sincronizzazione");
//return;
//campoMerceInDeposito e campoMerceInArrivo se sono 1 allora si devono vedere
document.getElementById("oscuramento_nero").style.display="block";
document.getElementById("popup_resp_TESTO").innerHTML='
';
document.getElementById("popup_resp").style.display="block";
form_aggiungi_art = creaFormAggiungiArticoloInOrdine(giro, id_ordine, campoMerceInDeposito, campoMerceInArrivo, ambito);
document.getElementById("popup_resp_TESTO").innerHTML=form_aggiungi_art;
}
function elimina_articolo_in_ordine(id_articolo, id_ordine)
{
//alert("Elimina l'articolo direttamente in GEORDC e poi fai la sincronizzazione");
//return;
if(confirm("Vuoi eliminare quest'articolo dall' ordine in corso?"))
{
document.getElementById("oscuramento_nero").style.display="block";
document.getElementById("popup_resp_TESTO").innerHTML='
';
chiudi_popup_resp();
return 1;
}
}
xmlhttp1.open("POST","funzioni_gestione_classe_ordini_ajax.php",true);
xmlhttp1.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp1.send(parametri);
}
function modifica_articolo_in_ordine(id_articolo,giro, id_ordine)
{
//alert("Modifica l'articolo direttamente in GEORDC e poi fai la sincronizzazione");
//return;
document.getElementById("oscuramento_nero").style.display="block";
document.getElementById("popup_resp_TESTO").innerHTML='
';
document.getElementById("popup_resp").style.display="block";
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("popup_resp_TESTO").innerHTML=xmlhttp.responseText;
$("div#caricamento").css("display","none");
return 1;
}
}
xmlhttp.open("GET","funzioni_modifica_ordini_ajax.php?id_articolo="+id_articolo+"&giro="+giro+ "&id_ordine="+id_ordine,true);
xmlhttp.send();
$("div#caricamento").css("display","block");
}
function seleziona_merce_in_arrivo()
{
if(document.getElementById("merce_in_arrivo").checked==true)
{
document.getElementById("quantita_art_Sel").value=document.getElementById("quantita_richiesta").value;
document.getElementById("quantita_art_Sel").readOnly = true;
document.getElementById("quantita_art_Sel").style.backgroundColor="#f4a442";
}
else
{
document.getElementById("quantita_art_Sel").value=0;
document.getElementById("quantita_art_Sel").readOnly = false;
document.getElementById("quantita_art_Sel").style.backgroundColor="#fff";
}
}
function seleziona_merce_in_arrivo_nuova()
{
if(document.getElementById("merce_in_arrivo").checked==true)
{
//document.getElementById("quantita_art_Sel").value=document.getElementById("quantita_richiesta").value;
//document.getElementById("quantita_art_Sel").readOnly = true;
//document.getElementById("quantita_art_Sel").style.backgroundColor="#f4a442";
//document.getElementById("quantita_art_Sel").value=document.getElementById("quantita_richiesta").value;
document.getElementById("quantita_art_Sel_in_arrivo").disabled = false;
document.getElementById("quantita_art_Sel_in_arrivo").value = 0;
//document.getElementById("etichetta_per_totale_qta").style.dispay = "block";
}
else
{
//document.getElementById("quantita_art_Sel").value=0;
//document.getElementById("quantita_art_Sel").readOnly = false;
//document.getElementById("quantita_art_Sel").style.backgroundColor="#fff";
document.getElementById("quantita_art_Sel_in_arrivo").disabled = true;
document.getElementById("quantita_art_Sel_in_arrivo").value = 0;
//document.getElementById("etichetta_per_totale_qta").style.dispay = "none";
}
}
function regola_quantita_cliente(qta_richiesta, qta_selezionata, elemento)
{
//elemento: 1 -> quantita nel deposito locale
//elemento: 2 -> quantita nel deposito remoto
//il decimale dev essere il punto parseFloat("10.33")
qta_selezionata=qta_selezionata.replace(",",".");
if(parseFloat(qta_selezionata)>parseFloat(qta_richiesta))
{
alert("La quantita selezionata e' maggiore di quella richiesta. Verifica. \nQuntita massima consentita: " + qta_richiesta + ".");
document.getElementById("quantita_art_Sel_in_arrivo").value=0;
return;
}
switch(elemento)
{
case 1:
if(document.getElementById("quantita_art_Sel_in_arrivo").disabled==false )
{
document.getElementById("quantita_art_Sel_in_arrivo").value=parseFloat(qta_richiesta)-parseFloat(document.getElementById("quantita_art_Sel").value);
inizzializza_lampeggio(255, 'quantita_art_Sel_in_arrivo');
}
break;
case 2:
document.getElementById("quantita_art_Sel").value=parseFloat(qta_richiesta)-parseFloat(document.getElementById("quantita_art_Sel_in_arrivo").value);
inizzializza_lampeggio(255, 'quantita_art_Sel');
break;
}
}
i_lampeggio=0;
mydiv_lampeggio='';
function inizzializza_lampeggio(i1, mydiv1)
{
i_lampeggio=i1;
mydiv_lampeggio=mydiv1;
setTimeout(ritorna_valore_sfondo_lampeggio, 0);
}
function ritorna_valore_sfondo_lampeggio()
{
if(i_lampeggio>-255)
{
i_lampeggio-=1;
j=i_lampeggio;
if(i_lampeggio<0)
{
j=i_lampeggio*(-1);
}
document.getElementById(mydiv_lampeggio).style.backgroundColor ="rgb( 255, "+j+","+j+")";
setTimeout(ritorna_valore_sfondo_lampeggio,1);
}
}
function aggiungi_articolo_ad_ordine()
{
}
function memorizza_giro_PROCEDI()
{
giro= document.getElementById('giro_numero').value;
ETICHETTA_PRECEDENTE=document.getElementById('ETICHETTA_PRECEDENTE').value;
document.getElementById("tasto_conferma").disabled=true;
if ( document.getElementById('preparatori') == null)
{
preparatore='Utente';
}
else
{
preparatore=document.getElementById('preparatori').value;
}
document.getElementById("oscuramento_nero").style.display="block";
document.getElementById("popup_resp_TESTO").innerHTML='
';
document.getElementById("popup_resp").style.display="block";
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
//
document.getElementById("popup_resp_TESTO").innerHTML="
ATTENDI IL REINDIRIZZAMENTO
";
//alert(xmlhttp.responseText);
$("div#caricamento").css("display","none");
location.href="gestione_ordini_sysint.php"; //tolto il riferimento all url assoluto https://www.vipac.it/
return 1;
}
}
xmlhttp.open("GET","funzioni_MEMORIZZA_giro_ajax.php?giro="+giro+"&preparatore="+preparatore+"&ETICHETTA_PRECEDENTE="+ETICHETTA_PRECEDENTE,true);
xmlhttp.send();
$("div#caricamento").css("display","block");
}
function associa_ordine_ad_etichetta_confermata(etichetta_confermata,NOME_ETICHETTA)
{
document.getElementById('ETICHETTA_PRECEDENTE').value=etichetta_confermata;
giro= document.getElementById('giro_numero').value;
document.getElementById("associa_ordini_giro_prec_ELENCO").innerHTML=NOME_ETICHETTA+' ';
}
function aggiungi_ordini_ad_etichetta()
{
document.getElementById("tasto_conferma").style.display="none";
document.getElementById('continua_senza_assoc').value="CONTINUA CON NUOVA ETICHETTA";
document.getElementById('altra_etichetta').value="SCEGLI ALTRA ETICHETTA";
document.getElementById("associa_ordini_giro_prec_ELENCO").innerHTML='
';
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("associa_ordini_giro_prec_ELENCO").innerHTML=xmlhttp.responseText;
$("div#caricamento").css("display","none");
return 1;
}
}
xmlhttp.open("GET","stampa_etichette_precedente_ajax.php",true);
xmlhttp.send();
$("div#caricamento").css("display","block");
}
function memorizza_giro(giro)
{
document.getElementById("tasto_conferma").disabled=true;
document.getElementById("associa_ordini_giro_prec").innerHTML='
Vuoi aggiungere questi ordini ad una lista precedente?
';
}
function mostra_popup_conferma(giro)
{
document.getElementById("oscuramento_nero").style.display="block";
document.getElementById("popup_resp_TESTO").innerHTML='