pagina di ordine correttamente funzionante - sistemare dettaglio prodotto
This commit is contained in:
@@ -19,7 +19,7 @@ if(isset($_POST['cod_articolo'])){
|
||||
if(!isset($_SESSION['data_ord'])){
|
||||
$_SESSION['data_ord'] = date("Y-m-d 00:00:00.000");
|
||||
}
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
if(!isset($_SESSION['num_ord'])){
|
||||
$db->query("SELECT * FROM wdtb_ordt WHERE gestione='V' AND data_ord='".$_SESSION['data_ord']."' AND serie ='$serie' AND flag_elaborato='I' AND cod_anag='".$_SESSION['cod_anag']."' AND cod_vdes='".$_SESSION['cod_vdes']."'");
|
||||
} else{
|
||||
|
||||
@@ -58,7 +58,7 @@ foreach ($_POST as $key => $value){
|
||||
$data_cons_array = explode("/", $_POST["data_cons_".$id]);
|
||||
$data_cons = $data_cons_array[2]."-".$data_cons_array[1]."-".$data_cons_array[0]." 00:00:00.000";
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
if(!isset($_SESSION["num_ord"])){
|
||||
$db->query("SELECT * FROM Wdtb_ordt WHERE gestione='V' AND data_ord='".strftime("%Y/%m/%d", $_SESSION["data_ord"])."' AND serie = '" .$serie."' AND flag_elaborato='I' AND cod_anag='".$_SESSION["cod_anag"]."' AND cod_vdes='".$_SESSION["cod_vdes"]."'");
|
||||
} else{
|
||||
@@ -157,7 +157,7 @@ foreach ($_POST as $key => $value){
|
||||
$data_cons_array=explode("/", $_POST["data_cons_".$id]);
|
||||
$data_cons=$data_cons_array[2]."-".$data_cons_array[1]."-".$data_cons_array[0]." 00:00:00.000";
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
if(!isset($_SESSION["num_ord"])){
|
||||
$db->query("SELECT * FROM Wdtb_ordt WHERE gestione='V' AND data_ord='".strftime("%Y/%m/%d", $_SESSION["data_ord"])."' AND flag_elaborato='I' AND cod_anag='".$_SESSION["cod_anag"]."' AND cod_vdes='".$_SESSION["cod_vdes"]."'");
|
||||
} else{
|
||||
@@ -256,7 +256,7 @@ foreach ($_POST as $key => $value){
|
||||
$data_cons_array=explode("/", $_POST["data_cons_".$id]);
|
||||
$data_cons=$data_cons_array[2]."-".$data_cons_array[1]."-".$data_cons_array[0]." 00:00:00.000";
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
if(!isset($_SESSION["num_ord"])){
|
||||
$db->query("SELECT * FROM Wdtb_ordt WHERE gestione='V' AND data_ord='".strftime("%Y/%m/%d", $_SESSION["data_ord"])."' AND flag_elaborato='I' AND cod_anag='".$_SESSION["cod_anag"]."' AND cod_vdes='".$_SESSION["cod_vdes"]."'");
|
||||
} else{
|
||||
|
||||
@@ -47,7 +47,7 @@ foreach($_POST as $key => $value){
|
||||
$val_unt = $qta_cnf = "0";
|
||||
$descrizione_articolo = $unt_ord = "";
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query("SELECT descrizione, qta_cnf, unt_mis FROM mtb_aart WHERE cod_mart = '$codice_articolo'");
|
||||
while($db->next_record()){
|
||||
$descrizione_articolo = $db->f("descrizione");
|
||||
|
||||
@@ -4,24 +4,32 @@ require_once("../config.php");
|
||||
require_once("../include_login.php");
|
||||
|
||||
try{
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$data_ord = date("d/m/Y");
|
||||
$cod_mart = sanitize($_GET["cod_mart"]);
|
||||
$serie_ord = $num_ord_prov = $cod_promo = "";
|
||||
$cod_anag = isset($_GET["cod_anag"]) ? sanitize($_GET["cod_anag"]) : $_SESSION["cod_anag"];
|
||||
$cod_vdes = isset($_GET["cod_vdes"]) ? sanitize($_GET["cod_vdes"]) : $_SESSION["cod_vdes"];
|
||||
|
||||
$wsdl_url = "http://".$db->getEndpoint()."/axis2/services/".$db->getWsdl()."?wsdl";
|
||||
$client = new SOAPClient($wsdl_url);
|
||||
$params = array("profileDB" => $db->getDbname(),
|
||||
"cod_anag" => $cod_anag,
|
||||
"cod_vdes" => $cod_vdes,
|
||||
$body = array(
|
||||
"cod_anag" => $_SESSION["cod_anag"],
|
||||
"cod_vdes" => $_SESSION["cod_vdes"],
|
||||
"cod_mart" => $cod_mart,
|
||||
"data_ord" => $data_ord,
|
||||
"data_ord" => strftime("%d-%m-%Y 00:00:00", $_SESSION["data_ord"]),
|
||||
"serie" => $serie_ord,
|
||||
/*** cod_vlis skipped **/
|
||||
"num_ord_prov" => $num_ord_prov);
|
||||
$result = $client->getCustomerItemInfo($params);
|
||||
$returnId = $result->return->returnId;
|
||||
|
||||
$params = array(
|
||||
"profileDb" => $db->getDbname(),
|
||||
"username" => $db->getUtenteWEB(),
|
||||
"password" => $db->getPasswordWEB(),
|
||||
"body" => $body);
|
||||
|
||||
$articleInfo = new RestCall($db->getEndpoint());
|
||||
$articleInfo->getCustomerItemInfo($params);
|
||||
|
||||
$returnId = $articleInfo->return->esito;
|
||||
if($returnId==1){
|
||||
$xml_info = simplexml_load_string((string)$result->return->fileXML);
|
||||
$json_data = array();
|
||||
|
||||
@@ -4,7 +4,7 @@ session_start();
|
||||
// require_once('../include.php');
|
||||
require_once('../config.php');
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$day = $_GET['day'];
|
||||
|
||||
$whereCond = "";
|
||||
|
||||
@@ -66,7 +66,7 @@ elseif($paramType=="select_sql"){
|
||||
$conf["report"]["keyfield"][] = $paramName;
|
||||
$sql = convertSqlVar2Values(str_replace("MONOSELECT:", "", $expression));
|
||||
$values_array = $columns_array = array();
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
|
||||
$db->query($sql);
|
||||
while($db->next_record()){ // CARICAMENTO RIGHE
|
||||
|
||||
@@ -13,7 +13,7 @@ $serie_ord = getSerie();
|
||||
$flag_elaborato = "N"; // DEFAULT STATO VERDE
|
||||
|
||||
try {
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
if ($conf["order_verify"]) { // gramm vg
|
||||
$data_ord = strftime("%Y-%m-%d", $_SESSION["data_ord"]) . " 00:00:00";
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ service($this->serviceName)
|
||||
/** $this->return = inserire qui la risposta di Curl. return conterrà a sua volta returnID ed error text **/
|
||||
$curl->addHeaders($header);
|
||||
$curl->setHeaders();
|
||||
$curl->setData($this->body);
|
||||
$curl->setData(json_encode($this->body));
|
||||
$curl->authenticateInPhpApp($this->username, $this->password);
|
||||
|
||||
$return = json_decode($curl->execute());
|
||||
|
||||
@@ -280,7 +280,7 @@ require_once("top_menu.php");
|
||||
WHERE sospesi.cod_anag = gtb_anag.cod_anag
|
||||
GROUP BY gtb_anag.rag_soc";
|
||||
|
||||
$db2 = new cms;
|
||||
$db2 = new Cms;
|
||||
$db2->query($sql);
|
||||
while($db2->next_record()){
|
||||
$ragSoc = $db2->f("rag_soc");
|
||||
|
||||
@@ -5,8 +5,8 @@ if(!isset($_SESSION["username"]) && isset($_SESSION["user"])){
|
||||
unset($_SESSION["user"]);
|
||||
}*/
|
||||
|
||||
ini_set("soap.wsdl_cache_enabled",0);
|
||||
ini_set("soap.wsdl_cache_ttl",0);
|
||||
//ini_set("soap.wsdl_cache_enabled",0);
|
||||
//ini_set("soap.wsdl_cache_ttl",0);
|
||||
|
||||
define("_agenti", 5);
|
||||
define("_ispettori", 6);
|
||||
@@ -157,4 +157,4 @@ $lang = "it";
|
||||
require_once("language/lang_{$lang}/_{$lang}_.php");
|
||||
require_once('include/Cms.php');
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
@@ -31,9 +31,9 @@ require_once("./classes/RestCall.php");
|
||||
<div id="contenuto">
|
||||
<div id="corpo" style="width:460px;">
|
||||
<div class="molliche"><?= _TEXT_236 ?></div><?
|
||||
/**************** to be updated HERE ********************/
|
||||
|
||||
try {
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$cod_mart = $_GET["cpr"];
|
||||
$flag_td = getFlagTd($_SESSION["cod_anag"]);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ require_once("include_login.php");
|
||||
if(!in_array("file_manager", $conf["page_menu"][$_SESSION["gruppo"]]))
|
||||
header("Location: ".$conf["homepage_user"]);
|
||||
|
||||
$db2 = new cms;
|
||||
$db2 = new Cms;
|
||||
|
||||
$id_file_focus = (isset($_GET["focus"])) ? $_GET["focus"] : "";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ session_start();
|
||||
// require_once('include.php');
|
||||
require_once('config.php');
|
||||
require_once('include_login.php');
|
||||
$db2 = new cms;
|
||||
$db2 = new Cms;
|
||||
|
||||
if(!in_array("ricezione_file", $conf['user_menu']))
|
||||
header("Location: ".$conf["homepage_user"]);
|
||||
|
||||
@@ -7,7 +7,7 @@ require_once('include_login.php');
|
||||
if(!in_array('file_upload', $conf["page_menu"][$_SESSION["gruppo"]]))
|
||||
header("Location: ".$conf["homepage_user"]);
|
||||
|
||||
$db2 = new cms;
|
||||
$db2 = new Cms;
|
||||
$maxcharnote = 1000;
|
||||
|
||||
if(isset($_POST["tot_user"])){
|
||||
|
||||
18
func.php
18
func.php
@@ -61,7 +61,7 @@ function sql2array($sql, $options = array())
|
||||
$ret = array();
|
||||
$return_class = false;
|
||||
try {
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query($sql);
|
||||
$k = 0;
|
||||
$retData = array();
|
||||
@@ -183,7 +183,7 @@ function writeLog($message)
|
||||
|
||||
function getFlagTd($cod_anag)
|
||||
{
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query("SELECT flag_td FROM vtb_clie WHERE cod_anag='$cod_anag'");
|
||||
$flag_td = '';
|
||||
while ($db->next_record()) {
|
||||
@@ -201,7 +201,7 @@ function getSerie()
|
||||
{
|
||||
if (isset($_SESSION["gruppo"])) {
|
||||
if ($_SESSION["gruppo"] == _agenti) {
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$sql = "SELECT ISNULL(serie, 'WEB') AS serie FROM vtb_agen WHERE cod_vage = '" . $_SESSION["user_code"] . "'";
|
||||
$db->query($sql);
|
||||
if ($db->next_record()) {
|
||||
@@ -245,7 +245,7 @@ function formatDatetimeGeneral($date, $format)
|
||||
function getNewNumOrd($gestione, $serie, $anno)
|
||||
{
|
||||
try {
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$wsdl_url = "http://" . $db->getEndpoint() . "/axis2/services/" . $db->getWsdl() . "?wsdl";
|
||||
$client = new SOAPClient($wsdl_url);
|
||||
$params = array("profileDB" => $db->getDbname(),
|
||||
@@ -579,7 +579,7 @@ function checkStralci()
|
||||
dtb_ordt.cod_vage = wtb_users.user_code AND
|
||||
wtb_users.user_name = '" . $_SESSION["username"] . "'
|
||||
GROUP BY dtb_ordt.num_ord,dtb_ordt.data_ord, dtb_ordt.serie";
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query($sql);
|
||||
$_SESSION["stralci"] = $db->num_rows();
|
||||
}
|
||||
@@ -941,7 +941,7 @@ function get_user_email($username = null)
|
||||
if (is_null($username)) {
|
||||
return null;
|
||||
}
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$sql = "SELECT e_mail, wtb_user_groups.user_group, user_code, full_name
|
||||
FROM wtb_users INNER JOIN wtb_user_groups ON wtb_user_groups.Key_group = wtb_users.key_group
|
||||
WHERE User_name = '{$username}'";
|
||||
@@ -1138,7 +1138,7 @@ function get_constIfDef($const_name, $default_value)
|
||||
function mail_ws($to, $subject, $message, $from)
|
||||
{
|
||||
try {
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
|
||||
$body = array(
|
||||
"to" => $to,
|
||||
@@ -1186,7 +1186,7 @@ function autocompile_email($user_code, $user_group, $user_email)
|
||||
if (strlen($tab_name) > 0) {
|
||||
list($tab_name, $id_key) = explode(".", $tab_name);
|
||||
$sql = "SELECT e_mail FROM $tab_name WHERE $id_key = '$user_code'";
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query($sql);
|
||||
if ($db->next_record()) {
|
||||
$user_email = $db->f("e_mail");
|
||||
@@ -1293,7 +1293,7 @@ function getAzienda()
|
||||
function get_prod_images($cod_mart)
|
||||
{
|
||||
return array();
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
|
||||
$sql = "SELECT path_link, descrizione_link FROM mtb_aart_link WHERE cod_mart='{$cod_mart}'";
|
||||
$arr_items = sql2array($sql);//var_dump($arr_items);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
session_start();
|
||||
include "config.php";
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
// utilizzato solo da area report
|
||||
try{
|
||||
$ret["returnId"] = 1;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
require_once('include/Cms.php');
|
||||
require_once('include/Mssql.php');
|
||||
require_once('include/Mysql.php');
|
||||
require_once('include/PdoSqlsrv.php');
|
||||
require_once('include/Sqlsrv.php');
|
||||
require_once('./include/Cms.php');
|
||||
require_once('./include/Mssql.php');
|
||||
require_once('./include/Mysql.php');
|
||||
require_once('./include/PdoSqlsrv.php');
|
||||
require_once('./include/Sqlsrv.php');
|
||||
|
||||
|
||||
class cms extends cust_conf
|
||||
class Cms extends cust_conf
|
||||
{
|
||||
// public $endPoint = array( "studioml" => "192.168.2.205:8080", "cliente" => "172.16.30.5:8080");
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class GestSetup{
|
||||
|
||||
/**************************************** NEW CMS ***********************************************/
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
|
||||
|
||||
$db->query($sql);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
function exportFileToServer_add($localPath, $filename){
|
||||
try{
|
||||
if(file_exists($localPath)){
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$content = fileIntoString($localPath);
|
||||
$wsdl_url = "http://".$db->getEndPoint()."/axis2/services/".$db->getWsdl()."?wsdl";
|
||||
$client = new SOAPClient($wsdl_url);
|
||||
@@ -26,7 +26,7 @@ function exportFileToServer_read($filename){
|
||||
try{
|
||||
deleteCache("jrxml", 300); // ELIMINA DALLA CACHE FILE JRXML PIU VECCHI DI 300 SECONDI
|
||||
if(!file_exists(cache_folder.basename($filename))){
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$wsdl_url = "http://".$db->getEndPoint()."/axis2/services/".$db->getWsdl()."?wsdl";
|
||||
$client = new SOAPClient($wsdl_url);
|
||||
$params = array("filename" => $filename);
|
||||
@@ -59,7 +59,7 @@ function exportFileToServer_read($filename){
|
||||
|
||||
function exportFileToServer_delete($filename){
|
||||
try{
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$wsdl_url = "http://".$db->getEndPoint()."/axis2/services/".$db->getWsdl()."?wsdl";
|
||||
$client = new SOAPClient($wsdl_url);
|
||||
$params = array("filename" => $filename);
|
||||
|
||||
@@ -31,13 +31,13 @@ unset_order_in_session();
|
||||
|
||||
$url_imgtop = ($debugMode) ? "logintop_integry.jpg" : "custom_" . $_SESSION["azienda"] . "/logintop.jpg";
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$err_text = " ";
|
||||
if (isset($_POST["username"])) {
|
||||
$username = sanitize($_POST["username"]);
|
||||
$password = sanitize($_POST["password"]);
|
||||
setcookie("user");
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$sql = "SELECT wtb_user_groups.User_group, wtb_users.key_group, User_name, Password, e_mail, Full_name, ctrl_state,
|
||||
CASE WHEN User_code IS NULL AND wtb_users.key_group = 3 THEN (
|
||||
SELECT wtb_clie.cod_anag FROM wtb_clie WHERE wtb_clie.user_name = wtb_users.user_name
|
||||
|
||||
@@ -76,7 +76,7 @@ require_once "top_menu.php";
|
||||
|
||||
if($conf["tipo_ins"]==1){
|
||||
if(isset($_GET["cpr"])){
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query("SELECT descrizione FROM mtb_grup WHERE cod_mgrp='".sanitize($_GET["cline"])."'");
|
||||
while($db->next_record()){
|
||||
$nome_linea = $db->f("descrizione");
|
||||
@@ -87,7 +87,7 @@ require_once "top_menu.php";
|
||||
}?>
|
||||
<div class="molliche"><a href="index0.php">Selezione gruppo merceologico</a> » <a href="index0.php?cline=<?=$_GET["cline"]?>"><?=$nome_linea?></a> » <strong><?=$cod_articolo?></strong></div><?
|
||||
} elseif(isset($_GET["cline"])){
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query("SELECT descrizione FROM mtb_grup WHERE cod_mgrp='".sanitize($_GET["cline"])."'");
|
||||
while($db->next_record()){
|
||||
$nome_linea = $db->f("descrizione");
|
||||
@@ -107,10 +107,12 @@ if($conf["tipo_ins"]==1){
|
||||
require_once "menu_sx.php";?>
|
||||
<div id="corpo"><?
|
||||
if(isset($_GET["all"])){
|
||||
/***** for all DIVISIONI *****/
|
||||
include "modulo_vis_line_all.php";
|
||||
} else if(isset($_GET["cpr"])){
|
||||
include "modulo_vis_prodotto.php";
|
||||
} else if(isset($_GET["cline"])){
|
||||
/**** for a specific DIVISIONE ******/
|
||||
include "modulo_vis_line.php";
|
||||
} else{
|
||||
include "modulo_index.php";
|
||||
|
||||
19
index1.php
19
index1.php
@@ -145,7 +145,8 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
|
||||
}
|
||||
|
||||
try {
|
||||
$data = date("d/m/Y");
|
||||
/************ DATA, COD_ANAG, COD_VDES *****************/
|
||||
$data = date("Y-m-d");
|
||||
$cod_anag = $_SESSION["cod_anag"];
|
||||
$cod_vdes = $_SESSION["cod_vdes"];
|
||||
$cod_mgrp = $cod_msgr = $cod_msfa = $cod_mart = $cod_vlis = "";
|
||||
@@ -154,14 +155,13 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
|
||||
FROM Wtb_users INNER JOIN wtb_user_groups ON Wtb_users.key_group = wtb_user_groups.Key_group
|
||||
WHERE User_name = '{$_SESSION["username"]}'";
|
||||
|
||||
|
||||
$db->query($sql);
|
||||
|
||||
while ($db->next_record()) {
|
||||
$user_group = $db->f("user_group");
|
||||
$user_code = $db->f("User_code");
|
||||
}
|
||||
|
||||
/************** COD_MGRP *********************/
|
||||
if ($user_group == _fornitori) {
|
||||
$db->query("SELECT DISTINCT mtb_grup.cod_mgrp
|
||||
FROM mtb_grup, mtb_aart_anag, mtb_aart
|
||||
@@ -184,14 +184,16 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
|
||||
"data_prezzo" => $data,
|
||||
"cod_anag" => $cod_anag,
|
||||
"cod_vdes" => $cod_vdes,
|
||||
"cod_vlis" => $cod_vlis,
|
||||
"cod_mgrp" => $cod_mgrp,
|
||||
|
||||
"cod_vlis" => $cod_vlis,
|
||||
"cod_msgr" => $cod_msgr,
|
||||
"cod_msfa" => $cod_msfa,
|
||||
"cod_mart" => $cod_mart);
|
||||
|
||||
|
||||
$params = array(
|
||||
"profileDB" => $profileDB,
|
||||
"profileDb" => $profileDB,
|
||||
"username" => $db->getUtenteWEB(),
|
||||
"password"=>$db->getPasswordWEB(),
|
||||
"body"=>$body);
|
||||
@@ -199,7 +201,7 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
|
||||
$client->getCustomerPriceListNew($params);
|
||||
|
||||
if ($client->return->esito == 1) {
|
||||
$_SESSION["xml_1"] = preg_replace('/(<\?xml[^?]+?)utf-16/i', '$1utf-8', $result->return);
|
||||
$_SESSION["cod_mgrp"] = json_decode($client->return->dto)->divisione;
|
||||
} else {
|
||||
echo $client->return->errorMessage;
|
||||
}
|
||||
@@ -211,7 +213,7 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
|
||||
include "wrap-riep_current_order.php";
|
||||
|
||||
if (isset($_GET["cpr"])) {
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query("SELECT descrizione FROM mtb_grup WHERE cod_mgrp = '" . $_GET["cline"] . "'");
|
||||
while ($db->next_record()) {
|
||||
$nome_linea = $db->f("descrizione");
|
||||
@@ -225,7 +227,7 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
|
||||
merceologico</a> » <a href="index0.php?cline=<?= $_GET["cline"] ?>"><?= $nome_linea ?></a> » <strong><?= $cod_articolo ?></strong>
|
||||
</div><?
|
||||
} else if (isset($_GET["cline"])) {
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query("SELECT descrizione FROM mtb_grup WHERE cod_mgrp = '" . $_GET["cline"] . "'");
|
||||
while ($db->next_record()) {
|
||||
$nome_linea = $db->f("descrizione");
|
||||
@@ -239,6 +241,7 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
|
||||
<script type="text/javascript" src="js/consPrec.js"></script>
|
||||
|
||||
<div id="contenuto"><?
|
||||
/*************** menu_sx defines variables: $cod_mgrp, $descrizione, $count_promo, $logo_web ********/
|
||||
require_once "menu_sx.php";
|
||||
?>
|
||||
<div id="corpo"><?
|
||||
|
||||
@@ -5,7 +5,7 @@ ini_set('soap.wsdl_cache_ttl', 0);
|
||||
|
||||
$_reportingFunc->deleteCache(300, "jrxml"); // ELIMINA DALLA CACHE FILE JRXML PIU VECCHI DI 300 SECONDI
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$div_style = "font-family:verdana, arial;font-size: 12px;";
|
||||
$token = isset($_POST["token"]) ? $_POST["token"] : null;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class exportFileToServer{
|
||||
try{
|
||||
$cache_filepath = cache_folder.basename($filename);
|
||||
if(!file_exists($cache_filepath)){
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$wsdl_url = "http://".$db->getEndPoint()."/axis2/services/".$db->getWsdl()."?wsdl";
|
||||
$client = new SOAPClient($wsdl_url);
|
||||
$params = array("filename" => $filename);
|
||||
@@ -30,7 +30,7 @@ class exportFileToServer{
|
||||
|
||||
public function delete($filename){
|
||||
try{
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$wsdl_url = "http://".$db->getEndPoint()."/axis2/services/".$db->getWsdl()."?wsdl";
|
||||
$client = new SOAPClient($wsdl_url);
|
||||
$params = array("filename" => $filename);
|
||||
|
||||
@@ -57,7 +57,7 @@ else if($paramType=="select_sql" || $paramType=="monoselect_sql"){?>
|
||||
$conf["report"]["keyfield"][] = $paramName;
|
||||
$sql = $_reportingFunc->convertSqlVar2Values($expression);
|
||||
$values_array = $columns_array = array();
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query($sql);
|
||||
while($db->next_record()){ // CARICAMENTO RIGHE
|
||||
for($i = 0; $i<$db->num_fields(); $i++){
|
||||
|
||||
@@ -4,7 +4,7 @@ class reporting{
|
||||
public function call_ws_execJasper($REPO_FLT){
|
||||
$ret = array();
|
||||
try{
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$sql = "SELECT * FROM wtb_jrept WHERE report_name = '{$REPO_FLT["reportName"]}'";
|
||||
$db->query($sql);
|
||||
if($db->next_record()){
|
||||
@@ -57,7 +57,7 @@ class reporting{
|
||||
}
|
||||
|
||||
public function check_unique_name($name){
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$sql = "SELECT * FROM wtb_jrept WHERE report_name = '{$name}'"; // VERIFICA SE ESISTE GIA UN REPORT STESSO NOME
|
||||
$db->query($sql);
|
||||
return ($db->num_rows()>0) ? $this->check_unique_name($name."_01") : $name;
|
||||
@@ -68,7 +68,7 @@ class reporting{
|
||||
$_reportingFunc = new reporting_func;
|
||||
$report_name = $_reportingFunc->escape($FIELDS["report_name"]);
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$sql = "SELECT * FROM wtb_jrept WHERE report_name = '{$report_name}'";
|
||||
$db->query($sql);
|
||||
if($db->next_record()){
|
||||
@@ -91,7 +91,7 @@ class reporting{
|
||||
|
||||
$jrxml = simplexml_load_string(base64_decode($b64_jrxml));
|
||||
if($jrxml){
|
||||
$db2 = new cms;
|
||||
$db2 = new Cms;
|
||||
$sql = "SELECT *, CONVERT(TEXT, expression) AS expression
|
||||
FROM wtb_jrepr
|
||||
WHERE report_name = '{$report_name}' AND
|
||||
@@ -199,8 +199,8 @@ class reporting{
|
||||
|
||||
public function exec_query_update(){
|
||||
$updated = false;
|
||||
$db = new cms;
|
||||
$db2 = new cms;
|
||||
$db = new Cms;
|
||||
$db2 = new Cms;
|
||||
$sql = "SELECT * FROM wtb_jrepr";
|
||||
$db->query($sql);
|
||||
while($db->next_record()){
|
||||
@@ -272,7 +272,7 @@ class reporting_func{
|
||||
public function sql2array($sql){
|
||||
$ret = array();
|
||||
try{
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$db->query($sql);
|
||||
$k = 0;
|
||||
$ret_json = array();
|
||||
@@ -355,7 +355,7 @@ class reporting_func{
|
||||
foreach($values as $valp){
|
||||
$returning = "";
|
||||
$paramName = str_replace("[[", "", str_replace("]]", "", $valp)); // PRENDE NOME PARAMETRO
|
||||
$db3 = new cms;
|
||||
$db3 = new Cms;
|
||||
$sql = "SELECT CONVERT(TEXT, expression) AS expression,
|
||||
tipo
|
||||
FROM wtb_jrepr
|
||||
@@ -370,7 +370,7 @@ class reporting_func{
|
||||
$expression_2 = $this->convertSqlVar2Values($expression_2);
|
||||
$sql = $this->test($expression_2, $report_name);
|
||||
if($sql!="-1"){
|
||||
$db4 = new cms;
|
||||
$db4 = new Cms;
|
||||
$db4->query($sql);
|
||||
if($db4->next_record()){
|
||||
$returning.= " '".$db4->f($paramName)."' "; // LEGGE 1 VALORE DATO DAL PARAMETRO ANNIDATO
|
||||
|
||||
@@ -196,7 +196,7 @@ $_reporting->exec_query_update();
|
||||
tipo IN ('select_sql', 'monoselect_sql') AND
|
||||
parameter_name <> '$paramName' AND
|
||||
flag_disabled= 'N'";
|
||||
$db3 = new cms;
|
||||
$db3 = new Cms;
|
||||
$db3->query($sql);
|
||||
while($db3->next_record()){
|
||||
if(strpos(base64_decode($db3->f("expression")), "[[$paramName]]") !== false){
|
||||
@@ -213,7 +213,7 @@ $_reporting->exec_query_update();
|
||||
$sql = $_reportingFunc->convertSqlVar2Values(str_replace("MONOSELECT:", "", $expression));
|
||||
|
||||
$values_array = $columns_array = array();
|
||||
$db3 = new cms;
|
||||
$db3 = new Cms;
|
||||
$db3->query($sql);
|
||||
while($db3->next_record()){ // CARICAMENTO RIGHE
|
||||
for($i = 0; $i<$db3->num_fields(); $i++){
|
||||
|
||||
@@ -17,7 +17,7 @@ if(!isset($_SESSION)){
|
||||
}
|
||||
</style>
|
||||
<?
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$car_min= 1; // caratteri minimi per avviare la ricerca
|
||||
$ris_max = 30; // numero risultati massimi da visualizzare
|
||||
$q = $_GET["q"];
|
||||
|
||||
@@ -11,7 +11,7 @@ if(isset($_GET["user"]))
|
||||
include_once("config.php");
|
||||
include_once("func.php");
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
|
||||
$url_imgtop = ($debugMode) ? "logintop_integry.jpg" : "custom_".$_SESSION["azienda"]."/logintop.jpg";
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ if(isset($_COOKIE["azienda"])){
|
||||
include_once "config.php";
|
||||
include_once "func.php";
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
|
||||
$url_imgtop = ($debugMode) ? "logintop_integry.jpg" : "custom_".$_SESSION["azienda"]."/logintop.jpg";
|
||||
|
||||
|
||||
19
menu_sx.php
19
menu_sx.php
@@ -1,17 +1,12 @@
|
||||
<div id="sx_menu">
|
||||
<ul><?
|
||||
if(isset($_SESSION['xml_1']) && strlen($_SESSION['xml_1'])>0){
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadXML($_SESSION['xml_1']);
|
||||
if(isset($_SESSION['cod_mgrp']) && is_array($_SESSION['cod_mgrp'])>0){
|
||||
|
||||
$root = $doc->documentElement;
|
||||
$array_cod_mgrp = $root->getElementsByTagName("cod_mgrp");
|
||||
|
||||
foreach ($array_cod_mgrp as $cod_mgrps){
|
||||
$cod_mgrp = $cod_mgrps->getAttribute("codice");
|
||||
$descrizione = $cod_mgrps->getAttribute("descrizione");
|
||||
$promo = $cod_mgrps->getElementsByTagName("count_promo");
|
||||
$count_promo = $promo->item(0)->nodeValue;
|
||||
foreach ($_SESSION['cod_mgrp'] as $divisione){
|
||||
$cod_mgrp = $divisione->codice_divisione_mgrp[0];
|
||||
$descrizione = $divisione->descrizione_divisione[0];
|
||||
$count_promo = $divisione->count_promo[0];
|
||||
$logo_web = $divisione->logo_web_divisione[0];
|
||||
?>
|
||||
<li <?if(isset($_GET['cline']) && $_GET['cline']==$cod_mgrp)echo "class='attivo'";?>>
|
||||
<a href="index0.php?cline=<?=$cod_mgrp?>"><?
|
||||
@@ -24,7 +19,7 @@
|
||||
}
|
||||
else{?>
|
||||
<li>
|
||||
<a href="#">Errore di caricamento xml</a>
|
||||
<a href="#">Errore di caricamento json</a>
|
||||
</li><?
|
||||
}?>
|
||||
</ul>
|
||||
|
||||
@@ -1,28 +1,50 @@
|
||||
<?
|
||||
$flag_td = getFlagTd($_SESSION['cod_anag']);
|
||||
$doc = new DOMDocument();
|
||||
/*$doc = new DOMDocument();
|
||||
$doc->loadXML($_SESSION['xml_1']);
|
||||
$root = $doc->documentElement;
|
||||
$root = $doc->documentElement;*/
|
||||
|
||||
if(isset($conf['mod_index_loghi']) && !$conf['mod_index_loghi']){ // CEDIAL
|
||||
$xpath = new DOMXPath($doc);
|
||||
if (isset($conf['mod_index_loghi']) && !$conf['mod_index_loghi']) {
|
||||
/****** CEDIAL - NOT USED ANYMORE 2021-01-14 ********/
|
||||
/*$xpath = new DOMXPath($doc);*/
|
||||
$condStatus = "R";
|
||||
$xquery = "cod_msgr";
|
||||
|
||||
$array_cod_msgr = $root->getElementsByTagName($xquery);
|
||||
$numRows = $xpath->query('//cod_mgrp/cod_msgr/cod_msfa/cod_mart[@st="R" or @st="RP"]')->length;
|
||||
$array_cod_msgr = array();/* $root->getElementsByTagName($xquery);*/
|
||||
$numRows = 0;
|
||||
foreach ($_SESSION['cod_mgrp'] as $divisione) {
|
||||
if ($divisione->codice_divisione_mgrp[0] == $cod_mgrp) {
|
||||
foreach ($divisione->famiglia as $famiglia) {
|
||||
array_push($array_cod_msgr, $famiglia);
|
||||
foreach ($famiglia->sottofamiglia as $sottofamiglia) {
|
||||
foreach ($sottofamiglia->articolo as $articolo) {
|
||||
$st = $articolo->st[0];
|
||||
if (in_array($st, ["R", "RP"], TRUE)) {
|
||||
$numRows = +1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
$_SESSION["st"] = $st;
|
||||
|
||||
/*$numRows = $xpath->query('//cod_mgrp/cod_msgr/cod_msfa/cod_mart[@st="R" or @st="RP"]')->length;*/
|
||||
|
||||
include "modwrap_list_art.php";
|
||||
} else { // VG?>
|
||||
<div style="display:block;"><?= _TEXT_118 ?></div><?
|
||||
$i = 0;
|
||||
$array_cod_mgrp = $root->getElementsByTagName("cod_mgrp");
|
||||
foreach ($array_cod_mgrp as $cod_mgrps){
|
||||
$cod_mgrp = $cod_mgrps->getAttribute("codice");
|
||||
$descrizione = $cod_mgrps->getAttribute("descrizione");
|
||||
$logo_web = $cod_mgrps->getAttribute("logo_web");
|
||||
$promo = $cod_mgrps->getElementsByTagName("count_promo");
|
||||
$count_promo = $promo->item(0)->nodeValue;
|
||||
/*$array_cod_mgrp = $root->getElementsByTagName("cod_mgrp");*/
|
||||
|
||||
foreach ($_SESSION['cod_mgrp'] as $divisione) {
|
||||
|
||||
$cod_mgrp = $divisione->codice_divisione_mgrp[0];
|
||||
$descrizione = $divisione->descrizione_divisione[0];
|
||||
$count_promo = $divisione->count_promo[0];
|
||||
$logo_web = $divisione->logo_web_divisione[0];
|
||||
|
||||
$path_logo = "config_aziende/custom_" . $_SESSION["azienda"] . "/images/";
|
||||
$file_image = ($logo_web == '' || !file_exists($path_logo . $logo_web)) ? "no_image.jpg" : $logo_web;
|
||||
|
||||
@@ -1,15 +1,37 @@
|
||||
<?
|
||||
$flag_td = getFlagTd($_SESSION['cod_anag']);
|
||||
$doc = new DOMDocument();
|
||||
/*$doc = new DOMDocument();
|
||||
$doc->loadXML($_SESSION['xml_1']);
|
||||
$xpath = new DOMXPath($doc);
|
||||
$xpath = new DOMXPath($doc);*/
|
||||
|
||||
$cod_mgrp = $_GET['cline'];
|
||||
$condStatus = "RP";
|
||||
$xquery = '//cod_mgrp[@codice="'.$cod_mgrp.'"]/cod_msgr';
|
||||
/*$xquery = '//cod_mgrp[@codice="'.$cod_mgrp.'"]/cod_msgr';
|
||||
|
||||
$array_cod_msgr = $xpath->query($xquery);
|
||||
$array_cod_msgr = $xpath->query($xquery);*/
|
||||
|
||||
$numRows = $xpath->query($xquery.'/cod_msfa/cod_mart[@st="R" or @st="P" or @st="RP"]')->length;
|
||||
$array_cod_msgr = array();/* $root->getElementsByTagName($xquery);*/
|
||||
|
||||
$numRows = 0;
|
||||
|
||||
foreach ($_SESSION['cod_mgrp'] as $index => $divisione) {
|
||||
// FILTER USING COD_MGRP
|
||||
if ($divisione->codice_divisione_mgrp[0] == $cod_mgrp){
|
||||
foreach ($divisione->famiglia as $famiglia){
|
||||
array_push($array_cod_msgr, $famiglia);
|
||||
foreach ($famiglia->sottofamiglia as $sottofamiglia){
|
||||
foreach ($sottofamiglia->articolo as $articolo){
|
||||
$st = $articolo->st[0];
|
||||
if (in_array($st, ["R","P", "RP"], TRUE)){
|
||||
$numRows =+ 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*$numRows = $xpath->query($xquery.'/cod_msfa/cod_mart[@st="R" or @st="P" or @st="RP"]')->length;*/
|
||||
|
||||
include "modwrap_list_art.php";
|
||||
@@ -1,14 +1,30 @@
|
||||
<?
|
||||
$flag_td = getFlagTd($_SESSION["cod_anag"]);
|
||||
$doc = new DOMDocument();
|
||||
/*$doc = new DOMDocument();
|
||||
$doc->loadXML($_SESSION["xml_1"]);
|
||||
$xpath = new DOMXPath($doc);
|
||||
$xquery = '//cod_mgrp[@codice="'.$cod_mgrp.'"]/cod_msgr';
|
||||
$array_cod_msgr = $xpath->query($xquery);*/
|
||||
|
||||
$cod_mgrp = $_GET["cline"];
|
||||
$condStatus = "RP0";
|
||||
$xquery = '//cod_mgrp[@codice="'.$cod_mgrp.'"]/cod_msgr';
|
||||
$array_cod_msgr = $xpath->query($xquery);
|
||||
|
||||
$numRows = $xpath->query($xquery.'/cod_msfa/cod_mart[@st="R" or @st="P" or @st="RP" or @st="0"]')->length;
|
||||
$array_cod_msgr = array();/* $root->getElementsByTagName($xquery);*/
|
||||
$numRows = 0;
|
||||
foreach ($_SESSION['cod_mgrp'] as $divisione) {
|
||||
if ($divisione->codice_divisione_mgrp[0] == $cod_mgrp) {
|
||||
foreach ($divisione->famiglia as $famiglia) {
|
||||
array_push($array_cod_msgr, $famiglia);
|
||||
foreach ($famiglia->sottofamiglia as $sottofamiglia) {
|
||||
foreach ($sottofamiglia->articolo as $articolo) {
|
||||
$st = $articolo->st[0];
|
||||
if (in_array($st, ["R", "P", "RP", "0"], TRUE)) {
|
||||
$numRows = +1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$condStatus = "RP0";/*$numRows = $xpath->query($xquery.'/cod_msfa/cod_mart[@st="R" or @st="P" or @st="RP" or @st="0"]')->length*/;
|
||||
|
||||
include "modwrap_list_art.php";
|
||||
@@ -8,7 +8,8 @@ $flag_td = getFlagTd($_SESSION["cod_anag"]);
|
||||
|
||||
$(".data_cons")
|
||||
.attr("readonly", "readonly")
|
||||
.datepicker({minDate: 1,
|
||||
.datepicker({
|
||||
minDate: 1,
|
||||
beforeShowDay: noSundaysOrHolidays,
|
||||
onSelect: function (dateText, inst) {
|
||||
var time = dateToTimestamp(dateText);
|
||||
@@ -65,20 +66,25 @@ $flag_td = getFlagTd($_SESSION["cod_anag"]);
|
||||
input.button_met {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
font-size: 11px;
|
||||
font-family: "WOL_Reg", "Segoe UI", Tahoma, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
#order_list td {
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
#order_list tr.cons_prec {
|
||||
display: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#order_list tr.cons_prec.waiter td, #order_list tr.cons_prec.none td {
|
||||
border-bottom: 1px solid #d5d5d5 !important;
|
||||
}
|
||||
|
||||
#order_list tr.cons_prec td:first-child {
|
||||
border-left: 0px;
|
||||
border-bottom: 0px;
|
||||
@@ -102,9 +108,12 @@ $flag_td = getFlagTd($_SESSION["cod_anag"]);
|
||||
<td align="right" style="visibility: hidden; font-size: 18px;">
|
||||
<table align="right">
|
||||
<tr>
|
||||
<td align="right"><?=_TEXT_253?></td><td><img src="images/structure/tl_-1.gif" /></td>
|
||||
<td align="right" style="padding-left:20px;"><?=_TEXT_254?></td><td><img src="images/structure/tl_0.gif" /></td>
|
||||
<td align="right" style="padding-left:20px;"><?=_TEXT_255?></td><td><img src="images/structure/tl_1.gif" /></td>
|
||||
<td align="right"><?= _TEXT_253 ?></td>
|
||||
<td><img src="images/structure/tl_-1.gif"/></td>
|
||||
<td align="right" style="padding-left:20px;"><?= _TEXT_254 ?></td>
|
||||
<td><img src="images/structure/tl_0.gif"/></td>
|
||||
<td align="right" style="padding-left:20px;"><?= _TEXT_255 ?></td>
|
||||
<td><img src="images/structure/tl_1.gif"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -113,7 +122,8 @@ $flag_td = getFlagTd($_SESSION["cod_anag"]);
|
||||
</div>
|
||||
<div id="contenuto"><?
|
||||
|
||||
if($condStatus=="RP"){ // se magina mod_vis_line.php o modulo_index ?>
|
||||
if ($condStatus == "RP") { // se magina mod_vis_line.php o modulo_index
|
||||
?>
|
||||
<div style="text-align:right;width:770px;">
|
||||
<a href="index0.php?cline=<?= $_GET["cline"] ?>&all=yes" style="font-size:13px;">
|
||||
<b>Visualizza tutti i prodotti disponibili</b>
|
||||
@@ -132,26 +142,27 @@ if($numRows>0){
|
||||
} ?>
|
||||
<form action="aggiungi_al_carrello2.php" method="post">
|
||||
<div style="clear:left;text-align:right;display:block;margin-top:25px;">
|
||||
<!-- --------------- INDICA QUI LE ANNOTAZIONI PER QUEST'ORDINE ------------------------- -->
|
||||
<input type="text" id="noteOrd" name="noteOrd" placeholder="<?= note_ord_default ?>" value="<?= $noteOrd ?>" style="margin-right:30px;width:300px;border: 1px solid #AAAAAA;"/>
|
||||
<input type="button" class="button_met b" value="<< Indietro" onClick="document.location.href='index0.php';"/>
|
||||
<input class="button_met" type="submit" value="Aggiungi al Carrello"/><br/><br/>
|
||||
</div><?
|
||||
|
||||
$hold = $h = $i = $totArt =0;
|
||||
foreach ($array_cod_msgr as $cod_msgrs){ // XML1
|
||||
$cod_msgr = $cod_msgrs->getAttribute("codice");
|
||||
$descrizione_msgr = $cod_msgrs->getAttribute("descrizione");
|
||||
$hold = $h = $totArt = 0;
|
||||
|
||||
foreach ($array_cod_msgr as $famiglia) { // XML1
|
||||
$cod_msgr = $famiglia->codice_famiglia_msgr[0];
|
||||
$descrizione_msgr = $famiglia->descrizione_famiglia[0];
|
||||
$h++;
|
||||
$array_cod_msfa = $cod_msgrs->getElementsByTagName("cod_msfa");// inserimento dei valori in un array
|
||||
foreach ($famiglia->sottofamiglia as $sottofamiglia) {
|
||||
$i = 0; /********* numbers of actual articles in sottofamiglia ********/
|
||||
|
||||
foreach($array_cod_msfa as $cod_msfas){ // estrazione array delle famiglie
|
||||
$cod_msfa = $cod_msfas->getAttribute("codice");
|
||||
$descrizione_msfa = $cod_msfas->getAttribute("descrizione");
|
||||
$array_cod_mart = $cod_msfas->getElementsByTagName("cod_mart");
|
||||
$i = 0;
|
||||
$descrizione_msfa = $sottofamiglia->descrizione_sottofamiglia[0];
|
||||
$cod_msfa = $sottofamiglia->codice_sottofamiglia_msfa[0];
|
||||
foreach ($sottofamiglia->articolo as $articolo) {
|
||||
// estrazione array delle famiglie
|
||||
|
||||
foreach ($array_cod_mart as $cod_marts){
|
||||
$statusArt = $cod_marts->getAttribute("st");
|
||||
$statusArt = $articolo->st[0];
|
||||
|
||||
if (array_intersect(str_split($condStatus), str_split($statusArt))) { // CONFRONTO FRA VETTORI
|
||||
if ($h != $hold) {
|
||||
@@ -159,20 +170,22 @@ if($numRows>0){
|
||||
$hold = $h;
|
||||
}
|
||||
$i++;
|
||||
$cod_mart = $cod_marts->getAttribute("codice");
|
||||
$cod_mart = $articolo->codice_articolo_mart[0];
|
||||
if ($i == 1) {
|
||||
if (!empty($descrizione_msfa)) echo "$descrizione_msfa<br />";
|
||||
?>
|
||||
<table id="order_list" style="border-bottom: none;" cellpadding="2" cellspacing="0" align="center" width="100%">
|
||||
<tr style="background-color: #f1f1f1;">
|
||||
<th width="48" style="border-left:1px solid #d5d5d5;"><?=_TEXT_198?></th>
|
||||
<th style="width:200px"><?=_TEXT_199?></th>
|
||||
<th><?=_TEXT_200?></th>
|
||||
<th><?=_TEXT_201?></th><?
|
||||
if($flag_td!="S"){?>
|
||||
<th width="48" style="border-left:1px solid #d5d5d5;"><?= _TEXT_198 ?></th> <!--cod.-->
|
||||
<th style="width:200px"><?= _TEXT_199 ?></th><!--Descrizione-->
|
||||
<th><?= _TEXT_200 ?></th><!--UM-->
|
||||
<th><?= _TEXT_201 ?></th><!--Pezzi in conf--><?
|
||||
if ($flag_td != "S") {
|
||||
?>
|
||||
<th width="54"><?= _TEXT_256 ?></th><?
|
||||
}
|
||||
if($viewDateconsRow){?>
|
||||
if ($viewDateconsRow) {
|
||||
?>
|
||||
<th style="width:30px"><?= _TEXT_202 ?></th><?
|
||||
} ?>
|
||||
<th><?= _TEXT_257 ?></th>
|
||||
@@ -184,42 +197,36 @@ if($numRows>0){
|
||||
</tr><?
|
||||
}
|
||||
|
||||
$descr_mart = $cod_marts->getElementsByTagName("descrizione");
|
||||
$descrizione_mart = $descr_mart->item(0)->nodeValue;
|
||||
$unt_mis = $cod_marts->getElementsByTagName("unt_mis");
|
||||
$unt_mis_mart = $unt_mis->item(0)->nodeValue;
|
||||
$val_unt = $cod_marts->getElementsByTagName("prz_vend");
|
||||
$val_unt_mart = $val_unt->item(0)->nodeValue;
|
||||
$qta_cnf = $cod_marts->getElementsByTagName("qta_cnf");
|
||||
$qta_conf = $qta_cnf->item(0)->nodeValue;
|
||||
$descrizione_mart = $articolo->descrizione[0];
|
||||
$unt_mis_mart = $articolo->unt_mis[0];
|
||||
$val_unt_mart = $articolo->prz_vend[0];
|
||||
$qta_conf = $articolo->qta_cnf[0];
|
||||
|
||||
$sconto5_node = $cod_marts->getElementsByTagName("sconto5");
|
||||
$sconto5 = $sconto5_node->item(0)->nodeValue;
|
||||
$sconto6_node = $cod_marts->getElementsByTagName("sconto6");
|
||||
$sconto6 = $sconto6_node->item(0)->nodeValue;
|
||||
$sconto7_node = $cod_marts->getElementsByTagName("sconto7");
|
||||
$sconto7 = $sconto7_node->item(0)->nodeValue;
|
||||
$sconto8_node = $cod_marts->getElementsByTagName("sconto8");
|
||||
$sconto8 = $sconto8_node->item(0)->nodeValue;
|
||||
$sconto5 = $articolo->sconto5[0];
|
||||
$sconto6 = $articolo->sconto6[0];
|
||||
$sconto7 = $articolo->sconto7[0];
|
||||
$sconto8 = $articolo->sconto8[0];
|
||||
|
||||
$promo = $cod_marts->getElementsByTagName("num_promo");
|
||||
$num_promo_mart = $promo->item(0)->nodeValue;
|
||||
$num_promo_mart = $articolo->num_promo[0];
|
||||
|
||||
$qta_esistente_node = $cod_marts->getElementsByTagName("qta_esistente");
|
||||
$qta_esistente = $qta_esistente_node->item(0)->nodeValue;
|
||||
$qta_esistente = $articolo->qta_esistente[0];
|
||||
|
||||
$qta_imp_lav_node = $cod_marts->getElementsByTagName("qta_imp_lav");
|
||||
$qta_imp_lav = $qta_imp_lav_node->item(0)->nodeValue;
|
||||
$qta_imp_lav = $articolo->qta_imp_lav[0];
|
||||
|
||||
$qta_imp_cli_node = $cod_marts->getElementsByTagName("qta_imp_cli");
|
||||
$qta_imp_cli = $qta_imp_cli_node->item(0)->nodeValue;
|
||||
$qta_imp_cli = $articolo->qta_imp_cli[0];
|
||||
|
||||
$qta_ord_for_node = $cod_marts->getElementsByTagName("qta_ord_for");
|
||||
$qta_ord_for = $qta_ord_for_node->item(0)->nodeValue;
|
||||
$qta_ord_for = $articolo->qta_ord_for[0];
|
||||
|
||||
if(($qta_esistente-$qta_imp_lav-$qta_imp_cli+$qta_ord_for)<=0){$giac="-1";$giac_title=_TEXT_253;}
|
||||
elseif(($qta_esistente-$qta_imp_lav-$qta_imp_cli)>0){$giac="1";$giac_title=_TEXT_255;}
|
||||
else{$giac="0";$giac_title=_TEXT_254;}
|
||||
if (($qta_esistente - $qta_imp_lav - $qta_imp_cli + $qta_ord_for) <= 0) {
|
||||
$giac = "-1";
|
||||
$giac_title = _TEXT_253;
|
||||
} elseif (($qta_esistente - $qta_imp_lav - $qta_imp_cli) > 0) {
|
||||
$giac = "1";
|
||||
$giac_title = _TEXT_255;
|
||||
} else {
|
||||
$giac = "0";
|
||||
$giac_title = _TEXT_254;
|
||||
}
|
||||
$promo_presente = $cod_promo = $descr_promo = $flag_reso_riv = "";
|
||||
|
||||
if ($num_promo_mart == "0") {
|
||||
@@ -229,13 +236,11 @@ if($numRows>0){
|
||||
|
||||
$cod_promo_disponibili = array();
|
||||
$promo_disponibili = array();
|
||||
$array_promozioni = $cod_marts->getElementsByTagName("promozioni");
|
||||
$array_promozioni = $articolo->promozioni[0];
|
||||
|
||||
foreach($array_promozioni as $promozionis){
|
||||
$codice_promozione = $promozionis->getElementsByTagName("cod_promo");
|
||||
$cod_promo = $codice_promozione->item(0)->nodeValue;
|
||||
$descrizione_promozione = $promozionis->getElementsByTagName("descrizione");
|
||||
$descr_promo = $descrizione_promozione->item(0)->nodeValue;
|
||||
foreach ($array_promozioni as $promozioni) {
|
||||
$cod_promo = $promozioni->cod_promo[0];
|
||||
$descr_promo = $promozioni->descrizione[0];
|
||||
$promo_disponibili[] = $descr_promo;
|
||||
$cod_promo_disponibili[] = $cod_promo;
|
||||
}
|
||||
@@ -273,17 +278,23 @@ if($numRows>0){
|
||||
|
||||
?>
|
||||
<tr style="background-color: <?= $tr_bgcolor ?>" paramreaded="0" class="art_tr" id="<?= "tr_$cod_mart" ?>" paramBgOrig="<?= $tr_bgcolor ?>">
|
||||
<td align="center" style="border-left:1px solid #d5d5d5;"><a href="javascript:Popup('dettaglio_prodotto.php?cline=<?=$cod_mgrp?>&cpr=<?=$cod_mart?>')" title="<?=_TEXT_230?>"><?=$cod_mart?></a></td><?
|
||||
<td align="center" style="border-left:1px solid #d5d5d5;"><!--Cod.-->
|
||||
<a href="javascript:Popup('dettaglio_prodotto.php?cline=<?= $cod_mgrp ?>&cpr=<?= $cod_mart ?>')" title="<?= _TEXT_230 ?>"><?= $cod_mart ?></a>
|
||||
</td><?
|
||||
|
||||
if($num_promo_mart>1){?>
|
||||
<td>
|
||||
<a href="javascript:Popup('dettaglio_prodotto.php?cline=<?=$cod_mgrp?>&cpr=<?=$cod_mart?>')" title="<?=_TEXT_230?>"><?=$descrizione_mart?> <span style="color:#FF0000;"><b><?=$promo_presente?></b></span></a><br /><b>Scegli:</b>
|
||||
if ($num_promo_mart > 1) {
|
||||
?>
|
||||
<td><!--Descrizione-->
|
||||
<a href="javascript:Popup('dettaglio_prodotto.php?cline=<?= $cod_mgrp ?>&cpr=<?= $cod_mart ?>')" title="<?= _TEXT_230 ?>"><?= $descrizione_mart ?>
|
||||
<span style="color:#FF0000;"><b><?= $promo_presente ?></b></span></a><br/><b>Scegli:</b>
|
||||
<select name="cod_promo_<?= $cod_mart ?>"><?
|
||||
if($cod_promo_scelta != ""){?>
|
||||
if ($cod_promo_scelta != "") {
|
||||
?>
|
||||
<option value="<?= $cod_promo_scelta ?>" selected="selected"><?= $descr_promo_scelta ?></option><?
|
||||
}
|
||||
for ($a = 0; $a < $count_promo; $a++) {
|
||||
if($cod_promo_disponibili[$a] != $cod_promo_scelta){?>
|
||||
if ($cod_promo_disponibili[$a] != $cod_promo_scelta) {
|
||||
?>
|
||||
<option value="<?= $cod_promo_disponibili[$a] ?>"><?= $promo_disponibili[$a] ?></option><?
|
||||
}
|
||||
} ?>
|
||||
@@ -292,9 +303,11 @@ if($numRows>0){
|
||||
} else { ?>
|
||||
<td>
|
||||
<a href="javascript:Popup('dettaglio_prodotto.php?cline=<?= $cod_mgrp ?>&cpr=<?= $cod_mart ?>')" title="<?= _TEXT_230 ?>">
|
||||
<?=$descrizione_mart?> <span style="color:#FF0000;"><b><?=$promo_presente?></b></span>
|
||||
<?= $descrizione_mart ?>
|
||||
<span style="color:#FF0000;"><b><?= $promo_presente ?></b></span>
|
||||
</a><?
|
||||
if($num_promo_mart==1){?>
|
||||
if ($num_promo_mart == 1) {
|
||||
?>
|
||||
<br/><b><?= $descr_promo ?></b><?
|
||||
} ?>
|
||||
</td>
|
||||
@@ -302,19 +315,32 @@ if($numRows>0){
|
||||
}
|
||||
$totArt++;
|
||||
?>
|
||||
<td align="center"><?=$unt_mis_mart?></td>
|
||||
<td align="center"><?=$qta_conf?></td><?
|
||||
if($flag_td!="S"){?>
|
||||
<td align="center"><!--UM--><?= $unt_mis_mart ?></td>
|
||||
<td align="center"><!--Pezzi in conf.--><?= $qta_conf ?></td><?
|
||||
if ($flag_td != "S") {
|
||||
?>
|
||||
<td align="center"><?= number_format($val_unt_mart, 2, ".", "'") ?></td><?
|
||||
}
|
||||
if($viewDateconsRow){?>
|
||||
<td align="center"><input class="data_cons" name="data_cons_<?=$cod_mart?>" type="text" value="<?=$data_cons_esist?>" maxlength="10" style="text-align:center;width:70px;height:16px;margin-top:2px;" /></td><?
|
||||
}
|
||||
else{?><input name="data_cons_<?=$cod_mart?>" type="hidden" value="<?=$data_cons_esist?>" /><?}?>
|
||||
<td align="center"><input class="cartoni" id="cartoni_<?=$cod_mart?>" <?=(isSmartDevice()) ? "pattern='[0-9]*' type='number'" : "type='text'"; ?> value="<?=$qta_gia_cartoni?>" maxlength="4" style="text-align:center;width:30px;height:16px;" /></td>
|
||||
<td align="center"><input class="pezzi" name="pezzi_<?=$cod_mart?>" id="pz_<?=$cod_mart?>" type="text" value="<?=$qta_gia_ord?>" maxlength="4" style="text-align:center;width:30px;height:16px;" /></td>
|
||||
<td align="center"><input class="pezzi_omg" name="pezzi_omg_<?=$cod_mart?>" id="pz_omg_<?=$cod_mart?>" type="text" value="<?=$qta_gia_omg?>" maxlength="4" style="text-align:center;width:30px;height:16px;" /></td>
|
||||
<td align="center"><input class="pezzi_resi" name="pezzi_resi_<?=$cod_mart?>" id="pz_resi_<?=$cod_mart?>" type="text" value="<?=$qta_gia_reso?>" maxlength="4" style="text-align:center;width:30px;height:16px;" />
|
||||
if ($viewDateconsRow) {
|
||||
?>
|
||||
<td align="center">
|
||||
<input class="data_cons" name="data_cons_<?= $cod_mart ?>" type="text" value="<?= $data_cons_esist ?>" maxlength="10" style="text-align:center;width:70px;height:16px;margin-top:2px;"/>
|
||||
</td><?
|
||||
} else {
|
||||
?>
|
||||
<input name="data_cons_<?= $cod_mart ?>" type="hidden" value="<?= $data_cons_esist ?>" /><?
|
||||
} ?>
|
||||
<td align="center">
|
||||
<input class="cartoni" id="cartoni_<?= $cod_mart ?>" <?= (isSmartDevice()) ? "pattern='[0-9]*' type='number'" : "type='text'"; ?> value="<?= $qta_gia_cartoni ?>" maxlength="4" style="text-align:center;width:30px;height:16px;"/>
|
||||
</td>
|
||||
<td align="center">
|
||||
<input class="pezzi" name="pezzi_<?= $cod_mart ?>" id="pz_<?= $cod_mart ?>" type="text" value="<?= $qta_gia_ord ?>" maxlength="4" style="text-align:center;width:30px;height:16px;"/>
|
||||
</td>
|
||||
<td align="center">
|
||||
<input class="pezzi_omg" name="pezzi_omg_<?= $cod_mart ?>" id="pz_omg_<?= $cod_mart ?>" type="text" value="<?= $qta_gia_omg ?>" maxlength="4" style="text-align:center;width:30px;height:16px;"/>
|
||||
</td>
|
||||
<td align="center">
|
||||
<input class="pezzi_resi" name="pezzi_resi_<?= $cod_mart ?>" id="pz_resi_<?= $cod_mart ?>" type="text" value="<?= $qta_gia_reso ?>" maxlength="4" style="text-align:center;width:30px;height:16px;"/>
|
||||
<input type="hidden" name="descrizione_mart_<?= $cod_mart ?>" value="<?= $descrizione_mart ?>"/>
|
||||
<input type="hidden" name="riga_ord_<?= $cod_mart ?>" value="<?= $riga_ord ?>"/>
|
||||
<input type="hidden" id="qta_cnf_<?= $cod_mart ?>" class="qta_cnf" name="qta_cnf_<?= $cod_mart ?>" value="<?= $qta_conf ?>"/>
|
||||
@@ -326,7 +352,9 @@ if($numRows>0){
|
||||
<input type="checkbox" name="sost_reso_<?= $cod_mart ?>" value="sost_reso_<?= $cod_mart ?>" <?= ($flag_reso_riv == "O") ? "checked" : "" ?> style="border-style:solid; border:0px"/>
|
||||
</td>
|
||||
<!--td align="center"><img style="/*visibility: hidden;*/" title="<?= $giac_title ?>" alt="<?= $giac_title ?>" src="images/structure/tl_<?= $giac ?>.gif" /></td-->
|
||||
<td style="background-color:#fff;border:0px;width:24px;height: 24px;cursor:pointer;<?=($conf["hideConsPrec"])?";visibility:hidden":""?>"><img class="arr_cons" rot="N" datecons="<?echo ($viewDateconsRow)?"S":"N";?>" flagtd="<?=$flag_td?>" id="arr_<?=$cod_mart?>" src="images/structure/arr_down.gif" onclick="javascript:view_prec('<?=$cod_mart?>')"/></td>
|
||||
<td style="background-color:#fff;border:0px;width:24px;height: 24px;cursor:pointer;<?= ($conf["hideConsPrec"]) ? ";visibility:hidden" : "" ?>">
|
||||
<img class="arr_cons" rot="N" datecons="<? echo ($viewDateconsRow) ? "S" : "N"; ?>" flagtd="<?= $flag_td ?>" id="arr_<?= $cod_mart ?>" src="images/structure/arr_down.gif" onclick="javascript:view_prec('<?= $cod_mart ?>')"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="cons_prec_<?= $cod_mart ?>_none" class="cons_prec none">
|
||||
<td colspan="<?= ($flag_td != "S") ? "5" : "4" ?>"></td>
|
||||
@@ -336,16 +364,22 @@ if($numRows>0){
|
||||
</tr>
|
||||
<tr id="cons_prec_<?= $cod_mart ?>_waiter" class="cons_prec waiter">
|
||||
<td colspan="<?= ($flag_td != "S") ? "5" : "4" ?>"></td>
|
||||
<td colspan="<?=($viewDateconsRow)?"5":"4"?>">Attendere <img src="images/structure/255.gif" /></td>
|
||||
<td colspan="<?= ($viewDateconsRow) ? "5" : "4" ?>">Attendere
|
||||
<img src="images/structure/255.gif"/></td>
|
||||
<td style="border:0px"></td>
|
||||
<td style="border:0px!important;"></td>
|
||||
</tr><?
|
||||
for($j=1;$j<=4;$j++){?>
|
||||
for ($j = 1; $j <= 4; $j++) {
|
||||
?>
|
||||
<tr id="cons_prec_<?= $cod_mart ?>_<?= $j ?>" class="cons_prec" param_codmart="<?= $cod_mart ?>">
|
||||
<td class="a" colspan="<?= ($flag_td != "S") ? "5" : "4" ?>"></td><?
|
||||
if($viewDateconsRow){?>
|
||||
if ($viewDateconsRow) {
|
||||
?>
|
||||
<td class="cp_data">%data%</td><?
|
||||
}else{?><div class="cp_data" style="display:none">%data%</div><?}?>
|
||||
} else {
|
||||
?>
|
||||
<div class="cp_data" style="display:none">%data%</div><?
|
||||
} ?>
|
||||
<td class="cp_cartoni">%cartoni%</td>
|
||||
<td class="cp_qta">%pezziord%</td>
|
||||
<td class="cp_omaggi">%omaggi%</td>
|
||||
@@ -356,10 +390,14 @@ if($numRows>0){
|
||||
}
|
||||
}
|
||||
}
|
||||
if($i>0){?>
|
||||
if ($i > 0) {
|
||||
?>
|
||||
</table><br/><?
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
<div style="clear:left;text-align:right;display:block;margin-top:25px;">
|
||||
|
||||
@@ -30,7 +30,7 @@ if ($_GET["action"] == "modifica") { // DA STATO ARANCIO VA IN MODIFICA
|
||||
data_ord = '$data_ord' AND
|
||||
num_ord = {$num_ord} AND
|
||||
serie = '{$serie}'";
|
||||
$db2 = new cms;
|
||||
$db2 = new Cms;
|
||||
$db2->query($sql);
|
||||
if ($db2->next_record()) {
|
||||
$_SESSION["data_cons"] = strtotime($db2->f("data_cons"));
|
||||
@@ -112,7 +112,7 @@ elseif ($_GET["action"] == "elimina") {
|
||||
$db->query("UPDATE Wdtb_ordt SET flag_elaborato = 'I' WHERE gestione='V' AND num_ord = {$num_ord} AND data_ord = '" . strftime("%Y/%m/%d", $data_ord) . "' AND serie = '{$serie}'");
|
||||
|
||||
// query per estrazione data consegna più vicina
|
||||
$db2 = new cms;
|
||||
$db2 = new Cms;
|
||||
$sql = "SELECT MIN(data_cons) AS data_cons FROM wdtb_ordr WHERE gestione='V' AND data_ord = '" . strftime("%Y/%m/%d", $data_ord) . "' AND num_ord = {$num_ord} AND serie = '{$serie}'";
|
||||
$db2->query($sql);
|
||||
while ($db2->next_record()) {
|
||||
@@ -208,7 +208,7 @@ elseif ($_GET["action"] == "elimina") {
|
||||
}
|
||||
|
||||
if ($returnId == 1) {
|
||||
$db2 = new cms;
|
||||
$db2 = new Cms;
|
||||
$sql = "SELECT MIN(data_cons) AS data_cons FROM wdtb_ordr WHERE gestione='V' AND data_ord='" . $data_ord . "' AND num_ord = {$num_ord} AND serie = '{$serie}'";
|
||||
$db2->query($sql);
|
||||
if ($db2->next_record()) {
|
||||
|
||||
@@ -306,7 +306,7 @@ $bq = new big_query();
|
||||
}?>
|
||||
</tr>
|
||||
</thead><?
|
||||
$db2 = new cms;
|
||||
$db2 = new Cms;
|
||||
$i=0;
|
||||
while($db->next_record()){
|
||||
$cod_anag = $db->f("cod_anag");
|
||||
@@ -492,7 +492,7 @@ $bq = new big_query();
|
||||
doc.num_doc = dtb_doc_pdf.num_doc
|
||||
ORDER BY dtb_doc_pdf.versione DESC";
|
||||
|
||||
$db3 = new cms;
|
||||
$db3 = new Cms;
|
||||
$db3->query($sql);
|
||||
while($db3->next_record()){
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ require_once("config.php");
|
||||
require_once("Zend/Pdf.php");
|
||||
|
||||
try{
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
$doc_key = sanitize(B64JSON_parse($_GET["key"]));
|
||||
|
||||
$sql = "SELECT gtb_anag.cod_anag,
|
||||
|
||||
@@ -5,7 +5,7 @@ require_once "config.php";
|
||||
require_once "include_login.php";
|
||||
require_once "classes/Curl.php";
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
try {
|
||||
$doc_key = sanitize(B64JSON_parse($_GET["key"]));
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ if(!( in_array("area_report", $conf['user_menu']) ||
|
||||
$_INSTALLDIR = "integry_reporting";
|
||||
|
||||
$_export_extension = "ijr";
|
||||
$db = new cms;
|
||||
$db2 = new cms;
|
||||
$db = new Cms;
|
||||
$db2 = new Cms;
|
||||
|
||||
include $_INSTALLDIR."/export_files.class.php";
|
||||
include $_INSTALLDIR."/reporting.class.php";
|
||||
|
||||
@@ -273,7 +273,7 @@ require_once "top_menu.php";
|
||||
$listino = $db->f('listino');
|
||||
|
||||
$tot_basi = $tot_carrelli = 0;
|
||||
$db2 = new cms;
|
||||
$db2 = new Cms;
|
||||
$sql = "SELECT 0 AS tot_basi,
|
||||
0 AS tot_carrelli
|
||||
FROM wdtb_ordr,
|
||||
|
||||
@@ -21,7 +21,7 @@ require_once("language/lang_{$lang}/_{$lang}_.php");
|
||||
</script>
|
||||
<?
|
||||
|
||||
$db = new cms;
|
||||
$db = new Cms;
|
||||
if($db->getAzienda()=="cliente" && $_SERVER['REMOTE_ADDR']!="151.58.240.141"){?>
|
||||
<script type="text/javascript">
|
||||
var sc_project=<?=$db->sc_project?>;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
}
|
||||
</style><?
|
||||
}
|
||||
$config = new cms;
|
||||
$config = new Cms;
|
||||
if($config->getAzienda()=="cliente" && !in_array($_SERVER['REMOTE_ADDR'], array("95.226.34.50", "195.81.66.239"))){?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
Reference in New Issue
Block a user