660 lines
43 KiB
PHP
660 lines
43 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
require_once "config.php";
|
|
require_once "include_login.php";
|
|
unset_order_in_session();
|
|
|
|
$bq = new big_query();
|
|
|
|
$_SESSION["status_index1"] = "";
|
|
$_SESSION["soloBolle"] = "false";
|
|
$uid_file = "";
|
|
|
|
if ($_SESSION["gruppo"] == _clienti || ($_SESSION["gruppo"] == _agenti && !$selGiro) || $superuser) {
|
|
|
|
if ($_SESSION["gruppo"] == _clienti) {
|
|
$sql = $bq->getDatiCliente($_SESSION["user_code"]);
|
|
} else if ($_SESSION["gruppo"] == _agenti) {
|
|
$sql = $bq->getClienti(array("cod_vage" => $_SESSION["user_code"]));
|
|
} elseif ($superuser) {
|
|
$sql = $bq->getClienti(array("superuser" => true));
|
|
}
|
|
//echo $sql;
|
|
$arr_clienti = sql2array($sql);
|
|
$uid_file = array2JsonFile($arr_clienti, "clienti");
|
|
}
|
|
|
|
require_once "top_html.php";
|
|
require_once "top_menu.php";
|
|
|
|
unset($_SESSION["flag_alert"]);
|
|
$data_cons_default = gen_data_cons();
|
|
|
|
if ($selGiro) { // SELEZIONE CLIENTE CON RETTANGOLI, TIPO CEDIAL
|
|
?>
|
|
<script type="text/javascript" src="select_dest_rett.js?<?= "v" . date("dmYHi") ?>"></script><?php
|
|
} else { // RICERCA CLASSICA (VG, DULCIAR, gramm, floreale)
|
|
|
|
if (($_SESSION["gruppo"] == _clienti && count($arr_clienti) == 1 && $conf["tipo_ins"] != 1) || (isset($_GET["cod_anag"]) && isset($_GET["cod_vdes"])) && ($_COOKIE['azienda'] !== 'dulciar' && $_COOKIE['azienda'] !== 'vgalimenti')) {
|
|
/****** if we are using dulciar or vgalimenti, there are other parameters to insert and we cannot simply click to go on *****/
|
|
?>
|
|
<style>body {
|
|
display: none;
|
|
}</style><?php
|
|
} ?>
|
|
<script type="text/javascript" src="select_dest_classic.js?<?= "v" . date("dmYHi") ?>"></script>
|
|
<script>
|
|
var _uid_file = "<?=$uid_file?>";
|
|
var _livesearch_page = "<?=$conf["livesearch_page"]?>";
|
|
$().ready(function () {<?php
|
|
|
|
if($_SESSION["gruppo"] == _clienti && count($arr_clienti) == 1 && $conf["tipo_ins"] != 1){?>
|
|
|
|
$("div#div_select div.row_res").trigger("click");
|
|
$("input#avanti").trigger("click");
|
|
<?php
|
|
}
|
|
else if(isset($_GET["cod_anag"]) && isset($_GET["cod_vdes"]) ){?>
|
|
/******************* redirecting to index1.php to insert new order with the specified client ***********/
|
|
autoselect("<?=$_GET["cod_anag"]?>", "<?=$_GET["cod_vdes"]?>", "<?=isset($_COOKIE["azienda"]) ? $_COOKIE['azienda'] : ""?>");
|
|
<?php
|
|
}?>
|
|
});
|
|
</script><?php
|
|
if ($conf["tipo_ins"] == 1) {
|
|
?>
|
|
<script>
|
|
function valida_form() {
|
|
if ($("#id_anag").val().length == 0) {
|
|
$("#report_error").html("Cliente non specificato").fadeIn(700).delay(2000).fadeOut(2000);
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
</script><?php
|
|
} else if ($conf["tipo_ins"] == 2) { ?>
|
|
<script><?php
|
|
if($conf["step_ins_new_clie"] == 1){?>
|
|
function loadNewClie() {
|
|
$("#div_select_box_selected").html($("#new_clie_box").html());
|
|
$("#new_clie_container").css("visibility", "visible");
|
|
$("#rag_soc_new").focus();
|
|
$("#report_error").html(" ");
|
|
$("#id_destinazione_cons").val("");
|
|
$("#id_anag").val("<?=$conf["new_clie_defaults"]["cod_anag"]?>");
|
|
$("#indirizzo").val("<?="new"?>");
|
|
$("#citta").val("<?="new"?>");
|
|
$("#rag_soc").val("<?=$conf["new_clie_defaults"]["rag_soc"]?>");
|
|
$("#nuovo").val("S");
|
|
$("#destinatario").val("<?="new"?>");
|
|
|
|
$("#cod_paga").val("<?=$conf["new_clie_defaults"]["cod_paga"]?>");
|
|
$("#descr_paga").val("<?=$conf["new_clie_defaults"]["descr_paga"]?>");
|
|
$("#cod_mdep").val("<?=$conf["new_clie_defaults"]["cod_mdep"]?>");
|
|
$("#div_select").hide();
|
|
$("#tab_new_clie input[type=text]:first").focus();
|
|
}
|
|
|
|
$().ready(function () {
|
|
$("input, select", $("#tab_new_clie")).on("click keyup", function () {
|
|
if ($(this).hasClass("field_error") && $.trim($(this).val()).length > 0) {
|
|
$(this).removeClass("field_error");
|
|
if ($(this).hasattr("paramComplem")) { // esempio, le presenze di partita iva e cod. fisc si compensano
|
|
var paramCompl = $("input[name='" + $(this).attr("paramComplem") + "']");
|
|
$(paramCompl).removeClass("field_error");
|
|
}
|
|
}
|
|
});
|
|
|
|
$("input[name='check_dest_new']").on("click", function () {
|
|
var fields = $("input, select", $("#dati_dest"));
|
|
if ($(this).is(":checked")) {
|
|
fields.prop("disabled", false);
|
|
} else {
|
|
fields.attr("disabled", true).removeClass("field_error");
|
|
}
|
|
});
|
|
});<?php
|
|
}?>
|
|
|
|
function valida_form() {
|
|
try {
|
|
var ret = true;
|
|
var report_error = "";
|
|
|
|
if ($("#id_anag").val().length == 0) {
|
|
ret = false;
|
|
report_error = "Cliente non specificato";
|
|
}
|
|
<?php if($conf["step_req_rif-ord_cons"] == 1){?>
|
|
var exp = /^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/;
|
|
|
|
var data = $("#dt_cons").val();
|
|
var data_rif_ord = $("#data_rif_ord").val();
|
|
if (ret) {
|
|
if (!exp.test(data)) {
|
|
report_error = "Data di consegna non corretta";
|
|
$("#err_data").html("Formato data errato");
|
|
ret = false;
|
|
} else if (!exp.test(data_rif_ord)) {
|
|
report_error = "Data rif. ordine non corretta";
|
|
ret = false;
|
|
}
|
|
}<?php
|
|
}
|
|
|
|
if($conf["step_ins_new_clie"] == 1){?>
|
|
if ($("#nuovo").val() == "S" && ret) {
|
|
ret = checkFormNewClie();
|
|
if (!ret) {
|
|
$("#report_error").html(report_error).fadeIn(700).delay(2000).fadeOut(2000);
|
|
}
|
|
}<?php
|
|
}?>
|
|
if (!ret) {
|
|
$("#report_error").html(report_error).fadeIn(700).delay(2000).fadeOut(2000);
|
|
}
|
|
return ret;
|
|
} catch (e) {
|
|
alert(e);
|
|
return false;
|
|
}
|
|
}
|
|
</script><?php
|
|
} ?>
|
|
<link href="css/select_dest_du.css?<?= "v" . date("dmYHi") ?>" rel="stylesheet" type="text/css"/><?php
|
|
} ?>
|
|
<div class="molliche">Selezione cliente</div>
|
|
<div id="contenuto">
|
|
<?php /******************* action = 'index1.php' **********************************/ ?>
|
|
<form name="form_index" id="form_index" action="index1.php" method="post" enctype="multipart/form-data"
|
|
onsubmit="return valida_form();">
|
|
<table cellpadding="10" cellspacing="0" align="center" width="960"><?php
|
|
if ($selGiro) { // SELEZIONE TIPO CEDIAL
|
|
?>
|
|
<tr id="tr_filter">
|
|
<td style="width:230px;">
|
|
Data Consegna
|
|
<input class="inp_data big" id="dt_cons" type="text"
|
|
value="<?= strftime("%d/%m/%Y", $data_cons_default) ?>" autocomplete="off"/>
|
|
<input name="data_cons" type="hidden" value="<?= $data_cons_default ?>"/>
|
|
</td>
|
|
<td align="center"> Mostra giro clienti del
|
|
<select id="week-day"><?php
|
|
foreach ($weekDays as $day => $value) {
|
|
$selected = ($day == date("w") + 1) ? selected : "";
|
|
echo "<option value='$day' $selected>$value</option>";
|
|
} ?>
|
|
</select>
|
|
<div class="src_box b" align="left">
|
|
<input id="live_filter" style="width:80%;" type="text"
|
|
placeholder="<?= $string_searchClie ?>"/>
|
|
<div class="ico src_ico"></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<table id="tab_clienti" align="center"></table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">
|
|
<input id="id_destinazione_cons" type="hidden" name="id_destinazione_cons" value=""/>
|
|
<input id="id_anag" type="hidden" name="id_anag" value=""/>
|
|
<input name="nuovo" type="hidden" value="N"/>
|
|
</td>
|
|
</tr><?php
|
|
} else { // SELEZIONE CLIENTI CLASSICA (1 VG, 2 DULCIAR e gramm)
|
|
if ($conf["tipo_ins"] == 1) { //VG
|
|
?>
|
|
<tr>
|
|
<td valign="top" width="500"> <?= _TEXT_234 ?>
|
|
<input class="inp_data" id="dt_cons" type="text" placeholder="gg/mm/aaaa"
|
|
value="<?= strftime("%d/%m/%Y", $data_cons_default) ?>" autocomplete="off"/>
|
|
<input name="data_cons" type="hidden" value="<?= $data_cons_default ?>"/>
|
|
</td>
|
|
</tr><?php
|
|
} ?>
|
|
<tr>
|
|
<td valign="top">
|
|
<table cellpadding="6" style="width:100%"><?php
|
|
if ($conf["tipo_ins"] == 2) {
|
|
if ($conf["step_req_rif-ord_cons"] == 1) {
|
|
?>
|
|
<tr>
|
|
<td valign="top">
|
|
<table style="width:500px;" cellspacing="1" cellpadding="1">
|
|
<tr>
|
|
<td width="200"><?= _TEXT_234 ?>
|
|
<input class="inp_data" id="dt_cons" type="text"
|
|
placeholder="gg/mm/aaaa" autocomplete="off"/>
|
|
<input name="data_cons" type="hidden" value=""/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Rif. ordine: <input id="n_rif_ord" type="text" name="n_rif_ord"
|
|
value="" size="20" maxlength="12"/> del
|
|
<input name="data_rif_ord" class="inp_data" id="data_rif_ord"
|
|
type="text" placeholder="gg/mm/aaaa" autocomplete="off"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3">
|
|
<div id="err_data_rif_ord" style="color:#F00"></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3">Metodo di Pagamento: <b id="descr_paga"></b></td>
|
|
</tr>
|
|
<?php
|
|
if (isset($conf["situazione_fido"]) && $conf["situazione_fido"]) {
|
|
?>
|
|
<tr>
|
|
<td colspan="3">Situaz. fido: <span id="situazione_fido"></span>
|
|
</td>
|
|
</tr><?php
|
|
}
|
|
|
|
?>
|
|
</table>
|
|
</td>
|
|
</tr><?php
|
|
}
|
|
}
|
|
if (isset($conf["upload_order_file"]) && $conf["upload_order_file"]) {
|
|
?>
|
|
<tr>
|
|
<td colspan="3">
|
|
Carica da file (facoltativo)<br/>
|
|
<input type="file" name="file_order"
|
|
style="height:20px;width:300px;border:1px solid #CCCCCC;font-size:11px"/>
|
|
</td>
|
|
</tr><?php
|
|
} ?>
|
|
<tr>
|
|
<td valign="top" width="200" colspan="2" align="left">
|
|
<b><span class="sede">Cliente</span></b> e <b><span
|
|
class="dest">destinazioni</span></b><br/>
|
|
<div style="float: left; display: block;">
|
|
<div id="rettangolo">
|
|
<div id="div_select_box_selected"><br/>Elenco clienti
|
|
(<?= count($arr_clienti) ?>)
|
|
</div>
|
|
<div id="select_freccia"></div>
|
|
<div id="div_select"><?php
|
|
if ($_SESSION["gruppo"] != _clienti && isset($conf["new_clie_defaults"]) && $conf["step_ins_new_clie"] == 1) {
|
|
if (!(isset($conf["order+new_clie"][$_SESSION["gruppo"]]) && !$conf["order+new_clie"][$_SESSION["gruppo"]])) { // blocco inserimento nuovo cliente con ordine per categoria di utenti
|
|
// aggiunge dati default nuovo cliente
|
|
?>
|
|
<div id="new_clie_box" class="row_res"
|
|
onclick="loadNewClie()">
|
|
<b>Nuovo Cliente</b><br/>Aggiungi i dati di un nuovo
|
|
cliente
|
|
</div><?php
|
|
}
|
|
}
|
|
if (strlen($uid_file) > 0) {
|
|
$_GET["t_search"] = "clienti";
|
|
$_GET["q"] = "view_all_123";
|
|
$_GET["uid_file"] = $uid_file;
|
|
$ris_max = 2000;
|
|
include $conf["livesearch_page"];
|
|
} else { ?>
|
|
<div class="row_res">Nessun cliente trovato</div><?php
|
|
} ?>
|
|
</div>
|
|
<div id="err_cliente" style="color:#F00"></div>
|
|
</div>
|
|
<div class="src_box">
|
|
<input id="inp_livesearch" type="text" placeholder="Cerca"
|
|
autocomplete="off"/>
|
|
<div class="ico src_ico"></div>
|
|
<div id="livesearch"></div>
|
|
<div><?= _STR_1 ?></div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td width="500" id="new_clie_container"><?php
|
|
if ($conf["step_ins_new_clie"] == 1) {
|
|
$sql = "SELECT cod_paga, descrizione
|
|
FROM gtb_paga
|
|
WHERE flag_paga_remoto = 'S'";
|
|
$db->query($sql);
|
|
while ($db->next_record()) {
|
|
$array_paga[$db->f("cod_paga")] = $db->f("descrizione");
|
|
}
|
|
$sql = "SELECT nazione, descrizione FROM gtb_nazi ORDER BY descrizione";
|
|
$db->query($sql);
|
|
while ($db->next_record()) {
|
|
$array_nazioni[$db->f("nazione")] = $db->f("descrizione");
|
|
} ?>
|
|
<table id="tab_new_clie" width="100%">
|
|
<tbody>
|
|
<tr>
|
|
<td style="width:150px"><?= _TEXT_59 . ((in_array("rag_soc", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td colspan="2" align="left"><input <?= isNewClieObbl("rag_soc") ?> size="50"
|
|
name="rag_soc_new"
|
|
type="text"
|
|
maxlength="40"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= _TEXT_60 . ((in_array("indirizzo", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td colspan="2" align="left"><input <?= isNewClieObbl("indirizzo") ?> size="50"
|
|
name="indirizzo_new"
|
|
type="text"
|
|
maxlength="40"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= _TEXT_61 . ((in_array("citta", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("citta") ?> name="citta_new" size="25"
|
|
type="text" maxlength="30"/>
|
|
</td>
|
|
<td>
|
|
<table width="100%">
|
|
<tr>
|
|
<td align="right"><?= "Cap" . ((in_array("cap", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("cap") ?> size="5"
|
|
maxlength="5"
|
|
name="cap_new"
|
|
type="text"
|
|
pattern="\d+"/></td>
|
|
<td align="right"><?= _TEXT_62 . ((in_array("prov", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("prov") ?> maxlength="2"
|
|
size="3"
|
|
name="prov_new"
|
|
type="text"/></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= _TEXT_63 . ((in_array("nazione", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left">
|
|
<select name="nazione_new"><?php
|
|
foreach ($array_nazioni as $key => $value) {
|
|
$selected = (strtoupper($key) == "IT") ? selected : ""; ?>
|
|
<option value="<?= $key ?>" <?= $selected ?>><?= $value ?></option><?php
|
|
} ?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= _TEXT_64 . ((in_array("tel", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("tel") ?> size="25" name="tel_new"
|
|
type="text" maxlength="40"/>
|
|
</td>
|
|
<td>
|
|
<table width="100%">
|
|
<tr>
|
|
<td width="40"><?= _TEXT_65 . ((in_array("fax", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("fax") ?> size="20"
|
|
name="fax_new"
|
|
type="text"
|
|
maxlength="40"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= _TEXT_58 . ((in_array("e_mail", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("e_mail") ?> name="e_mail_new" size="25"
|
|
type="text" maxlength="40"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= _TEXT_66 . ((in_array("part_iva", $arr_newClieObbl)) ? " **" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("part_iva") ?> size="25"
|
|
name="part_iva_new"
|
|
maxlength="16" type="text"
|
|
paramComplem="cod_fisc_new"/>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><?= "ABI" . ((in_array("abi", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("abi") ?> size="25" name="abi_new"
|
|
maxlength="5" type="text"/></td>
|
|
<td>
|
|
<table width="100%">
|
|
<tr>
|
|
<td width="40"><?= "CAB" . ((in_array("cab", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("cab") ?> size="20"
|
|
name="cab_new"
|
|
maxlength="5"
|
|
type="text"
|
|
size="10"/></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><?= _TEXT_67 . ((in_array("cod_fisc", $arr_newClieObbl)) ? " **" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("cod_fisc") ?> size="25"
|
|
name="cod_fisc_new"
|
|
maxlength="16" type="text"
|
|
paramComplem="part_iva_new"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= "Note" . ((in_array("note", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("note") ?> size="25" name="note_new"
|
|
type="text" maxlength="80"/>
|
|
</td>
|
|
<td><?php
|
|
echo "Listino " . ((in_array("cod_vlis", $arr_newClieObbl)) ? " *" : "");
|
|
if ($superuser) { ?>
|
|
<select name="cod_vlis_new" style="width: 150px"><?php
|
|
$sql = "SELECT cod_vlis, descrizione FROM vtb_list WHERE flag_attivo = 'S'";
|
|
$db->query($sql);
|
|
while ($db->next_record()) {
|
|
$selected = (echoifisset($conf["new_clie_defaults"]["cod_vlis"]) == $db->f("cod_vlis")) ? selected : ""; ?>
|
|
<option
|
|
value="<?= $db->f("cod_vlis") ?>" <?= $selected ?>><?= $db->f("cod_vlis") . " - " . $db->f("descrizione") ?></option><?php
|
|
} ?>
|
|
</select><?php
|
|
} else {
|
|
$existListino = FALSE;
|
|
?>
|
|
<select name="cod_vlis_new" style="width: 150px"><?php
|
|
$sql = "SELECT vtb_agen.cod_vlis, vtb_list.descrizione "
|
|
. "FROM vtb_list, vtb_agen "
|
|
. "WHERE vtb_list.flag_attivo = 'S' and "
|
|
. " vtb_agen.cod_vage = '" . $_SESSION["user_code"] . "' AND "
|
|
. " vtb_list.cod_vlis = vtb_agen.cod_vlis ";
|
|
$db->query($sql);
|
|
while ($db->next_record()) {
|
|
$existListino = TRUE;
|
|
$selected = (echoifisset($conf["new_clie_defaults"]["cod_vlis"]) == $db->f("cod_vlis")) ? selected : ""; ?>
|
|
<option
|
|
value="<?= $db->f("cod_vlis") ?>" <?= $selected ?>><?= $db->f("cod_vlis") . " - " . $db->f("descrizione") ?></option><?php
|
|
}
|
|
|
|
if (!$existListino) {
|
|
echo ": <b>" . echoifisset($conf["new_clie_defaults"]["cod_vlis"]) . "</b>";
|
|
?>
|
|
<option value="<?= echoifisset($conf["new_clie_defaults"]["cod_vlis"]) ?>"
|
|
selected>
|
|
<?= echoifisset($conf["new_clie_defaults"]["cod_vlis"]) ?>
|
|
</option><?php
|
|
} ?>
|
|
</select><?php
|
|
} ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= _TEXT_68 . ((in_array("pers_rif", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("pers_rif") ?> size="25"
|
|
name="pers_rif_new"
|
|
type="text"
|
|
maxlength="40"/></td>
|
|
<td><?php
|
|
echo "Agente" . ((in_array("cod_vage", $arr_newClieObbl)) ? " *" : "");
|
|
if ($superuser) {
|
|
?>
|
|
<select name="cod_vage_new"
|
|
style="width: 150px" <?= isNewClieObbl("cod_vage") ?>>
|
|
<option value="" <?= selected ?>>Seleziona...</option><?php
|
|
$sql = "SELECT cod_vage, rag_soc
|
|
FROM vtb_agen
|
|
WHERE data_fine_rap > GETDATE() OR data_fine_rap IS NULL";
|
|
$db->query($sql);
|
|
while ($db->next_record()) {
|
|
?>
|
|
<option
|
|
value="<?= $db->f("cod_vage") ?>"><?= $db->f("cod_vage") . " - " . $db->f("rag_soc") ?></option>
|
|
<?php } ?>
|
|
</select><?php
|
|
} else {
|
|
echo ": <b>" . $_SESSION["user_code"] . " - " . $_SESSION["fullname"] . "</b>";
|
|
?>
|
|
<input name="cod_vage_new" type="hidden"
|
|
value="<?= $_SESSION["user_code"] ?>" /><?php
|
|
} ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3">
|
|
<table width="100%">
|
|
<tr>
|
|
<td width="120"
|
|
align="left"><?= "Modalità di pagamento" . ((in_array("paga", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left">
|
|
<select name="paga_new"><?php
|
|
foreach ($array_paga as $key => $value) {
|
|
?>
|
|
<option
|
|
value="<?= "$key:$value" ?>"><?= $value ?></option><?php
|
|
} ?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3"><input name="check_dest_new" type="checkbox"
|
|
checked="checked"/> <?= "Aggiungi dati destinatario (riempire se diversi dai dati generici del cliente)" ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3">
|
|
<table width="100%" id="dati_dest">
|
|
<tr>
|
|
<td style="width:150px"><?= "Destinatario" . ((in_array("rag_soc_dest", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td colspan="2" align="left"><input <?= isNewClieObbl("rag_soc_dest") ?>
|
|
size="50" name="rag_soc_dest_new" type="text"
|
|
maxlength="40"/></td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= "Indirizzo Dest." . ((in_array("indirizzo_dest", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td colspan="2" align="left">
|
|
<input <?= isNewClieObbl("indirizzo_dest") ?> size="50"
|
|
name="indirizzo_dest_new"
|
|
type="text"
|
|
maxlength="40"/></td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= "Città Dest." . ((in_array("citta_dest", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("citta_dest") ?> size="25"
|
|
name="citta_dest_new"
|
|
type="text"
|
|
maxlength="30"/>
|
|
</td>
|
|
<td>
|
|
<table width="100%">
|
|
<tr>
|
|
<td align="right"><?= "Cap" . ((in_array("cap_dest", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("cap_dest") ?>
|
|
size="4" maxlength="5" name="cap_dest_new"
|
|
type="text" pattern="\d+"/></td>
|
|
<td align="right"><?= _TEXT_62 . ((in_array("prov_dest", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("prov_dest") ?>
|
|
size="2" maxlength="2" name="prov_dest_new"
|
|
type="text"/></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= "Nazione Dest." . ((in_array("nazione_dest", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left">
|
|
<select name="nazione_dest_new"><?php
|
|
foreach ($array_nazioni as $key => $value) {
|
|
$selected = (strtoupper($key) == "IT") ? selected : ""; ?>
|
|
<option
|
|
value="<?= $key ?>" <?= $selected ?>><?= $value ?></option><?php
|
|
} ?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= "Telefono Dest." . ((in_array("tel_dest", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("tel_dest") ?> size="25"
|
|
name="tel_dest_new"
|
|
type="text"
|
|
maxlength="40"/>
|
|
</td>
|
|
<td>
|
|
<table width="100%">
|
|
<tr>
|
|
<td><?= "Fax Dest." . ((in_array("fax_dest", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("fax_dest") ?>
|
|
size="20" name="fax_dest_new" type="text"
|
|
maxlength="40"/></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><?= "Note Dest." . ((in_array("note_dest", $arr_newClieObbl)) ? " *" : "") ?></td>
|
|
<td align="left"><input <?= isNewClieObbl("note_dest") ?> size="25"
|
|
name="note_dest_new"
|
|
type="text"
|
|
maxlength="80"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3">(*) Campo obbligatorio<br/>(**) È obbligatorio inserire
|
|
la Partita IVA o il Codice Fiscale
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table><?php
|
|
} ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" align="right">
|
|
<input id="nuovo" type="hidden" name="nuovo" value="N"/>
|
|
<input id="cod_paga" type="hidden" name="cod_paga" value=""/>
|
|
<input id="rag_soc" type="hidden" name="rag_soc" value=""/>
|
|
<input id="indirizzo" type="hidden" name="indirizzo" value=""/>
|
|
<input id="citta" type="hidden" name="citta" value=""/>
|
|
<input id="destinatario" type="hidden" name="destinatario" value=""/>
|
|
<input id="cod_vlis" type="hidden" name="cod_vlis" value=""/>
|
|
<input id="cod_mdep" type="hidden" name="cod_mdep" value=""/>
|
|
<input id="id_destinazione_cons" type="hidden" name="id_destinazione_cons" value=""/>
|
|
<input id="id_anag" type="hidden" name="id_anag" value=""/>
|
|
|
|
<span id="report_error"> </span>
|
|
<input id="avanti" type="submit" class="button_met" value="Avanti"/>
|
|
</td>
|
|
</tr><?php
|
|
} ?>
|
|
</table>
|
|
</form>
|
|
</div><?php
|
|
require_once "footer.php";
|