Fix: class "soapclient_nusoap" rename "nusoap_client" in version 0.7.3
This commit is contained in:
parent
da0a008cf8
commit
3361b4d594
@ -43,7 +43,7 @@ require_once("../includes/configure.php");
|
|||||||
$parameters = array("custid"=>"0");
|
$parameters = array("custid"=>"0");
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
$client = new soapclient_nusoap(OSCWS_DIR."ws_customers.php");
|
$client = new nusoap_client(OSCWS_DIR."ws_customers.php");
|
||||||
|
|
||||||
$result = $client->call("get_Client",$parameters );
|
$result = $client->call("get_Client",$parameters );
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ elseif (!($err = $client->getError()) )
|
|||||||
print "</table></p>";
|
print "</table></p>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dol_print_error('',"Aucun client trouvé");
|
dol_print_error('',"Aucun client trouv<EFBFBD>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -63,14 +63,14 @@ class Osc_customer
|
|||||||
|
|
||||||
$this->osc_custid = $id ;
|
$this->osc_custid = $id ;
|
||||||
|
|
||||||
/* les initialisations nécessaires */
|
/* les initialisations n<EFBFBD>cessaires */
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Charge le client OsC en mémoire
|
* \brief Charge le client OsC en m<EFBFBD>moire
|
||||||
* \param id Id du client dans OsC
|
* \param id Id du client dans OsC
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
@ -98,7 +98,7 @@ class Osc_customer
|
|||||||
$parameters = array("custid"=>$id);
|
$parameters = array("custid"=>$id);
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
$client = new soapclient_nusoap(OSCWS_DIR."/ws_customers.php");
|
$client = new nusoap_client(OSCWS_DIR."/ws_customers.php");
|
||||||
|
|
||||||
// Call the WebSeclient->fault)rvice and store its result in $obj
|
// Call the WebSeclient->fault)rvice and store its result in $obj
|
||||||
$obj = $client->call("get_Client",$parameters );
|
$obj = $client->call("get_Client",$parameters );
|
||||||
@ -131,9 +131,9 @@ class Osc_customer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Mise à jour de la table de transition
|
* \brief Mise <EFBFBD> jour de la table de transition
|
||||||
* \param oscid Id du client dans OsC
|
* \param oscid Id du client dans OsC
|
||||||
* \param socid champ société.rowid
|
* \param socid champ soci<EFBFBD>t<EFBFBD>.rowid
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
function transcode($oscid, $socid)
|
function transcode($oscid, $socid)
|
||||||
|
|||||||
@ -44,7 +44,7 @@ require_once("../includes/configure.php");
|
|||||||
$parameters = array("orderid"=>"0");
|
$parameters = array("orderid"=>"0");
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
$client = new soapclient_nusoap(OSCWS_DIR."ws_orders.php");
|
$client = new nusoap_client(OSCWS_DIR."ws_orders.php");
|
||||||
|
|
||||||
$result = $client->call("get_Order",$parameters );
|
$result = $client->call("get_Order",$parameters );
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ elseif (!($err = $client->getError()) )
|
|||||||
print "</table></p>";
|
print "</table></p>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dol_print_error('',"Aucune commande trouvée");
|
dol_print_error('',"Aucune commande trouv<EFBFBD>e");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -64,12 +64,12 @@ class Osc_order
|
|||||||
|
|
||||||
$this->osc_orderid = $id ;
|
$this->osc_orderid = $id ;
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
/* les initialisations nécessaires */
|
/* les initialisations n<EFBFBD>cessaires */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Charge la commande OsC en mémoire
|
* \brief Charge la commande OsC en m<EFBFBD>moire
|
||||||
* \param id Id de la commande dans OsC
|
* \param id Id de la commande dans OsC
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
@ -97,7 +97,7 @@ class Osc_order
|
|||||||
$parameters = array("orderid"=>$id);
|
$parameters = array("orderid"=>$id);
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
$client = new soapclient_nusoap(OSCWS_DIR."/ws_orders.php");
|
$client = new nusoap_client(OSCWS_DIR."/ws_orders.php");
|
||||||
|
|
||||||
// Call the WebSeclient->fault)rvice and store its result in $obj
|
// Call the WebSeclient->fault)rvice and store its result in $obj
|
||||||
$obj = $client->call("get_Order",$parameters );
|
$obj = $client->call("get_Order",$parameters );
|
||||||
@ -157,8 +157,8 @@ class Osc_order
|
|||||||
$commande->date = $this->osc_orderdate;
|
$commande->date = $this->osc_orderdate;
|
||||||
$commande->date_commande = $this->osc_orderdate;
|
$commande->date_commande = $this->osc_orderdate;
|
||||||
/* on force */
|
/* on force */
|
||||||
$commande->statut = 0; //à voir
|
$commande->statut = 0; //<EFBFBD> voir
|
||||||
$commande->source = 0; // à vérifier
|
$commande->source = 0; // <EFBFBD> v<>rifier
|
||||||
|
|
||||||
//les lignes
|
//les lignes
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ class Osc_order
|
|||||||
$commande->lines[$i]->qty = $this->osc_lines[$i][quantity];
|
$commande->lines[$i]->qty = $this->osc_lines[$i][quantity];
|
||||||
$commande->lines[$i]->tva_tx = $this->osc_lines[$i][products_tax];
|
$commande->lines[$i]->tva_tx = $this->osc_lines[$i][products_tax];
|
||||||
$commande->lines[$i]->fk_product = $oscproduct->get_productid($this->osc_lines[$i][products_id]);
|
$commande->lines[$i]->fk_product = $oscproduct->get_productid($this->osc_lines[$i][products_id]);
|
||||||
$commande->lines[$i]->remise_percent = 0; // à calculer avec le finalprice
|
$commande->lines[$i]->remise_percent = 0; // <EFBFBD> calculer avec le finalprice
|
||||||
}
|
}
|
||||||
// les frais de port
|
// les frais de port
|
||||||
$fp = sizeof($this->osc_lines);
|
$fp = sizeof($this->osc_lines);
|
||||||
@ -190,9 +190,9 @@ class Osc_order
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Mise à jour de la table de transition
|
* \brief Mise <EFBFBD> jour de la table de transition
|
||||||
* \param oscid Id du produit dans OsC
|
* \param oscid Id du produit dans OsC
|
||||||
* \param prodid champ référence
|
* \param prodid champ r<EFBFBD>f<EFBFBD>rence
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
function transcode($osc_orderid, $doli_orderid)
|
function transcode($osc_orderid, $doli_orderid)
|
||||||
|
|||||||
@ -56,7 +56,7 @@ require_once("./includes/configure.php");
|
|||||||
$parameters = array();
|
$parameters = array();
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
$client = new soapclient_nusoap(OSCWS_DIR."ws_orders.php");
|
$client = new nusoap_client(OSCWS_DIR."ws_orders.php");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
/* Chiffre d'affaire
|
/* Chiffre d'affaire
|
||||||
@ -109,7 +109,7 @@ print '</td><td valign="top" width="60%" class="notopnoleftnoright">';
|
|||||||
print_titre($langs->trans("Orders"));
|
print_titre($langs->trans("Orders"));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 5 dernières commandes reçues
|
* 5 derni<EFBFBD>res commandes re<EFBFBD>ues
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -147,7 +147,7 @@ else {
|
|||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 5 dernières commandes en attente
|
* 5 derni<EFBFBD>res commandes en attente
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -184,7 +184,7 @@ else {
|
|||||||
|
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
/*
|
/*
|
||||||
* Commandes à traiter
|
* Commandes <EFBFBD> traiter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -223,7 +223,7 @@ print "</table><br>";
|
|||||||
print '</td></tr><tr>';
|
print '</td></tr><tr>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Derniers clients qui ont commandé
|
* Derniers clients qui ont command<EFBFBD>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|||||||
@ -27,7 +27,7 @@ $html = new Form($db);
|
|||||||
|
|
||||||
if ($_GET["action"] == 'liste' )
|
if ($_GET["action"] == 'liste' )
|
||||||
{
|
{
|
||||||
// affichage des produits en vente à partir de la tavle de transco
|
// affichage des produits en vente a partir de la tavle de transco
|
||||||
$sql = "SELECT o.doli_prodidp as idp, o.osc_prodid as oscid, o.osc_lastmodif as date ";
|
$sql = "SELECT o.doli_prodidp as idp, o.osc_prodid as oscid, o.osc_lastmodif as date ";
|
||||||
$sql .= "FROM ".MAIN_DB_PREFIX."osc_product as o";
|
$sql .= "FROM ".MAIN_DB_PREFIX."osc_product as o";
|
||||||
|
|
||||||
@ -69,9 +69,9 @@ if ($_GET["action"] == 'vendre' )
|
|||||||
$prod['desc'] = $product->description;
|
$prod['desc'] = $product->description;
|
||||||
$prod['quant'] = $_POST["qty"];
|
$prod['quant'] = $_POST["qty"];
|
||||||
$prod['prix'] = convert_backprice($product->price);
|
$prod['prix'] = convert_backprice($product->price);
|
||||||
// à gèrer $product->tx_tva
|
// a gerer $product->tx_tva
|
||||||
$prod['poids'] = $product->weight;
|
$prod['poids'] = $product->weight;
|
||||||
// gèrer $product->weight_units
|
// gerer $product->weight_units
|
||||||
$prod['dispo'] = '';
|
$prod['dispo'] = '';
|
||||||
$prod['status'] = '1';
|
$prod['status'] = '1';
|
||||||
$prod['fourn'] = '';
|
$prod['fourn'] = '';
|
||||||
@ -98,12 +98,12 @@ if ($_GET["action"] == 'vendre' )
|
|||||||
//WebService Client.
|
//WebService Client.
|
||||||
require_once(NUSOAP_PATH."/nusoap.php");
|
require_once(NUSOAP_PATH."/nusoap.php");
|
||||||
|
|
||||||
// Création
|
// Creation
|
||||||
// Set the parameters to send to the WebService
|
// Set the parameters to send to the WebService
|
||||||
$parameters = array("prod"=>$prod);
|
$parameters = array("prod"=>$prod);
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
$client = new soapclient_nusoap(OSCWS_DIR."ws_articles.php");
|
$client = new nusoap_client(OSCWS_DIR."ws_articles.php");
|
||||||
|
|
||||||
// Call the WebService and store its result in $result.
|
// Call the WebService and store its result in $result.
|
||||||
$result = $client->call("create_article",$parameters );
|
$result = $client->call("create_article",$parameters );
|
||||||
@ -116,7 +116,7 @@ if ($_GET["action"] == 'vendre' )
|
|||||||
{
|
{
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
// création de l'enregistrement dans osc_products
|
// creation de l'enregistrement dans osc_products
|
||||||
$oscprod->transcode($result,$_POST["idprod"]);
|
$oscprod->transcode($result,$_POST["idprod"]);
|
||||||
print "<p>le produit ".$product->ref." ".$product->libelle.' est en vente en ligne <a href="'.OSC_URL.'product_info.php?products_id='.$result.'">consulter</a></p>';
|
print "<p>le produit ".$product->ref." ".$product->libelle.' est en vente en ligne <a href="'.OSC_URL.'product_info.php?products_id='.$result.'">consulter</a></p>';
|
||||||
print "\n";
|
print "\n";
|
||||||
@ -127,7 +127,7 @@ if ($_GET["action"] == 'vendre' )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<p>Le produit ".$_POST["idprod"].' est déjà en vente en ligne : <a href="'.OSC_URL.'product_info.php?products_id='.$oscid.'">consulter</a></p>';
|
print "<p>Le produit ".$_POST["idprod"].' est deja en vente en ligne : <a href="'.OSC_URL.'product_info.php?products_id='.$oscid.'">consulter</a></p>';
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -240,7 +240,7 @@ else
|
|||||||
$sql .= "LEFT OUTER JOIN ".MAIN_DB_PREFIX."osc_categories as oc ON oc.dolicatid = c.rowid ";
|
$sql .= "LEFT OUTER JOIN ".MAIN_DB_PREFIX."osc_categories as oc ON oc.dolicatid = c.rowid ";
|
||||||
$sql .= "WHERE c.visible = 1 AND c.type = 0";
|
$sql .= "WHERE c.visible = 1 AND c.type = 0";
|
||||||
|
|
||||||
print_barre_liste("Correspondance des catégories", $page, "categories.php");
|
print_barre_liste("Correspondance des cat<EFBFBD>gories", $page, "categories.php");
|
||||||
|
|
||||||
dol_syslog("Osc_Categorie.class::get_Osccat sql=".$sql);
|
dol_syslog("Osc_Categorie.class::get_Osccat sql=".$sql);
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
@ -291,12 +291,12 @@ else $catid= 0;
|
|||||||
$parameters = array("catid"=>$catid);
|
$parameters = array("catid"=>$catid);
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
$client = new soapclient_nusoap(OSCWS_DIR."ws_articles.php");
|
$client = new nusoap_client(OSCWS_DIR."ws_articles.php");
|
||||||
|
|
||||||
$result = $client->call("get_categorylist",$parameters );
|
$result = $client->call("get_categorylist",$parameters );
|
||||||
|
|
||||||
if ($client->fault) {
|
if ($client->fault) {
|
||||||
if ($client->faultcode == 'Server') print '<p>Il n\'y a pas de catégorie fille pour la catégorie '.$catid.'</p>';
|
if ($client->faultcode == 'Server') print '<p>Il n\'y a pas de cat<EFBFBD>gorie fille pour la cat<61>gorie '.$catid.'</p>';
|
||||||
else dol_print_error('',"erreur de connexion ".$client->getError());
|
else dol_print_error('',"erreur de connexion ".$client->getError());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ require_once("../includes/configure.php");
|
|||||||
$parameters = array();
|
$parameters = array();
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
$client = new soapclient_nusoap(OSCWS_DIR."ws_articles.php");
|
$client = new nusoap_client(OSCWS_DIR."ws_articles.php");
|
||||||
|
|
||||||
$result = $client->call("get_listearticles",$parameters );
|
$result = $client->call("get_listearticles",$parameters );
|
||||||
if ($client->fault) {
|
if ($client->fault) {
|
||||||
|
|||||||
@ -60,14 +60,14 @@ class Osc_product
|
|||||||
|
|
||||||
$this->osc_id = $id ;
|
$this->osc_id = $id ;
|
||||||
|
|
||||||
/* les initialisations nécessaires */
|
/* les initialisations n<EFBFBD>cessaires */
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Charge le produit OsC en mémoire
|
* \brief Charge le produit OsC en m<EFBFBD>moire
|
||||||
* \param id Id du produit dans OsC
|
* \param id Id du produit dans OsC
|
||||||
* \param ref Ref du produit dans OsC (doit être unique dans OsC)
|
* \param ref Ref du produit dans OsC (doit <EFBFBD>tre unique dans OsC)
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
function fetch($id='',$ref='')
|
function fetch($id='',$ref='')
|
||||||
@ -94,7 +94,7 @@ class Osc_product
|
|||||||
$parameters = array("id"=>$id,"ref"=>$ref);
|
$parameters = array("id"=>$id,"ref"=>$ref);
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
$client = new soapclient_nusoap(OSCWS_DIR."/ws_articles.php");
|
$client = new nusoap_client(OSCWS_DIR."/ws_articles.php");
|
||||||
|
|
||||||
// Call the WebSeclient->fault)rvice and store its result in $obj
|
// Call the WebSeclient->fault)rvice and store its result in $obj
|
||||||
$obj = $client->call("get_article",$parameters );
|
$obj = $client->call("get_article",$parameters );
|
||||||
@ -150,9 +150,9 @@ class Osc_product
|
|||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* \brief Mise à jour de la table de transition
|
* \brief Mise <EFBFBD> jour de la table de transition
|
||||||
* \param oscid Id du produit dans OsC
|
* \param oscid Id du produit dans OsC
|
||||||
* \param prodid champ référence
|
* \param prodid champ r<EFBFBD>f<EFBFBD>rence
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
function transcode($oscid, $prodid)
|
function transcode($oscid, $prodid)
|
||||||
@ -225,12 +225,12 @@ class Osc_product
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief création d'un article dans base OSC
|
* \brief cr<EFBFBD>ation d'un article dans base OSC
|
||||||
* \param $user utilisateur
|
* \param $user utilisateur
|
||||||
*/
|
*/
|
||||||
function create($user)
|
function create($user)
|
||||||
{
|
{
|
||||||
/* non implémentée */
|
/* non impl<EFBFBD>ment<EFBFBD>e */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -239,7 +239,7 @@ class Osc_product
|
|||||||
*/
|
*/
|
||||||
function update($id, $user)
|
function update($id, $user)
|
||||||
{
|
{
|
||||||
/* non implémentée */
|
/* non impl<EFBFBD>ment<EFBFBD>e */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -248,7 +248,7 @@ class Osc_product
|
|||||||
*/
|
*/
|
||||||
function delete($id)
|
function delete($id)
|
||||||
{
|
{
|
||||||
/* non implémentée */
|
/* non impl<EFBFBD>ment<EFBFBD>e */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -62,8 +62,8 @@ else
|
|||||||
"vatNumber" => $_REQUEST["vatNumber"]);
|
"vatNumber" => $_REQUEST["vatNumber"]);
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
dol_syslog("Create soapclient_nusoap for URL=".$WS_DOL_URL);
|
dol_syslog("Create nusoap_client for URL=".$WS_DOL_URL);
|
||||||
$soapclient = new soapclient_nusoap($WS_DOL_URL);
|
$soapclient = new nusoap_client($WS_DOL_URL);
|
||||||
|
|
||||||
// Call the WebService and store its result in $result.
|
// Call the WebService and store its result in $result.
|
||||||
dol_syslog("Call method ".$WS_METHOD);
|
dol_syslog("Call method ".$WS_METHOD);
|
||||||
|
|||||||
@ -35,8 +35,8 @@ $WS_METHOD = 'getVersions';
|
|||||||
$parameters = array("param1"=>"value1");
|
$parameters = array("param1"=>"value1");
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
dol_syslog("Create soapclient_nusoap for URL=".$WS_DOL_URL);
|
dol_syslog("Create nusoap_client for URL=".$WS_DOL_URL);
|
||||||
$soapclient = new soapclient_nusoap($WS_DOL_URL);
|
$soapclient = new nusoap_client($WS_DOL_URL);
|
||||||
if ($soapclient)
|
if ($soapclient)
|
||||||
{
|
{
|
||||||
$soapclient->soap_defencoding='UTF-8';
|
$soapclient->soap_defencoding='UTF-8';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user