sistemata sezione di VG alimenti per ordine rapido
This commit is contained in:
@@ -27,7 +27,8 @@ if(isset($_POST["noteOrd"])){
|
||||
$i = 0;
|
||||
foreach($_POST as $key => $value){
|
||||
if($value!="" && array_search($key, $array_valori)===FALSE){
|
||||
$id = end(explode("_", $key));
|
||||
$exploded = explode("_", $key);
|
||||
$id = end($exploded);
|
||||
$nome = str_replace("_".$id, "", $key);
|
||||
|
||||
if($nome == "cod_mart"){
|
||||
@@ -56,36 +57,66 @@ foreach($_POST as $key => $value){
|
||||
}
|
||||
|
||||
try{
|
||||
/****************** TO BE UPDATED ***********************/
|
||||
$cod_anag = $_SESSION["cod_anag"];
|
||||
$cod_vdes = $_SESSION["cod_vdes"];
|
||||
$data_ord = date("d/m/Y");
|
||||
$serie_ord = $num_ord_prov = "";
|
||||
|
||||
$wsdl_url = "http://".$db->getEndpoint()."/axis2/services/".$db->getWsdl()."?wsdl";
|
||||
$client = new SOAPClient($wsdl_url);
|
||||
|
||||
$body = array(
|
||||
"cod_anag" => $_SESSION["cod_anag"],
|
||||
"cod_vdes" => $_SESSION["cod_vdes"],
|
||||
"cod_mart" => $codice_articolo,
|
||||
"data_ord" => new DateTime(),
|
||||
"serie" => $serie_ord,
|
||||
/*** cod_vlis skipped **/
|
||||
"num_ord_prov" => $num_ord_prov);
|
||||
|
||||
$params = array(
|
||||
"profileDb" => $db->getDbname(),
|
||||
"cod_anag" => $cod_anag,
|
||||
"cod_vdes" => $cod_vdes,
|
||||
"cod_mart" => $codice_articolo,
|
||||
"data_ord" => $data_ord,
|
||||
"serie" => $serie_ord,
|
||||
"num_ord_prov" => $num_ord_prov);
|
||||
$result = $client->getCustomerItemInfo($params);
|
||||
|
||||
$err = $result->return->returnId;
|
||||
"username" => $db->getUtenteWEB(),
|
||||
"password" => $db->getPasswordWEB(),
|
||||
"body" => $body);
|
||||
|
||||
if($err==1){
|
||||
$xml = $result->return->fileXML;
|
||||
} else{
|
||||
echo $result->return->errorText;
|
||||
$articleInfo = new RestCall($db->getEndpoint());
|
||||
$articleInfo->getCustomerItemInfo($params);
|
||||
|
||||
$returnId = $articleInfo->return->esito;
|
||||
$json_data = new stdClass();
|
||||
if ($returnId == 1) {
|
||||
|
||||
$json_data = json_decode($articleInfo->return->dto);
|
||||
$i = 0;
|
||||
$prz_vend = (string)$json_data->prz_vend[0];
|
||||
if (isset($json_data->consegne)) {
|
||||
$json_data->n_tot = count($json_data->consegne);
|
||||
$json_data->cleanedData = array();
|
||||
foreach ($json_data->consegne as $consegna) {
|
||||
$i++;
|
||||
|
||||
$consegna->data_cons[0] = strtotime($consegna->data_cons[0]);
|
||||
$dataCons = $consegna->data_cons[0];
|
||||
$json_data->cleanedData[]=
|
||||
array(
|
||||
"data_cons" => $dataCons,
|
||||
"prz_vend" => number_format($prz_vend, 2),
|
||||
"qta_vend" => (string)$consegna->qta_vend[0],
|
||||
"qta_omg" => (string)$consegna->qta_omg[0],
|
||||
"qta_resi" => (string)$consegna->qta_resi[0]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$err_text = json_decode($articleInfo->return->errorText);
|
||||
$err_text = str_replace("\"", "", $err_text);
|
||||
$err_text = str_replace("'", "", $err_text);
|
||||
$err_text = str_replace("{", "", $err_text);
|
||||
$err_text = str_replace("}", "", $err_text);
|
||||
$err_text = str_replace("[", "", $err_text);
|
||||
$err_text = str_replace("]", "", $err_text);
|
||||
$json_data->errore = $err_text;
|
||||
echo $json_data->errore;
|
||||
}
|
||||
} catch(SoapFault $e){
|
||||
} catch(Exception $e){
|
||||
print_r($e);
|
||||
}
|
||||
|
||||
$doc = new DOMDocument();
|
||||
/*$doc = new DOMDocument();
|
||||
$doc->loadXML($xml);
|
||||
$root = $doc->documentElement;
|
||||
|
||||
@@ -104,7 +135,7 @@ foreach($_POST as $key => $value){
|
||||
$cod_promo_disponibili[] = $promo;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
$cod_promo = (!empty($cod_promo_disponibili)) ? "'".$cod_promo_disponibili[0]."'" : "NULL";
|
||||
|
||||
// manipolazione data consegna per inserimento in tabella DB
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once('../config.php');
|
||||
require_once('../include_login.php');
|
||||
chdir(dirname(getcwd()));
|
||||
require_once('./config.php');
|
||||
require_once('./include_login.php');
|
||||
|
||||
$car_min = 2; // caratteri minimi per avviare la ricerca
|
||||
$ris_max = 5; // numero risultati massimi da visualizzare
|
||||
|
||||
$xml = simplexml_load_string($_SESSION['xml_1']);
|
||||
$cod_mgrp = $_SESSION['cod_mgrp'];
|
||||
|
||||
//Acquisisce il paramentro dall'url
|
||||
$q = strtoupper($_GET["q"]);
|
||||
@@ -15,17 +16,17 @@ $hint="";
|
||||
$cont_vis = 0;
|
||||
|
||||
if(strlen($q)>=$car_min){
|
||||
foreach($xml as $wewe1){
|
||||
foreach($wewe1->cod_msgr as $wewe3){
|
||||
foreach($wewe3->cod_msfa as $wewe4){
|
||||
foreach($wewe4->cod_mart as $wewe5){
|
||||
$cod_mart = (string) $wewe5->attributes()->codice;
|
||||
$descrizione = (string) $wewe5->descrizione;
|
||||
$sconto5 = (double) $wewe5->sconto5;
|
||||
$sconto6 = (double) $wewe5->sconto6;
|
||||
$sconto7 = (double) $wewe5->sconto7;
|
||||
$sconto8 = (double) $wewe5->sconto8;
|
||||
$qtaCnf = (double) $wewe5->qta_cnf;
|
||||
foreach($cod_mgrp as $divisione){
|
||||
foreach($divisione->famiglia as $famiglia){
|
||||
foreach($famiglia->sottofamiglia as $sottofamiglia){
|
||||
foreach($sottofamiglia->articolo as $articolo){
|
||||
$cod_mart = (string) $articolo->codice_articolo_mart[0];
|
||||
$descrizione = (string) $articolo->descrizione[0];
|
||||
$sconto5 = (double) $articolo->sconto5[0];
|
||||
$sconto6 = (double) $articolo->sconto6[0];
|
||||
$sconto7 = (double) $articolo->sconto7[0];
|
||||
$sconto8 = (double) $articolo->sconto8[0];
|
||||
$qtaCnf = (double) $articolo->qta_cnf[0];
|
||||
//$descrizione = str_ireplace($q,"<strong>".$q."</strong>",$descrizione);
|
||||
if($cont_vis < $ris_max){
|
||||
if($mode=="search"){
|
||||
|
||||
16
carrello.php
16
carrello.php
@@ -83,14 +83,14 @@ if (isset($_SESSION["status_storico"]) || !isset($_SESSION["xml_1"])) {
|
||||
$client = new RestCall($db->getEndpoint());
|
||||
|
||||
$body = array(
|
||||
"data_prezzo" => $data,
|
||||
"cod_anag" => $cod_anag,
|
||||
"cod_vdes" => $cod_vdes,
|
||||
"cod_vlis" => "",
|
||||
"cod_mgrp" => $cod_mgrp,
|
||||
"cod_msgr" => $cod_msgr,
|
||||
"cod_msfa" => $cod_msfa,
|
||||
"cod_mart" => $cod_mart
|
||||
"dataPrezzo" => $data,
|
||||
"codAnag" => $cod_anag,
|
||||
"codVdes" => $cod_vdes,
|
||||
"codVlis" => "",
|
||||
"codMgrp" => $cod_mgrp,
|
||||
"codMsgr" => $cod_msgr,
|
||||
"codMsfa" => $cod_msfa,
|
||||
"codMart" => $cod_mart
|
||||
);
|
||||
|
||||
$params = array(
|
||||
|
||||
@@ -74,7 +74,7 @@ try {
|
||||
"body" => $body);
|
||||
$checkOrder = new RestCall($db->getEndpoint());
|
||||
$checkOrder->import($params, 'checkWdtbOrdT');
|
||||
$apiResponse = $checkOrder->return[0];
|
||||
$apiResponse = $checkOrder->return;
|
||||
}
|
||||
|
||||
if ($apiResponse->esito == 1) {
|
||||
|
||||
@@ -203,7 +203,7 @@ class Curl
|
||||
|
||||
public function execute($asArray = false)
|
||||
{
|
||||
$decode = null;
|
||||
$decode = false;
|
||||
if ($this->stringResponse) {
|
||||
$this->result = $this->iWantStringResponse();
|
||||
} else {
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
if(!isset($_SESSION["username"]) && isset($_SESSION["user"])){
|
||||
$_SESSION["username"] = $_SESSION["user"];
|
||||
unset($_SESSION["user"]);
|
||||
}*/
|
||||
|
||||
//ini_set("soap.wsdl_cache_enabled",0);
|
||||
//ini_set("soap.wsdl_cache_ttl",0);
|
||||
}
|
||||
*/
|
||||
|
||||
define("_agenti", 5);
|
||||
define("_ispettori", 6);
|
||||
|
||||
16
index1.php
16
index1.php
@@ -181,14 +181,14 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
|
||||
/****************************** to be updated *************************************/
|
||||
$client = new RestCall($db->getEndpoint());
|
||||
$body =array(
|
||||
"data_prezzo" => $data,
|
||||
"cod_anag" => $cod_anag,
|
||||
"cod_vdes" => $cod_vdes,
|
||||
"cod_mgrp" => $cod_mgrp,
|
||||
"cod_vlis" => $cod_vlis,
|
||||
"cod_msgr" => $cod_msgr,
|
||||
"cod_msfa" => $cod_msfa,
|
||||
"cod_mart" => $cod_mart);
|
||||
"dataPrezzo" => $data,
|
||||
"codAnag" => $cod_anag,
|
||||
"codVdes" => $cod_vdes,
|
||||
"codMgrp" => $cod_mgrp,
|
||||
"codVlis" => $cod_vlis,
|
||||
"codMsgr" => $cod_msgr,
|
||||
"codMsfa" => $cod_msfa,
|
||||
"codMart" => $cod_mart);
|
||||
|
||||
$params = array(
|
||||
"profileDb" => $profileDB,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php // REPORTING
|
||||
ini_set('default_socket_timeout', 240);
|
||||
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);*/
|
||||
|
||||
$_reportingFunc->deleteCache(300, "jrxml"); // ELIMINA DALLA CACHE FILE JRXML PIU VECCHI DI 300 SECONDI
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ $('.submit').on('click', function(e){
|
||||
check_obbl = false;
|
||||
}
|
||||
});
|
||||
|
||||
/************** here a GET call is performed ***********************************/
|
||||
if(check_obbl){
|
||||
var token = "<?=$_SESSION['username']?>_"+startTime.getTime() + Math.floor(Math.random());
|
||||
$('#frame_report').attr("src", _PHP_SELF + "?execute_report");
|
||||
|
||||
@@ -66,7 +66,7 @@ if (isset($_POST["exec_big_select_sql"])) {
|
||||
$value = htmlentities($db->f($key));
|
||||
$ret[$key] = $value;
|
||||
}
|
||||
$values_array[] = $ret;
|
||||
array_push($values_array,$ret);
|
||||
}
|
||||
}
|
||||
for ($i = 0; $i < $db->num_fields(); $i++) {
|
||||
|
||||
@@ -1,44 +1,11 @@
|
||||
<?
|
||||
$flag_td = getFlagTd($_SESSION['cod_anag']);
|
||||
/*$doc = new DOMDocument();
|
||||
$doc->loadXML($_SESSION['xml_1']);
|
||||
$root = $doc->documentElement;*/
|
||||
|
||||
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 = 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?>
|
||||
/*********************** CEDIAL MANAGEMENT DELETED ********************/
|
||||
// VG?>
|
||||
<div style="display:block;"><?= _TEXT_118 ?></div><?
|
||||
$i = 0;
|
||||
/*$array_cod_mgrp = $root->getElementsByTagName("cod_mgrp");*/
|
||||
$i = 0;
|
||||
|
||||
if (isset($_SESSION['cod_mgrp']) && is_array($_SESSION['cod_mgrp'])) {
|
||||
foreach ($_SESSION['cod_mgrp'] as $divisione) {
|
||||
|
||||
$cod_mgrp = $divisione->codice_divisione_mgrp[0];
|
||||
@@ -69,5 +36,9 @@ if (isset($conf['mod_index_loghi']) && !$conf['mod_index_loghi']) {
|
||||
}
|
||||
if ($i != 0)
|
||||
echo "</div>";
|
||||
|
||||
}else{
|
||||
echo $client->return->errorMessage;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,13 +3,15 @@ session_start();
|
||||
require_once "config.php";
|
||||
require_once "include_login.php";
|
||||
|
||||
unset_order_in_session();
|
||||
if (isset($_SESSION["data_ord"])) {
|
||||
unset_order_in_session();
|
||||
}
|
||||
|
||||
if(!( in_array("area_report", $conf['user_menu']) ||
|
||||
in_array("area_report", $conf['user_menu'][$_SESSION["gruppo"]])
|
||||
)
|
||||
){
|
||||
header("Location: ".$conf["homepage_user"]);
|
||||
if (!(in_array("area_report", $conf['user_menu']) ||
|
||||
in_array("area_report", $conf['user_menu'][$_SESSION["gruppo"]])
|
||||
)
|
||||
) {
|
||||
header("Location: " . $conf["homepage_user"]);
|
||||
}
|
||||
|
||||
$_INSTALLDIR = "integry_reporting";
|
||||
@@ -18,36 +20,36 @@ $_export_extension = "ijr";
|
||||
$db = new Cms;
|
||||
$db2 = new Cms;
|
||||
|
||||
include $_INSTALLDIR."/export_files.class.php";
|
||||
include $_INSTALLDIR."/reporting.class.php";
|
||||
include $_INSTALLDIR . "/export_files.class.php";
|
||||
include $_INSTALLDIR . "/reporting.class.php";
|
||||
|
||||
$_reporting = new reporting;
|
||||
$_reportingFunc = new reporting_func;
|
||||
$_exportFiles = new exportFileToServer;
|
||||
|
||||
include $_INSTALLDIR."/rep_variables.php";
|
||||
include $_INSTALLDIR . "/rep_variables.php";
|
||||
|
||||
if(isset($_GET["jrep_manag"])){
|
||||
if(!isset($_SESSION["gotoedit"])){
|
||||
if(!(isset($_POST["pwhidden"]) && $_POST["pwhidden"]==pw_edit_report)){
|
||||
header("location: ".$_SERVER["PHP_SELF"]);
|
||||
} else{
|
||||
if (isset($_GET["jrep_manag"])) {
|
||||
if (!isset($_SESSION["gotoedit"])) {
|
||||
if (!(isset($_POST["pwhidden"]) && $_POST["pwhidden"] == pw_edit_report)) {
|
||||
header("location: " . $_SERVER["PHP_SELF"]);
|
||||
} else {
|
||||
$_SESSION["gotoedit"] = time();
|
||||
}
|
||||
}
|
||||
|
||||
include $_INSTALLDIR.'/integryJrep.php';
|
||||
} else if(isset($_GET["execute_report"])){
|
||||
include $_INSTALLDIR."/execute_report.php";
|
||||
|
||||
include $_INSTALLDIR . '/integryJrep.php';
|
||||
} else if (isset($_GET["execute_report"])) {
|
||||
include $_INSTALLDIR . "/execute_report.php";
|
||||
exit;
|
||||
} else if(isset($_GET["preview_report_filters"])){
|
||||
include $_INSTALLDIR."/preview_report_filters.php";
|
||||
} else if (isset($_GET["preview_report_filters"])) {
|
||||
include $_INSTALLDIR . "/preview_report_filters.php";
|
||||
exit;
|
||||
} else if(isset($_GET["getFileByCallId"])){
|
||||
include $_INSTALLDIR."/execute_report.php";
|
||||
} else if (isset($_GET["getFileByCallId"])) {
|
||||
include $_INSTALLDIR . "/execute_report.php";
|
||||
exit;
|
||||
} else{
|
||||
include $_INSTALLDIR."/reportistica_actions.php";
|
||||
} else {
|
||||
include $_INSTALLDIR . "/reportistica_actions.php";
|
||||
}
|
||||
|
||||
require_once "top_html.php";
|
||||
@@ -55,29 +57,29 @@ require_once "top_menu.php";
|
||||
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?=$_INSTALLDIR?>/reports_manag.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="<?=$_INSTALLDIR?>/reportistica.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="<?= $_INSTALLDIR ?>/reports_manag.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="<?= $_INSTALLDIR ?>/reportistica.css" type="text/css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _PHP_SELF = "<?=$_SERVER["PHP_SELF"]?>";
|
||||
var _INSTALLDIR = "<?=$_INSTALLDIR?>";
|
||||
var _USER = {
|
||||
username: "<?=$_SESSION["username"]?>"
|
||||
};
|
||||
<? include $_INSTALLDIR."/integryJrep.js.php"; ?>
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var _PHP_SELF = "<?=$_SERVER["PHP_SELF"]?>";
|
||||
var _INSTALLDIR = "<?=$_INSTALLDIR?>";
|
||||
var _USER = {
|
||||
username: "<?=$_SESSION["username"]?>"
|
||||
};
|
||||
<? include $_INSTALLDIR . "/integryJrep.js.php"; ?>
|
||||
</script>
|
||||
|
||||
<div class="molliche">Area report</div>
|
||||
<div id="contenuto">
|
||||
<div id="corpo-storico" style="width:960px;position:relative;"><?
|
||||
if(isset($_GET["jrep_manag"])){
|
||||
include $_INSTALLDIR."/wrap-jrep_manag.php";
|
||||
} else{
|
||||
include $_INSTALLDIR."/view_repfilters.php";
|
||||
include $_INSTALLDIR."/view_repcont.php";
|
||||
}
|
||||
// report_autocheck();
|
||||
?>
|
||||
</div>
|
||||
</div><?
|
||||
<div class="molliche">Area report</div>
|
||||
<div id="contenuto">
|
||||
<div id="corpo-storico" style="width:960px;position:relative;"><?
|
||||
if (isset($_GET["jrep_manag"])) {
|
||||
include $_INSTALLDIR . "/wrap-jrep_manag.php";
|
||||
} else {
|
||||
include $_INSTALLDIR . "/view_repfilters.php";
|
||||
include $_INSTALLDIR . "/view_repcont.php";
|
||||
}
|
||||
// report_autocheck();
|
||||
?>
|
||||
</div>
|
||||
</div><?
|
||||
require_once("footer.php");
|
||||
Reference in New Issue
Block a user