diff --git a/COPYRIGHT b/COPYRIGHT index 4272219f80b4a5a377b6d500a0ae3fbff3810652..c69dfc91d5483a889052d134cd9e34683163c5d3 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -38,7 +38,7 @@ jQuery jqueryFileTree 1.0.1 GPL and MIT Licence Yes JS library for colo jQuery jquerytreeview 1.4.1 MIT Licence Yes JS library for color picker with not defined list of colors jQuery Layout 1.3.0 GPL and MIT Licence Yes JS library plugin Layout (RC-29.15) jQuery Mobile 1.3 GPL and MIT Licence Yes JS library for smartphone (not used) -jQuery TableDnD 0.5 GPL and MIT Licence Yes JS library plugin TableDnD (to reorder table rows) +jQuery TableDnD 0.6 GPL and MIT Licence Yes JS library plugin TableDnD (to reorder table rows) jQuery Timepicker 1.1.0 GPL and MIT Licence Yes JS library Timepicker addon for Datepicker jQuery Tiptip 1.3 GPL and MIT Licence Yes JS library for tooltips JSGantt 1.2 BSD Licence Yes JS library (to build Gantt reports) diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index 0ee03559391186b978627da9aff1cb1206e92083..2fac2e2a16a954e92e16ff30ba53edaaf4052a0b 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -62,14 +62,14 @@ else $remise = $tab[$i]['remise']; - echo ('<p>'.$tab[$i]['qte'].' x '.price2num($tab[$i]['price'], 'MT').$remise_percent.' = '.price2num($tab[$i]['total_ht'], 'MT').' '.$conf->currency.' '.$langs->trans("HT").' ('.price2num($tab[$i]['total_ttc'], 'MT').' '.$conf->currency.' '.$langs->trans("TTC").')</p>'."\n"); + echo ('<p>'.$tab[$i]['qte'].' x '.price2num($tab[$i]['price'], 'MT').$remise_percent.' = '.price(price2num($tab[$i]['total_ht'], 'MT'),0,$langs,0,0,-1,$conf->currency).' '.$langs->trans("HT").' ('.price(price2num($tab[$i]['total_ttc'], 'MT'),0,$langs,0,0,-1,$conf->currency).' '.$langs->trans("TTC").')</p>'."\n"); echo ('</div>'."\n"); } } $obj_facturation->calculTotaux(); $total_ttc = $obj_facturation->prixTotalTtc(); -echo ('<p class="cadre_prix_total">'.$langs->trans("Total").' : '.price2num($total_ttc, 'MT').' '.$conf->currency.'<br></p>'."\n"); +echo ('<p class="cadre_prix_total">'.$langs->trans("Total").' : '.price(price2num($total_ttc, 'MT'),0,$langs,0,0,-1,$conf->currency).'<br></p>'."\n"); ?></div> </div> diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index cae461fe7fcfdba9cf0612e96713815a8b344358..3e154585e54f217f9db10fd70d6fcbb94ea728e5 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -132,7 +132,7 @@ print $object->ref; for($i=0;$i < $tab_size;$i++) { $remise = $tab[$i]['remise']; - echo ('<tr><td>'.$tab[$i]['ref'].'</td><td>'.$tab[$i]['label'].'</td><td>'.$tab[$i]['qte'].'</td><td>'.$tab[$i]['remise_percent'].'</td><td class="total">'.price2num($tab[$i]['total_ht'],'MT').' '.$conf->currency.'</td></tr>'."\n"); + echo ('<tr><td>'.$tab[$i]['ref'].'</td><td>'.$tab[$i]['label'].'</td><td>'.$tab[$i]['qte'].'</td><td>'.$tab[$i]['remise_percent'].'</td><td class="total">'.price(price2num($tab[$i]['total_ht'],'MT'),0,$langs,0,0,-1,$conf->currency).'</td></tr>'."\n"); } ?> diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index 6fdf7952207020c878f44cf519007f2981574475..2542993b31420134180be299989f14e79a08f4c7 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -26,12 +26,12 @@ $langs->load("main"); <table class="table_resume"> <tr><td class="resume_label"><?php echo $langs->trans("Invoice"); ?></td><td><?php echo $obj_facturation->numInvoice(); ?></td></tr> - <tr><td class="resume_label"><?php echo $langs->trans("TotalHT"); ?></td><td><?php echo price2num($obj_facturation->prixTotalHt(),'MT').' '.$conf->currency; ?></td></tr> + <tr><td class="resume_label"><?php echo $langs->trans("TotalHT"); ?></td><td><?php echo price(price2num($obj_facturation->prixTotalHt(),'MT'),0,$langs,0,0,-1,$conf->currency); ?></td></tr> <?php // Affichage de la tva par taux if ( $obj_facturation->montantTva() ) { - echo ('<tr><td class="resume_label">'.$langs->trans("VAT").'</td><td>'.price2num($obj_facturation->montantTva(),'MT').' '.$conf->currency.'</td></tr>'); + echo ('<tr><td class="resume_label">'.$langs->trans("VAT").'</td><td>'.price(price2num($obj_facturation->montantTva(),'MT'),0,$langs,0,0,-1,$conf->currency).'</td></tr>'); } else @@ -41,7 +41,7 @@ $langs->load("main"); } ?> - <tr><td class="resume_label"><?php echo $langs->trans("TotalTTC"); ?> </td><td><?php echo price2num($obj_facturation->prixTotalTtc(),'MT').' '.$conf->currency; ?></td></tr> + <tr><td class="resume_label"><?php echo $langs->trans("TotalTTC"); ?> </td><td><?php echo price(price2num($obj_facturation->prixTotalTtc(),'MT'),0,$langs,0,0,-1,$conf->currency); ?></td></tr> <tr><td class="resume_label"><?php echo $langs->trans("PaymentMode"); ?> </td><td> <?php switch ($obj_facturation->getSetPaymentMode()) @@ -85,14 +85,14 @@ $langs->load("main"); } else { - echo ('<tr><td class="resume_label">'.$langs->trans("Received").'</td><td>'.price2num($obj_facturation->montantEncaisse(),'MT').' '.$conf->currency.'</td></tr>'); + echo ('<tr><td class="resume_label">'.$langs->trans("Received").'</td><td>'.price(price2num($obj_facturation->montantEncaisse(),'MT'),0,$langs,0,0,-1,$conf->currency).'</td></tr>'); } // Affichage du montant rendu (reglement en especes) if ( $obj_facturation->montantRendu() ) { - echo ('<tr><td class="resume_label">'.$langs->trans("Change").'</td><td>'.price2num($obj_facturation->montantRendu(),'MT').' '.$conf->currency.'</td></tr>'); + echo ('<tr><td class="resume_label">'.$langs->trans("Change").'</td><td>'.price(price2num($obj_facturation->montantRendu(),'MT'),0,$langs,0,0,-1,$conf->currency).'</td></tr>'); } diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index eb81c4a46ae208137329b098cce46eb3a0871a3b..71302baf5423b3116b1b23f8c657a1d60b01a62a 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -796,7 +796,7 @@ else if ($action == "addline" && $user->rights->propal->creer) if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - $mesg = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').$langs->getCurrencySymbol($conf->currency)); + $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); } else @@ -927,7 +927,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa if ($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price2num($price_min,'MU')).$langs->getCurrencySymbol($conf->currency), 'errors'); + setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)), 'errors'); $error++; } } diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 2c60093ab06356e2eab8ac60b1b00fdcd0039d87..203dbe4be96b45254ce7195a416265da4829384e 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -732,7 +732,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - $mesg = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').$langs->getCurrencySymbol($conf->currency)); + $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); } else @@ -865,7 +865,7 @@ else if ($action == 'updateligne' && $user->rights->commande->creer && GETPOST(' if ($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price2num($price_min,'MU')).$langs->getCurrencySymbol($conf->currency), 'errors'); + setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)), 'errors'); $error++; } } diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 1e13c9f987426f3f940c783ea8f96d36a2d67356..95f5985b56f9f4d43abbc9b7f05b23c40f88c3c2 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -482,7 +482,7 @@ if (! empty($id) && $action != 'edit') print '<td rowspan="'.$nbrows.'" valign="top" width="50%">'.$langs->trans("Comments").' :<br>'; print nl2br($don->note_private).'</td></tr>'; - print "<tr>".'<td>'.$langs->trans("Amount").'</td><td>'.price($don->amount).' '.$langs->trans("Currency".$conf->currency).'</td></tr>'; + print "<tr>".'<td>'.$langs->trans("Amount").'</td><td>'.price($don->amount,0,$langs,0,0,-1,$conf->currency).'</td></tr>'; print "<tr><td>".$langs->trans("PublicDonation")."</td><td>"; print yn($don->public); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index c22a0becde1f2ecd08c8500e98b028bd275b9bce..d8379a02a07b209930505d6c4b4fd483cd7883df 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1,28 +1,28 @@ <?php /* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> -* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> -* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> -* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> -* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> -* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> -* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> -* Copyright (C) 2013 Jean-Francois FERRY <jfefe@aternatik.fr> -* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ + * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> + * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> + * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> + * Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> + * Copyright (C) 2013 Jean-Francois FERRY <jfefe@aternatik.fr> + * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ /** * \file htdocs/compta/facture.php @@ -1304,7 +1304,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - $mesg = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').$langs->getCurrencySymbol($conf->currency)); + $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); } else @@ -1443,7 +1443,7 @@ else if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['sa if ($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price2num($price_min,'MU')).$langs->getCurrencySymbol($conf->currency), 'errors'); + setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)), 'errors'); $error++; } } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 6f41995971ebc34de2f7c0acfe94eda37c9aca29..c117291394451d4226d1db41a45c18e7040e4d34 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -367,13 +367,13 @@ if ($resql) print $thirdparty->getNomUrl(1,'customer'); print '</td>'; - print '<td align="right">'.price($objp->total_ht).' '.$langs->getCurrencySymbol($conf->currency).'</td>'; + print '<td align="right">'.price($objp->total_ht,0,$langs,0,0,-1,$conf->currency).'</td>'; - print '<td align="right">'.price($objp->total_tva).' '.$langs->getCurrencySymbol($conf->currency).'</td>'; + print '<td align="right">'.price($objp->total_tva,0,$langs,0,0,-1,$conf->currency).'</td>'; - print '<td align="right">'.price($objp->total_ttc).' '.$langs->getCurrencySymbol($conf->currency).'</td>'; + print '<td align="right">'.price($objp->total_ttc,0,$langs,0,0,-1,$conf->currency).'</td>'; - print '<td align="right">'.(! empty($paiement)?price($paiement).' '.$langs->getCurrencySymbol($conf->currency):' ').'</td>'; + print '<td align="right">'.(! empty($paiement)?price($paiement,0,$langs,0,0,-1,$conf->currency):' ').'</td>'; // Affiche statut de la facture print '<td align="right" class="nowrap">'; @@ -393,10 +393,10 @@ if ($resql) // Print total print '<tr class="liste_total">'; print '<td class="liste_total" colspan="4" align="left">'.$langs->trans('Total').'</td>'; - print '<td class="liste_total" align="right">'.price($total_ht).' '.$langs->getCurrencySymbol($conf->currency).'</td>'; - print '<td class="liste_total" align="right">'.price($total_tva).' '.$langs->getCurrencySymbol($conf->currency).'</td>'; - print '<td class="liste_total" align="right">'.price($total_ttc).' '.$langs->getCurrencySymbol($conf->currency).'</td>'; - print '<td class="liste_total" align="right">'.price($totalrecu).' '.$langs->getCurrencySymbol($conf->currency).'</td>'; + print '<td class="liste_total" align="right">'.price($total_ht,0,$langs,0,0,-1,$conf->currency).'</td>'; + print '<td class="liste_total" align="right">'.price($total_tva,0,$langs,0,0,-1,$conf->currency).'</td>'; + print '<td class="liste_total" align="right">'.price($total_ttc,0,$langs,0,0,-1,$conf->currency).'</td>'; + print '<td class="liste_total" align="right">'.price($totalrecu,0,$langs,0,0,-1,$conf->currency).'</td>'; print '<td class="liste_total" align="center"> </td>'; print '</tr>'; } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index ddf8a988b488b7092fb81a5e3cf258dc40ce160e..0e47fd7c1099aa54b4100ea5197b7491e9764479 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -201,7 +201,7 @@ if ($resql) print $thirdpartystatic->getNomUrl(1,'customer'); print '</td>'; print '<td align="right">'; - print price($obj->total_ttc).' '.$langs->trans("Currency".$conf->currency); + print price($obj->total_ttc,0,$langs,0,0,-1,$conf->currency); print '</td>'; // Date print '<td align="right">'; @@ -261,7 +261,7 @@ if ($result) print "</td>\n"; print '<td align="center">'.dol_print_date($db->jdate($obj->datec),'day')."</td>\n"; - print '<td align="right">'.price($obj->amount).' '.$langs->trans("Currency".$conf->currency)."</td>\n"; + print '<td align="right">'.price($obj->amount,0,$langs,0,0,-1,$conf->currency)."</td>\n"; print "</tr>\n"; $i++; diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 060d9c546b0a98856ab08901ace74615dc74c651..fa9c99a857123f8897f191739b73b390fd9403b4 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -459,7 +459,7 @@ else if ($action == 'addline' && $user->rights->contrat->creer) if($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - $object->error = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->currency)); + $object->error = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); $result = -1 ; } else diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 50401f586940d07ef75deed5a586a077444060c1..8f191415deb06b1aa6a2c4c6b128d2c2a4b58cb1 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -118,7 +118,7 @@ class box_activity extends ModeleBoxes ); $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dol_trunc(number_format($objp->Mnttot, 0, ',', ' '),40)." ".$langs->getCurrencySymbol($conf->currency) + 'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency) ); // We add only for the current year @@ -165,7 +165,7 @@ class box_activity extends ModeleBoxes ); $totalnb += $objp->nb; $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dol_trunc(number_format($objp->Mnttot, 0, ',', ' '),40)." ".$langs->getCurrencySymbol($conf->currency) + 'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency) ); $totalMnt += $objp->Mnttot; $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', @@ -219,7 +219,7 @@ class box_activity extends ModeleBoxes $totalnb += $objp->nb; $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dol_trunc(number_format($objp->Mnttot, 0, ',', ' '),40)." ".$langs->getCurrencySymbol($conf->currency) + 'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency) ); $totalMnt += $objp->Mnttot; $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $commandestatic->LibStatut($objp->fk_statut,0,3)); @@ -270,7 +270,7 @@ class box_activity extends ModeleBoxes $totalnb += $objp->nb; $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dol_trunc(number_format($objp->Mnttot, 0, ',', ' '),40)." ".$langs->getCurrencySymbol($conf->currency) + 'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency) ); $totalMnt += $objp->Mnttot; $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $propalstatic->LibStatut($objp->fk_statut,3)); @@ -283,8 +283,8 @@ class box_activity extends ModeleBoxes // Add the sum in the bottom of the boxes $this->info_box_contents[$i][1] = array('td' => 'align="left" ', 'text' => $langs->trans("Total")." ".$textHead); - $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')); - $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => number_format($totalMnt, 0, ',', ' ')." ".$langs->getCurrencySymbol($conf->currency)); + $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => price($totalnb,1,$langs,0,0,-1,$conf->currency)); + $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => price($totalMnt,1,$langs,0,0,-1,$conf->currency)); $this->info_box_contents[$i][4] = array('td' => 'align="right" ', 'text' => ""); $this->info_box_contents[$i][5] = array('td' => 'align="right"', 'text' => ""); } diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index b48d7993d277d677e0ace70811ed62f70accbf4a..9b80ffefb7400899c7f1fec3e528a57f66953f54 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -141,7 +141,7 @@ class box_comptes extends ModeleBoxes $this->info_box_contents[$i][2] = array('td' => 'align="right" class="liste_total"', 'text' => ' ' ); - $totalamount=price($solde_total).' '.$langs->trans("Currency".$conf->currency); + $totalamount=price($solde_total,0,$langs,0,0,-1,$conf->currency); $this->info_box_contents[$i][3] = array('td' => 'align="right" class="liste_total"', 'text' => $totalamount ); diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 1cf128cc150fcd2452c71936e68aa0f7cc1161a4..92a4dcd07a58bfbef0af8e2c49280d4495753e3e 100755 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -185,7 +185,7 @@ abstract class CommonDocGenerator { if($extrafields->attribute_type[$key] == 'price') { - $object->array_options['options_'.$key] = price($object->array_options['options_'.$key]).' '.$outputlangs->getCurrencySymbol($conf->currency); + $object->array_options['options_'.$key] = price($object->array_options['options_'.$key],0,$outputlangs,0,0,-1,$conf->currency); } else if($extrafields->attribute_type[$key] == 'select') { @@ -322,8 +322,8 @@ abstract class CommonDocGenerator { if($extrafields->attribute_type[$key] == 'price') { - $object->array_options['options_'.$key] = price2num($object->array_options['options_'.$key],2); - $object->array_options['options_'.$key.'_currency'] = $object->array_options['options_'.$key].' '.$outputlangs->getCurrencySymbol($conf->currency); + $object->array_options['options_'.$key] = price2num($object->array_options['options_'.$key]); + $object->array_options['options_'.$key.'_currency'] = price($object->array_options['options_'.$key],0,$outputlangs,0,0,-1,$conf->currency); //Add value to store price with currency $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency'])); } diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 2e014321b0537ae53755637e83a09f01bb037275..dcff2aedf14888c9d6e376d601ed96eb678b1718 100755 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -828,7 +828,7 @@ class ExtraFields } elseif ($type == 'price') { - $value=price($value).' '.$langs->getCurrencySymbol($conf->currency); + $value=price($value,0,$langs,0,0,-1,$conf->currency); } elseif ($type == 'select') { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ef9a416d1df59b414ade07206b1bd8ca1d177680..4e1ca4e3bbbe979e7541a8af18945019e76d92b2 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1461,10 +1461,6 @@ class Form $outval.=$objRef.' - '.dol_trunc($label,32).' - '; $found=0; - $currencytext=$langs->trans("Currency".$conf->currency); - $currencytextnoent=$langs->transnoentities("Currency".$conf->currency); - if (dol_strlen($currencytext) > 10) $currencytext=$conf->currency; // If text is too long, we use the short code - if (dol_strlen($currencytextnoent) > 10) $currencytextnoent=$conf->currency; // If text is too long, we use the short code // Multiprice if ($price_level >= 1) // If we need a particular price level (from 1 to 6) @@ -1486,13 +1482,13 @@ class Form $found=1; if ($objp2->price_base_type == 'HT') { - $opt.= price($objp2->price,1).' '.$currencytext.' '.$langs->trans("HT"); - $outval.= price($objp2->price,1).' '.$currencytextnoent.' '.$langs->transnoentities("HT"); + $opt.= price($objp2->price,1,$langs,0,0,-1,$conf->currency).' '.$langs->trans("HT"); + $outval.= price($objp2->price,0,$langs,0,0,-1,$conf->currency).' '.$langs->transnoentities("HT"); } else { - $opt.= price($objp2->price_ttc,1).' '.$currencytext.' '.$langs->trans("TTC"); - $outval.= price($objp2->price_ttc,1).' '.$currencytextnoent.' '.$langs->transnoentities("TTC"); + $opt.= price($objp2->price_ttc,1,$langs,0,0,-1,$conf->currency).' '.$langs->trans("TTC"); + $outval.= price($objp2->price_ttc,0,$langs,0,0,-1,$conf->currency).' '.$langs->transnoentities("TTC"); } $outprice_ht=price($objp2->price); $outprice_ttc=price($objp2->price_ttc); @@ -1514,15 +1510,15 @@ class Form $outdiscount=$objp->remise_percent; if ($objp->quantity == 1) { - $opt.= price($objp->unitprice).' '.$currencytext."/"; - $outval.= price($objp->unitprice).' '.$currencytextnoent."/"; + $opt.= price($objp->unitprice,1,$langs,0,0,-1,$conf->currency)."/"; + $outval.= price($objp->unitprice,0,$langs,0,0,-1,$conf->currency)."/"; $opt.= $langs->trans("Unit"); // Do not use strtolower because it breaks utf8 encoding $outval.=$langs->transnoentities("Unit"); } else { - $opt.= price($objp->price).' '.$currencytext."/".$objp->quantity; - $outval.= price($objp->price).' '.$currencytextnoent."/".$objp->quantity; + $opt.= price($objp->price,1,$langs,0,0,-1,$conf->currency)."/".$objp->quantity; + $outval.= price($objp->price,0,$langs,0,0,-1,$conf->currency)."/".$objp->quantity; $opt.= $langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding $outval.=$langs->transnoentities("Units"); } @@ -1534,8 +1530,8 @@ class Form } if (!empty($objp->quantity) && $objp->quantity >= 1) { - $opt.=" (".price($objp->unitprice).' '.$currencytext."/".$langs->trans("Unit").")"; // Do not use strtolower because it breaks utf8 encoding - $outval.=" (".price($objp->unitprice).' '.$currencytextnoent."/".$langs->transnoentities("Unit").")"; // Do not use strtolower because it breaks utf8 encoding + $opt.=" (".price($objp->unitprice,1,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit").")"; // Do not use strtolower because it breaks utf8 encoding + $outval.=" (".price($objp->unitprice,0,$langs,0,0,-1,$conf->currency)."/".$langs->transnoentities("Unit").")"; // Do not use strtolower because it breaks utf8 encoding } if (!empty($objp->remise_percent) && $objp->remise_percent >= 1) { @@ -1548,13 +1544,13 @@ class Form { if ($objp->price_base_type == 'HT') { - $opt.= price($objp->price,1).' '.$currencytext.' '.$langs->trans("HT"); - $outval.= price($objp->price,1).' '.$currencytextnoent.' '.$langs->transnoentities("HT"); + $opt.= price($objp->price,1,$langs,0,0,-1,$conf->currency).' '.$langs->trans("HT"); + $outval.= price($objp->price,0,$langs,0,0,-1,$conf->currency).' '.$langs->transnoentities("HT"); } else { - $opt.= price($objp->price_ttc,1).' '.$currencytext.' '.$langs->trans("TTC"); - $outval.= price($objp->price_ttc,1).' '.$currencytextnoent.' '.$langs->transnoentities("TTC"); + $opt.= price($objp->price_ttc,1,$langs,0,0,-1,$conf->currency).' '.$langs->trans("TTC"); + $outval.= price($objp->price_ttc,0,$langs,0,0,-1,$conf->currency).' '.$langs->transnoentities("TTC"); } $outprice_ht=price($objp->price); $outprice_ttc=price($objp->price_ttc); @@ -1720,33 +1716,27 @@ class Form if (! empty($objp->idprodfournprice)) { - $currencytext=$langs->trans("Currency".$conf->currency); - $currencytextnoent=$langs->transnoentities("Currency".$conf->currency); - if (dol_strlen($currencytext) > 10) $currencytext=$conf->currency; // If text is too long, we use the short code - if (dol_strlen($currencytextnoent) > 10) $currencytextnoent=$conf->currency; // If text is too long, we use the short code - - $outqty=$objp->quantity; $outdiscount=$objp->remise_percent; if ($objp->quantity == 1) { - $opt.= price($objp->fprice).' '.$currencytext."/"; - $outval.= price($objp->fprice).' '.$currencytextnoent."/"; + $opt.= price($objp->fprice,1,$langs,0,0,-1,$conf->currency)."/"; + $outval.= price($objp->fprice,0,$langs,0,0,-1,$conf->currency)."/"; $opt.= $langs->trans("Unit"); // Do not use strtolower because it breaks utf8 encoding $outval.=$langs->transnoentities("Unit"); } else { - $opt.= price($objp->fprice).' '.$currencytext."/".$objp->quantity; - $outval.= price($objp->fprice).' '.$currencytextnoent."/".$objp->quantity; + $opt.= price($objp->fprice,1,$langs,0,0,-1,$conf->currency)."/".$objp->quantity; + $outval.= price($objp->fprice,0,$langs,0,0,-1,$conf->currency)."/".$objp->quantity; $opt.= $langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding $outval.= $langs->transnoentities("Units"); } if ($objp->quantity >= 1) { - $opt.=" (".price($objp->unitprice).' '.$currencytext."/".$langs->trans("Unit").")"; // Do not use strtolower because it breaks utf8 encoding - $outval.=" (".price($objp->unitprice).' '.$currencytextnoent."/".$langs->transnoentities("Unit").")"; // Do not use strtolower because it breaks utf8 encoding + $opt.=" (".price($objp->unitprice,1,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit").")"; // Do not use strtolower because it breaks utf8 encoding + $outval.=" (".price($objp->unitprice,0,$langs,0,0,-1,$conf->currency)."/".$langs->transnoentities("Unit").")"; // Do not use strtolower because it breaks utf8 encoding } if ($objp->remise_percent >= 1) { @@ -1853,24 +1843,23 @@ class Form if ($objp->quantity == 1) { - $opt.= price($objp->fprice); - $opt.= $langs->trans("Currency".$conf->currency)."/"; + $opt.= price($objp->fprice,1,$langs,0,0,-1,$conf->currency)."/"; } $opt.= $objp->quantity.' '; if ($objp->quantity == 1) { - $opt.= strtolower($langs->trans("Unit")); + $opt.= $langs->trans("Unit"); } else { - $opt.= strtolower($langs->trans("Units")); + $opt.= $langs->trans("Units"); } if ($objp->quantity > 1) { $opt.=" - "; - $opt.= price($objp->unitprice).$langs->trans("Currency".$conf->currency)."/".strtolower($langs->trans("Unit")); + $opt.= price($objp->unitprice,1,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit"); } if ($objp->duration) $opt .= " - ".$objp->duration; $opt .= "</option>\n"; @@ -2987,13 +2976,13 @@ class Form print '<tr><td class="nowrap">'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - if (! $filter || $filter=="fk_facture_source IS NULL") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount),$langs->transnoentities("Currency".$conf->currency)).': '; // If we want deposit to be substracted to payments only and not to total of final invoice - else print $langs->trans("CompanyHasCreditNote",price($amount),$langs->transnoentities("Currency".$conf->currency)).': '; + if (! $filter || $filter=="fk_facture_source IS NULL") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,1,$langs,0,0,-1,$conf->currency)).': '; // If we want deposit to be substracted to payments only and not to total of final invoice + else print $langs->trans("CompanyHasCreditNote",price($amount,1,$langs,0,0,-1,$conf->currency)).': '; } else { - if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount),$langs->transnoentities("Currency".$conf->currency)).': '; - else print $langs->trans("CompanyHasCreditNote",price($amount),$langs->transnoentities("Currency".$conf->currency)).': '; + if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,1,$langs,0,0,-1,$conf->currency)).': '; + else print $langs->trans("CompanyHasCreditNote",price($amount,1,$langs,0,0,-1,$conf->currency)).': '; } $newfilter='fk_facture IS NULL AND fk_facture_line IS NULL'; // Remises disponibles if ($filter) $newfilter.=' AND ('.$filter.')'; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index a3c1ed0acd989a2ffb64881430dd24d8f5018f48..86eb04b970f21f8a9e3a975df2f61cacb0873954 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -450,7 +450,7 @@ class FormFile $langs->load("errors"); $genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated")); } - if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton=''; + if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton=''; $out.= $genbutton; $out.= '</th>'; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 7f82247397c3edaa5156749559aab36fffddc688..5045283abe3ec8d89a2c2ea9281960827d03d67e 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -312,17 +312,17 @@ function ajax_combobox($htmlname, $event=array(), $minLengthToAutocomplete=0) /* Some properties for combobox: minLengthToAutocomplete: 2, - comboboxContainerClass: "comboboxContainer", - comboboxValueContainerClass: "comboboxValueContainer", - comboboxValueContentClass: "comboboxValueContent", - comboboxDropDownClass: "comboboxDropDownContainer", - comboboxDropDownButtonClass: "comboboxDropDownButton", - comboboxDropDownItemClass: "comboboxItem", - comboboxDropDownItemHoverClass: "comboboxItemHover", - comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader", - comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer", - animationType: "slide", - width: "500px" */ + comboboxContainerClass: "comboboxContainer", + comboboxValueContainerClass: "comboboxValueContainer", + comboboxValueContentClass: "comboboxValueContent", + comboboxDropDownClass: "comboboxDropDownContainer", + comboboxDropDownButtonClass: "comboboxDropDownButton", + comboboxDropDownItemClass: "comboboxItem", + comboboxDropDownItemHoverClass: "comboboxItemHover", + comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader", + comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer", + animationType: "slide", + width: "500px" */ $msg = '<script type="text/javascript"> $(function() { diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 29870c1ce9539fb991b61e3b815f2003205f65c2..6802d9d8cd2c3303347d1c8b206e2558d1daaf00 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -163,21 +163,6 @@ function getParentCompanyTimeZoneInt($refgmtdate='now') }*/ -/** - * Add a delay of a timezone to a date - * - * @param timestamp $time Date timestamp - * @param string $timezone Timezone - * @return timestamp New timestamp - */ -function dol_time_plus_timezone($time,$timezone) -{ - // TODO Finish function - - return $time; -} - - /** * Add a delay to a date * @@ -329,14 +314,12 @@ function convertSecondToTime($iSecond,$format='all',$lengthOfDay=86400,$lengthOf * DD/MM/YY HH:MM:SS or DD/MM/YYYY HH:MM:SS (this format should not be used anymore) * @param int $gm 1 =Input date is GM date, * 0 =Input date is local date using PHP server timezone - * -1=Input date is local date using timezone provided as third parameter - * @param string $tz Timezone to use. This means param $gm=-1 * @return date Date * 19700101020000 -> 7200 with gm=1 * * @see dol_print_date, dol_mktime, dol_getdate */ -function dol_stringtotime($string, $gm=1, $tz='') +function dol_stringtotime($string, $gm=1) { // Convert date with format DD/MM/YYY HH:MM:SS. This part of code should not be used. if (preg_match('/^([0-9]+)\/([0-9]+)\/([0-9]+)\s?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i',$string,$reg)) @@ -380,10 +363,6 @@ function dol_stringtotime($string, $gm=1, $tz='') $string=preg_replace('/([^0-9])/i','',$string); $tmp=$string.'000000'; $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),($gm?1:0)); - if ($gm == -1) - { - $date=dol_time_plus_timezone($date,$tz); - } return $date; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 5cb65432ab62602400a8a6844ceeb7862d991c63..4eea7aa785aeccd09565b4501fcc35f902cd7a33 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2616,8 +2616,8 @@ function vatrate($rate,$addpercent=false,$info_bits=0,$usestarfornpr=0) * @param string $form Type of format, HTML or not (not by default) * @param Translate $outlangs Object langs for output * @param int $trunc 1=Truncate if there is too much decimals (default), 0=Does not truncate - * @param int $rounding Minimum number of decimal to show. If not defined we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOTAL) - * @param int $forcerounding Force the number of decimal fo forcerounding decimal (-1=do not force) + * @param int $rounding Minimum number of decimal to show. If 0, no change, if -1, we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOTAL) + * @param int $forcerounding Force the number of decimal to forcerounding decimal (-1=do not force) * @param string $currency_code To add currency symbol (''=add nothing, 'XXX'=add currency symbols for XXX currency) * @return string Chaine avec montant formate * diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index b60aa21c6321673478fe649416df99971ec1c15c..37179df0f75ad4c28efbc57503f1bc4ab0e887d9 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -345,7 +345,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM $url.='mainmenu='.$mainmenu; } - print '<!-- Process menu entry with mainmenu='.$menu_array[$i]['mainmenu'].', leftmenu='.$menu_array[$i]['leftmenu'].', level='.$menu_array[$i]['level'].' enabled='.$menu_array[$i]['enabled'].' -->'."\n"; + print '<!-- Process menu entry with mainmenu='.$menu_array[$i]['mainmenu'].', leftmenu='.$menu_array[$i]['leftmenu'].', level='.$menu_array[$i]['level'].' enabled='.$menu_array[$i]['enabled'].' -->'."\n"; // Menu niveau 0 if ($menu_array[$i]['level'] == 0) diff --git a/htdocs/fourn/ajax/getSupplierPrices.php b/htdocs/fourn/ajax/getSupplierPrices.php index 938b3af22794b1c6a3369d74190d7067abd5229b..029f135a653ca60ba14c9bc88ca96592fbb1edce 100644 --- a/htdocs/fourn/ajax/getSupplierPrices.php +++ b/htdocs/fourn/ajax/getSupplierPrices.php @@ -76,8 +76,7 @@ if (! empty($idprod)) if ($objp->quantity == 1) { - $title.= price($objp->fprice); - $title.= $langs->getCurrencySymbol($conf->currency)."/"; + $title.= price($objp->fprice,0,$langs,0,0,-1,$conf->currency)."/"; $price = $objp->fprice; } @@ -95,18 +94,18 @@ if (! empty($idprod)) if ($objp->quantity > 1) { $title.=" - "; - $title.= price($objp->unitprice).$langs->getCurrencySymbol($conf->currency)."/".strtolower($langs->trans("Unit")); + $title.= price($objp->unitprice,0,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit"); $price = $objp->unitprice; } if ($objp->unitcharges > 0 && ($conf->global->MARGIN_TYPE == "2")) { $title.=" + "; - $title.= price($objp->unitcharges).$langs->getCurrencySymbol($conf->currency); + $title.= price($objp->unitcharges,0,$langs,0,0,-1,$conf->currency); $price += $objp->unitcharges; } if ($objp->duration) $label .= " - ".$objp->duration; - $label = price($price).$langs->getCurrencySymbol($conf->currency)."/".strtolower($langs->trans("Unit")); + $label = price($price,0,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit"); $prices[] = array("id" => $objp->idprodfournprice, "price" => price($price,0,'',0), "label" => $label, "title" => $title); $i++; diff --git a/htdocs/includes/jquery/plugins/tablednd/README.txt b/htdocs/includes/jquery/plugins/tablednd/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..1fab924b7f0d98c587ff3c7e0745cedd991abf29 --- /dev/null +++ b/htdocs/includes/jquery/plugins/tablednd/README.txt @@ -0,0 +1,3 @@ +----- jquery.tablednd ----- +- New versions are found into directory js of https://github.com/isocra/TableDnD +- Version 0.7, 0.8 seems to be not compatible. \ No newline at end of file diff --git a/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js b/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js new file mode 100644 index 0000000000000000000000000000000000000000..7201855a3c94a75bb282155577c7a1b41c565f92 --- /dev/null +++ b/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js @@ -0,0 +1 @@ +var hasTouch='ontouchstart'in document.documentElement,startEvent=hasTouch?'touchstart':'mousedown',moveEvent=hasTouch?'touchmove':'mousemove',endEvent=hasTouch?'touchend':'mouseup';jQuery.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldY:0,build:function(options){this.each(function(){this.tableDnDConfig=jQuery.extend({onDragStyle:null,onDropStyle:null,onDragClass:"tDnD_whileDrag",onDrop:null,onDragStart:null,scrollAmount:5,serializeRegexp:/[^\-]*$/,serializeParamName:null,dragHandle:null},options||{});jQuery.tableDnD.makeDraggable(this)});return this},makeDraggable:function(table){var config=table.tableDnDConfig;if(config.dragHandle){var cells=jQuery("td."+table.tableDnDConfig.dragHandle,table);cells.each(function(){jQuery(this).bind(startEvent,function(ev){jQuery.tableDnD.initialiseDrag(this.parentNode,table,this,ev,config);return false})})}else{var rows=jQuery("tr",table);rows.each(function(){var row=jQuery(this);if(!row.hasClass("nodrag")){row.bind(startEvent,function(ev){if(ev.target.tagName=="TD"){jQuery.tableDnD.initialiseDrag(this,table,this,ev,config);return false}}).css("cursor","move")}})}},initialiseDrag:function(dragObject,table,target,evnt,config){jQuery.tableDnD.dragObject=dragObject;jQuery.tableDnD.currentTable=table;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(target,evnt);jQuery.tableDnD.originalOrder=jQuery.tableDnD.serialize();jQuery(document).bind(moveEvent,jQuery.tableDnD.mousemove).bind(endEvent,jQuery.tableDnD.mouseup);if(config.onDragStart){config.onDragStart(table,target)}},updateTables:function(){this.each(function(){if(this.tableDnDConfig){jQuery.tableDnD.makeDraggable(this)}})},mouseCoords:function(ev){if(ev.pageX||ev.pageY){return{x:ev.pageX,y:ev.pageY}}return{x:ev.clientX+document.body.scrollLeft-document.body.clientLeft,y:ev.clientY+document.body.scrollTop-document.body.clientTop}},getMouseOffset:function(target,ev){ev=ev||window.event;var docPos=this.getPosition(target);var mousePos=this.mouseCoords(ev);return{x:mousePos.x-docPos.x,y:mousePos.y-docPos.y}},getPosition:function(e){var left=0;var top=0;if(e.offsetHeight==0){e=e.firstChild}while(e.offsetParent){left+=e.offsetLeft;top+=e.offsetTop;e=e.offsetParent}left+=e.offsetLeft;top+=e.offsetTop;return{x:left,y:top}},mousemove:function(ev){if(jQuery.tableDnD.dragObject==null){return}if(ev.type=='touchmove'){event.preventDefault()}var dragObj=jQuery(jQuery.tableDnD.dragObject);var config=jQuery.tableDnD.currentTable.tableDnDConfig;var mousePos=jQuery.tableDnD.mouseCoords(ev);var y=mousePos.y-jQuery.tableDnD.mouseOffset.y;var yOffset=window.pageYOffset;if(document.all){if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){yOffset=document.documentElement.scrollTop}else if(typeof document.body!='undefined'){yOffset=document.body.scrollTop}}if(mousePos.y-yOffset<config.scrollAmount){window.scrollBy(0,-config.scrollAmount)}else{var windowHeight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;if(windowHeight-(mousePos.y-yOffset)<config.scrollAmount){window.scrollBy(0,config.scrollAmount)}}if(y!=jQuery.tableDnD.oldY){var movingDown=y>jQuery.tableDnD.oldY;jQuery.tableDnD.oldY=y;if(config.onDragClass){dragObj.addClass(config.onDragClass)}else{dragObj.css(config.onDragStyle)}var currentRow=jQuery.tableDnD.findDropTargetRow(dragObj,y);if(currentRow){if(movingDown&&jQuery.tableDnD.dragObject!=currentRow){jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,currentRow.nextSibling)}else if(!movingDown&&jQuery.tableDnD.dragObject!=currentRow){jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,currentRow)}}}return false},findDropTargetRow:function(draggedRow,y){var rows=jQuery.tableDnD.currentTable.rows;for(var i=0;i<rows.length;i++){var row=rows[i];var rowY=this.getPosition(row).y;var rowHeight=parseInt(row.offsetHeight)/2;if(row.offsetHeight==0){rowY=this.getPosition(row.firstChild).y;rowHeight=parseInt(row.firstChild.offsetHeight)/2}if((y>rowY-rowHeight)&&(y<(rowY+rowHeight))){if(row==draggedRow){return null}var config=jQuery.tableDnD.currentTable.tableDnDConfig;if(config.onAllowDrop){if(config.onAllowDrop(draggedRow,row)){return row}else{return null}}else{var nodrop=jQuery(row).hasClass("nodrop");if(!nodrop){return row}else{return null}}return row}}return null},mouseup:function(e){if(jQuery.tableDnD.currentTable&&jQuery.tableDnD.dragObject){jQuery(document).unbind(moveEvent,jQuery.tableDnD.mousemove).unbind(endEvent,jQuery.tableDnD.mouseup);var droppedRow=jQuery.tableDnD.dragObject;var config=jQuery.tableDnD.currentTable.tableDnDConfig;if(config.onDragClass){jQuery(droppedRow).removeClass(config.onDragClass)}else{jQuery(droppedRow).css(config.onDropStyle)}jQuery.tableDnD.dragObject=null;var newOrder=jQuery.tableDnD.serialize();if(config.onDrop&&(jQuery.tableDnD.originalOrder!=newOrder)){config.onDrop(jQuery.tableDnD.currentTable,droppedRow)}jQuery.tableDnD.currentTable=null}},serialize:function(){if(jQuery.tableDnD.currentTable){return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable)}else{return"Error: No Table id set, you need to set an id on your table and every row"}},serializeTable:function(table){var result="";var tableId=table.id;var rows=table.rows;for(var i=0;i<rows.length;i++){if(result.length>0)result+="&";var rowId=rows[i].id;if(rowId&&rowId&&table.tableDnDConfig&&table.tableDnDConfig.serializeRegexp){rowId=rowId.match(table.tableDnDConfig.serializeRegexp)[0]}result+=tableId+'[]='+rowId}return result},serializeTables:function(){var result="";this.each(function(){result+=jQuery.tableDnD.serializeTable(this)});return result}};jQuery.fn.extend({tableDnD:jQuery.tableDnD.build,tableDnDUpdate:jQuery.tableDnD.updateTables,tableDnDSerialize:jQuery.tableDnD.serializeTables}); \ No newline at end of file diff --git a/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd_0_5.js b/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd_0_5.js deleted file mode 100644 index d4c9fec296aee5cdc7fd9332624e6f6cfdda25ed..0000000000000000000000000000000000000000 --- a/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd_0_5.js +++ /dev/null @@ -1,382 +0,0 @@ -/** - * TableDnD plug-in for JQuery, allows you to drag and drop table rows - * You can set up various options to control how the system will work - * Copyright (c) Denis Howlett <denish@isocra.com> - * Licensed like jQuery, see http://docs.jquery.com/License. - * - * Configuration options: - * - * onDragStyle - * This is the style that is assigned to the row during drag. There are limitations to the styles that can be - * associated with a row (such as you can't assign a border--well you can, but it won't be - * displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as - * a map (as used in the jQuery css(...) function). - * onDropStyle - * This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations - * to what you can do. Also this replaces the original style, so again consider using onDragClass which - * is simply added and then removed on drop. - * onDragClass - * This class is added for the duration of the drag and then removed when the row is dropped. It is more - * flexible than using onDragStyle since it can be inherited by the row cells and other content. The default - * is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your - * stylesheet. - * onDrop - * Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table - * and the row that was dropped. You can work out the new order of the rows by using - * table.rows. - * onDragStart - * Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the - * table and the row which the user has started to drag. - * onAllowDrop - * Pass a function that will be called as a row is over another row. If the function returns true, allow - * dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under - * the cursor. It returns a boolean: true allows the drop, false doesn't allow it. - * scrollAmount - * This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the - * window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2, - * FF3 beta - * dragHandle - * This is the name of a class that you assign to one or more cells in each row that is draggable. If you - * specify this class, then you are responsible for setting cursor: move in the CSS and only these cells - * will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where - * the whole row is draggable. - * - * Other ways to control behaviour: - * - * Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows - * that you don't want to be draggable. - * - * Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form - * <tableID>[]=<rowID1>&<tableID>[]=<rowID2> so that you can send this back to the server. The table must have - * an ID as must all the rows. - * - * Other methods: - * - * $("...").tableDnDUpdate() - * Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells). - * This is useful if you have updated the table rows using Ajax and you want to make the table draggable again. - * The table maintains the original configuration (so you don't have to specify it again). - * - * $("...").tableDnDSerialize() - * Will serialize and return the serialized string as above, but for each of the matching tables--so it can be - * called from anywhere and isn't dependent on the currentTable being set up correctly before calling - * - * Known problems: - * - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0 - * - * Version 0.2: 2008-02-20 First public version - * Version 0.3: 2008-02-07 Added onDragStart option - * Made the scroll amount configurable (default is 5 as before) - * Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes - * Added onAllowDrop to control dropping - * Fixed a bug which meant that you couldn't set the scroll amount in both directions - * Added serialize method - * Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row - * draggable - * Improved the serialize method to use a default (and settable) regular expression. - * Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table - */ -jQuery.tableDnD = { - /** Keep hold of the current table being dragged */ - currentTable : null, - /** Keep hold of the current drag object if any */ - dragObject: null, - /** The current mouse offset */ - mouseOffset: null, - /** Remember the old value of Y so that we don't do too much processing */ - oldY: 0, - - /** Actually build the structure */ - build: function(options) { - // Set up the defaults if any - - this.each(function() { - // This is bound to each matching table, set up the defaults and override with user options - this.tableDnDConfig = jQuery.extend({ - onDragStyle: null, - onDropStyle: null, - // Add in the default class for whileDragging - onDragClass: "tDnD_whileDrag", - onDrop: null, - onDragStart: null, - scrollAmount: 5, - serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs - serializeParamName: null, // If you want to specify another parameter name instead of the table ID - dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable - }, options || {}); - // Now make the rows draggable - jQuery.tableDnD.makeDraggable(this); - }); - - // Now we need to capture the mouse up and mouse move event - // We can use bind so that we don't interfere with other event handlers - jQuery(document) - .bind('mousemove', jQuery.tableDnD.mousemove) - .bind('mouseup', jQuery.tableDnD.mouseup); - - // Don't break the chain - return this; - }, - - /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */ - makeDraggable: function(table) { - var config = table.tableDnDConfig; - if (table.tableDnDConfig.dragHandle) { - // We only need to add the event to the specified cells - var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table); - cells.each(function() { - // The cell is bound to "this" - jQuery(this).mousedown(function(ev) { - jQuery.tableDnD.dragObject = this.parentNode; - jQuery.tableDnD.currentTable = table; - jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev); - if (config.onDragStart) { - // Call the onDrop method if there is one - config.onDragStart(table, this); - } - return false; - }); - }) - } else { - // For backwards compatibility, we add the event to the whole row - var rows = jQuery("tr", table); // get all the rows as a wrapped set - rows.each(function() { - // Iterate through each row, the row is bound to "this" - var row = jQuery(this); - if (! row.hasClass("nodrag")) { - row.mousedown(function(ev) { - if (ev.target.tagName == "TD") { - jQuery.tableDnD.dragObject = this; - jQuery.tableDnD.currentTable = table; - jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev); - if (config.onDragStart) { - // Call the onDrop method if there is one - config.onDragStart(table, this); - } - return false; - } - }).css("cursor", "move"); // Store the tableDnD object - } - }); - } - }, - - updateTables: function() { - this.each(function() { - // this is now bound to each matching table - if (this.tableDnDConfig) { - jQuery.tableDnD.makeDraggable(this); - } - }) - }, - - /** Get the mouse coordinates from the event (allowing for browser differences) */ - mouseCoords: function(ev){ - if(ev.pageX || ev.pageY){ - return {x:ev.pageX, y:ev.pageY}; - } - return { - x:ev.clientX + document.body.scrollLeft - document.body.clientLeft, - y:ev.clientY + document.body.scrollTop - document.body.clientTop - }; - }, - - /** Given a target element and a mouse event, get the mouse offset from that element. - To do this we need the element's position and the mouse position */ - getMouseOffset: function(target, ev) { - ev = ev || window.event; - - var docPos = this.getPosition(target); - var mousePos = this.mouseCoords(ev); - return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y}; - }, - - /** Get the position of an element by going up the DOM tree and adding up all the offsets */ - getPosition: function(e){ - var left = 0; - var top = 0; - /** Safari fix -- thanks to Luis Chato for this! */ - if (e.offsetHeight == 0) { - /** Safari 2 doesn't correctly grab the offsetTop of a table row - this is detailed here: - http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/ - the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild. - note that firefox will return a text node as a first child, so designing a more thorough - solution may need to take that into account, for now this seems to work in firefox, safari, ie */ - e = e.firstChild; // a table cell - } - - while (e.offsetParent){ - left += e.offsetLeft; - top += e.offsetTop; - e = e.offsetParent; - } - - left += e.offsetLeft; - top += e.offsetTop; - - return {x:left, y:top}; - }, - - mousemove: function(ev) { - if (jQuery.tableDnD.dragObject == null) { - return; - } - - var dragObj = jQuery(jQuery.tableDnD.dragObject); - var config = jQuery.tableDnD.currentTable.tableDnDConfig; - var mousePos = jQuery.tableDnD.mouseCoords(ev); - var y = mousePos.y - jQuery.tableDnD.mouseOffset.y; - //auto scroll the window - var yOffset = window.pageYOffset; - if (document.all) { - // Windows version - //yOffset=document.body.scrollTop; - if (typeof document.compatMode != 'undefined' && - document.compatMode != 'BackCompat') { - yOffset = document.documentElement.scrollTop; - } - else if (typeof document.body != 'undefined') { - yOffset=document.body.scrollTop; - } - - } - - if (mousePos.y-yOffset < config.scrollAmount) { - window.scrollBy(0, -config.scrollAmount); - } else { - var windowHeight = window.innerHeight ? window.innerHeight - : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight; - if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) { - window.scrollBy(0, config.scrollAmount); - } - } - - - if (y != jQuery.tableDnD.oldY) { - // work out if we're going up or down... - var movingDown = y > jQuery.tableDnD.oldY; - // update the old value - jQuery.tableDnD.oldY = y; - // update the style to show we're dragging - if (config.onDragClass) { - dragObj.addClass(config.onDragClass); - } else { - dragObj.css(config.onDragStyle); - } - // If we're over a row then move the dragged row to there so that the user sees the - // effect dynamically - var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y); - if (currentRow) { - // TODO worry about what happens when there are multiple TBODIES - if (movingDown && jQuery.tableDnD.dragObject != currentRow) { - jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling); - } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) { - jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow); - } - } - } - - return false; - }, - - /** We're only worried about the y position really, because we can only move rows up and down */ - findDropTargetRow: function(draggedRow, y) { - var rows = jQuery.tableDnD.currentTable.rows; - for (var i=0; i<rows.length; i++) { - var row = rows[i]; - var rowY = this.getPosition(row).y; - var rowHeight = parseInt(row.offsetHeight)/2; - if (row.offsetHeight == 0) { - rowY = this.getPosition(row.firstChild).y; - rowHeight = parseInt(row.firstChild.offsetHeight)/2; - } - // Because we always have to insert before, we need to offset the height a bit - if ((y > rowY - rowHeight) && (y < (rowY + rowHeight))) { - // that's the row we're over - // If it's the same as the current row, ignore it - if (row == draggedRow) {return null;} - var config = jQuery.tableDnD.currentTable.tableDnDConfig; - if (config.onAllowDrop) { - if (config.onAllowDrop(draggedRow, row)) { - return row; - } else { - return null; - } - } else { - // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic) - var nodrop = jQuery(row).hasClass("nodrop"); - if (! nodrop) { - return row; - } else { - return null; - } - } - return row; - } - } - return null; - }, - - mouseup: function(e) { - if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) { - var droppedRow = jQuery.tableDnD.dragObject; - var config = jQuery.tableDnD.currentTable.tableDnDConfig; - // If we have a dragObject, then we need to release it, - // The row will already have been moved to the right place so we just reset stuff - if (config.onDragClass) { - jQuery(droppedRow).removeClass(config.onDragClass); - } else { - jQuery(droppedRow).css(config.onDropStyle); - } - jQuery.tableDnD.dragObject = null; - if (config.onDrop) { - // Call the onDrop method if there is one - config.onDrop(jQuery.tableDnD.currentTable, droppedRow); - } - jQuery.tableDnD.currentTable = null; // let go of the table too - } - }, - - serialize: function() { - if (jQuery.tableDnD.currentTable) { - return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable); - } else { - return "Error: No Table id set, you need to set an id on your table and every row"; - } - }, - - serializeTable: function(table) { - var result = ""; - var tableId = table.id; - var rows = table.rows; - for (var i=0; i<rows.length; i++) { - if (result.length > 0) result += "&"; - var rowId = rows[i].id; - if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) { - rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0]; - } - - result += tableId + '[]=' + rowId; - } - return result; - }, - - serializeTables: function() { - var result = ""; - this.each(function() { - // this is now bound to each matching table - result += jQuery.tableDnD.serializeTable(this); - }); - return result; - } - -} - -jQuery.fn.extend( - { - tableDnD : jQuery.tableDnD.build, - tableDnDUpdate : jQuery.tableDnD.updateTables, - tableDnDSerialize: jQuery.tableDnD.serializeTables - } -); \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 941db5e5f13ed97253659e13560bcfd6305d2476..48231e64bbc2d9f146583f8162bdd59cfb3aef9a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1054,7 +1054,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n"; if (constant('JS_JQUERY_UI')) print '<script type="text/javascript" src="'.JS_JQUERY_UI.'jquery-ui.min.js"></script>'."\n"; else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui-latest.custom.min'.$ext.'"></script>'."\n"; - print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd_0_5'.$ext.'"></script>'."\n"; + print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min'.$ext.'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/jquery.tipTip.min'.$ext.'"></script>'."\n"; // jQuery Layout if (! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT')) diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 842c2163202c3a7d71fa2a078288506761b8b966..4b30b01ad69495efd1e01ed3213e9825de9bd531 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -127,8 +127,8 @@ if ($result) print '<tr class="liste_total">'; print '<td colspan="2" align="right">'.$langs->trans("Total").'</td>'; - print '<td align="right">'.price(price2num($total,'MT')).' '.$langs->trans('Currency'.$conf->currency).'</td>'; - print '<td align="right">'.price(price2num($totalsell,'MT')).' '.$langs->trans('Currency'.$conf->currency).'</td>'; + print '<td align="right">'.price(price2num($total,'MT'),1,$langs,0,0,-1,$conf->currency).'</td>'; + print '<td align="right">'.price(price2num($totalsell,'MT'),1,$langs,0,0,-1,$conf->currency).'</td>'; print '<td align="right"> </td>'; print "</tr>\n"; @@ -158,7 +158,8 @@ else dol_print_error($db); } -$db->close(); llxFooter(); + +$db->close(); ?> diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index add9a5f1b5cd7d10ddf5943439cb0ae046324ae9..5a18c9b9bcc0ede1bab8311283b2ff305e6a2a98 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -194,6 +194,8 @@ class CompanyBankAccount extends Account */ function getRibLabel() { + global $langs; + if ($this->code_banque || $this->code_guichet || $this->number || $this->cle_rib) { $rib = $this->code_banque." ".$this->code_guichet." ".$this->number; diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index edd860426aaa7022b71a1c3ef9c4862c67246d79..77a382d9d0ed4377ed103101b0149770b8f655ab 100644 --- a/htdocs/user/logout.php +++ b/htdocs/user/logout.php @@ -76,9 +76,10 @@ session_name($sessionname); session_destroy(); dol_syslog("End of session ".$sessionname); -// TODO Not sure this is required +// Not sure this is required unset($_SESSION['dol_login']); unset($_SESSION['dol_entity']); -header("Location: ".$url); -?> +if (GETPOST('noredirect')) return; +header("Location: ".$url); // Default behaviour is redirect to index.php page +?> \ No newline at end of file diff --git a/test/soapui/Dolibarr-soapui-project.xml b/test/soapui/Dolibarr-soapui-project.xml index 5c00d85eb04a7e452e5dedcb9bb4a2ac905e60e3..0dad335ed67a4c42bd74a00af5a0a54c00c03827 100755 --- a/test/soapui/Dolibarr-soapui-project.xml +++ b/test/soapui/Dolibarr-soapui-project.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="UTF-8"?> <con:soapui-project name="Dolibarr" soapui-version="4.0.1" abortOnError="false" runType="SEQUENTIAL" resourceRoot="" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="WebServicesDolibarrOtherBinding" type="wsdl" bindingName="{http://www.dolibarr.org/ns/}WebServicesDolibarrOtherBinding" soapVersion="1_1" anonymous="optional" definition="http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl"><con:part><con:url>http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl</con:url><con:content><![CDATA[<definitions targetNamespace="http://www.dolibarr.org/ns/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.dolibarr.org/ns/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <xsd:schema targetNamespace="http://www.dolibarr.org/ns/"> @@ -757,285 +757,285 @@ <idthirdparty xsi:type="xsd:string">all</idthirdparty> </ns:getSupplierInvoicesForThirdParty> </soapenv:Body> -</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#getSupplierInvoicesForThirdParty"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="WebServicesDolibarrProductOrServiceBinding" type="wsdl" bindingName="{http://www.dolibarr.org/ns/}WebServicesDolibarrProductOrServiceBinding" soapVersion="1_1" anonymous="optional" definition="http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl"><con:part><con:url>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl</con:url><con:content><![CDATA[<definitions targetNamespace="http://www.dolibarr.org/ns/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.dolibarr.org/ns/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> - <types> - <xsd:schema targetNamespace="http://www.dolibarr.org/ns/"> - <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> - <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/> - <xsd:complexType name="authentication"> - <xsd:all> - <xsd:element name="dolibarrkey" type="xsd:string"/> - <xsd:element name="sourceapplication" type="xsd:string"/> - <xsd:element name="login" type="xsd:string"/> - <xsd:element name="password" type="xsd:string"/> - <xsd:element name="entity" type="xsd:string"/> - </xsd:all> - </xsd:complexType> - <xsd:complexType name="result"> - <xsd:all> - <xsd:element name="result_code" type="xsd:string"/> - <xsd:element name="result_label" type="xsd:string"/> - </xsd:all> - </xsd:complexType> - <xsd:complexType name="product"> - <xsd:all> - <xsd:element name="id" type="xsd:string"/> - <xsd:element name="ref" type="xsd:string"/> - <xsd:element name="ref_ext" type="xsd:string"/> - <xsd:element name="type" type="xsd:string"/> - <xsd:element name="label" type="xsd:string"/> - <xsd:element name="description" type="xsd:string"/> - <xsd:element name="date_creation" type="xsd:dateTime"/> - <xsd:element name="date_modification" type="xsd:dateTime"/> - <xsd:element name="note" type="xsd:string"/> - <xsd:element name="status_tobuy" type="xsd:string"/> - <xsd:element name="status_tosell" type="xsd:string"/> - <xsd:element name="barcode" type="xsd:string"/> - <xsd:element name="barcode_type" type="xsd:string"/> - <xsd:element name="country_id" type="xsd:string"/> - <xsd:element name="country_code" type="xsd:string"/> - <xsd:element name="customcode" type="xsd:string"/> - <xsd:element name="price_net" type="xsd:string"/> - <xsd:element name="price" type="xsd:string"/> - <xsd:element name="price_min_net" type="xsd:string"/> - <xsd:element name="price_min" type="xsd:string"/> - <xsd:element name="price_base_type" type="xsd:string"/> - <xsd:element name="vat_rate" type="xsd:string"/> - <xsd:element name="vat_npr" type="xsd:string"/> - <xsd:element name="localtax1_tx" type="xsd:string"/> - <xsd:element name="localtax2_tx" type="xsd:string"/> - <xsd:element name="stock_alert" type="xsd:string"/> - <xsd:element name="stock_real" type="xsd:string"/> - <xsd:element name="stock_pmp" type="xsd:string"/> - <xsd:element name="canvas" type="xsd:string"/> - <xsd:element name="import_key" type="xsd:string"/> - <xsd:element name="dir" type="xsd:string"/> - <xsd:element name="images" type="tns:ImagesArray"/> - </xsd:all> - </xsd:complexType> - <xsd:complexType name="ImagesArray"> - <xsd:sequence> - <xsd:element name="image" type="tns:image" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:complexType> - <xsd:complexType name="image"> - <xsd:all> - <xsd:element name="photo" type="xsd:string"/> - <xsd:element name="photo_vignette" type="xsd:string"/> - <xsd:element name="imgWidth" type="xsd:string"/> - <xsd:element name="imgHeight" type="xsd:string"/> - </xsd:all> - </xsd:complexType> - <xsd:complexType name="filterproduct"> - <xsd:all> - <xsd:element name="type" type="xsd:string"/> - <xsd:element name="status_tobuy" type="xsd:string"/> - <xsd:element name="status_tosell" type="xsd:string"/> - </xsd:all> - </xsd:complexType> - <xsd:complexType name="ProductsArray2"> - <xsd:sequence> - <xsd:element name="product" type="tns:product" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:complexType> - </xsd:schema> - </types> - <message name="getProductOrServiceRequest"> - <part name="authentication" type="tns:authentication"/> - <part name="id" type="xsd:string"/> - <part name="ref" type="xsd:string"/> - <part name="ref_ext" type="xsd:string"/> - </message> - <message name="getProductOrServiceResponse"> - <part name="result" type="tns:result"/> - <part name="product" type="tns:product"/> - </message> - <message name="createProductOrServiceRequest"> - <part name="authentication" type="tns:authentication"/> - <part name="product" type="tns:product"/> - </message> - <message name="createProductOrServiceResponse"> - <part name="result" type="tns:result"/> - <part name="id" type="xsd:string"/> - </message> - <message name="getListOfProductsOrServicesRequest"> - <part name="authentication" type="tns:authentication"/> - <part name="filterproduct" type="tns:filterproduct"/> - </message> - <message name="getListOfProductsOrServicesResponse"> - <part name="result" type="tns:result"/> - <part name="products" type="tns:ProductsArray2"/> - </message> - <message name="getProductsForCategoryRequest"> - <part name="authentication" type="tns:authentication"/> - <part name="id" type="xsd:string"/> - </message> - <message name="getProductsForCategoryResponse"> - <part name="result" type="tns:result"/> - <part name="products" type="tns:ProductsArray2"/> - </message> - <portType name="WebServicesDolibarrProductOrServicePortType"> - <operation name="getProductOrService"> - <documentation>WS to get product or service</documentation> - <input message="tns:getProductOrServiceRequest"/> - <output message="tns:getProductOrServiceResponse"/> - </operation> - <operation name="createProductOrService"> - <documentation>WS to create a product or service</documentation> - <input message="tns:createProductOrServiceRequest"/> - <output message="tns:createProductOrServiceResponse"/> - </operation> - <operation name="getListOfProductsOrServices"> - <documentation>WS to get list of all products or services id and ref</documentation> - <input message="tns:getListOfProductsOrServicesRequest"/> - <output message="tns:getListOfProductsOrServicesResponse"/> - </operation> - <operation name="getProductsForCategory"> - <documentation>WS to get list of all products or services for a category</documentation> - <input message="tns:getProductsForCategoryRequest"/> - <output message="tns:getProductsForCategoryResponse"/> - </operation> - </portType> - <binding name="WebServicesDolibarrProductOrServiceBinding" type="tns:WebServicesDolibarrProductOrServicePortType"> - <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> - <operation name="getProductOrService"> - <soap:operation soapAction="http://www.dolibarr.org/ns/#getProductOrService" style="rpc"/> - <input> - <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> - </input> - <output> - <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> - </output> - </operation> - <operation name="createProductOrService"> - <soap:operation soapAction="http://www.dolibarr.org/ns/#createProductOrService" style="rpc"/> - <input> - <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> - </input> - <output> - <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> - </output> - </operation> - <operation name="getListOfProductsOrServices"> - <soap:operation soapAction="http://www.dolibarr.org/ns/#getListOfProductsOrServices" style="rpc"/> - <input> - <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> - </input> - <output> - <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> - </output> - </operation> - <operation name="getProductsForCategory"> - <soap:operation soapAction="http://www.dolibarr.org/ns/#getProductsForCategory" style="rpc"/> - <input> - <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> - </input> - <output> - <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> - </output> - </operation> - </binding> - <service name="WebServicesDolibarrProductOrService"> - <port name="WebServicesDolibarrProductOrServicePort" binding="tns:WebServicesDolibarrProductOrServiceBinding"> - <soap:address location="http://localhost/dolibarr/htdocs/webservices/server_productorservice.php"/> - </port> - </service> -</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:endpoint>http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint></con:endpoints><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#createProductOrService" name="createProductOrService" bindingOperationName="createProductOrService" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> - <SOAP-ENV:Body> - <ns8543:createProductOrService xmlns:ns8543="http://www.Dolibarr.org/ns/"> - <authentication> - <dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey> - <sourceapplication xsi:type="xsd:string">PRESTASHOP</sourceapplication> - <login xsi:type="xsd:string">admin</login> - <password xsi:type="xsd:string">admin</password> - <entity xsi:type="xsd:string"/> - </authentication> - <product> - <id xsi:type="xsd:string"/> - <ref xsi:type="xsd:string">aaa</ref> - <ref_ext xsi:type="xsd:string">aaa</ref_ext> - <type xsi:type="xsd:string">0</type> - <label xsi:type="xsd:string">Écouteurs à isolation sonore Shure SE210</label> - <description xsi:type="xsd:string">les couteurs isolation sonore ergonomiques et l gers offrent la reproduction audio la plus fid le en provenance de sources audio st r o portables ou de salon.</description> - <date_creation xsi:type="xsd:string">2013-03-06 09:24:51</date_creation> - <date_modification xsi:type="xsd:string">2013-03-06 09:24:51</date_modification> - <note xsi:type="xsd:string">imported from Prestashop</note> - <status_tobuy xsi:type="xsd:int">0</status_tobuy> - <status_tosell xsi:type="xsd:int">1</status_tosell> - <barcode xsi:type="xsd:string"/> - <barcode_type xsi:type="xsd:string">upc</barcode_type> - <country_id xsi:type="xsd:string"/> - <country_code xsi:type="xsd:string"/> - <customcode xsi:type="xsd:string"/> - <price_net xsi:type="xsd:string"/> - <price xsi:type="xsd:float">149</price> - <price_base_type xsi:type="xsd:string"/> - <stock_alert xsi:type="xsd:string"/> - <stock_real xsi:type="xsd:string">0</stock_real> - <stock_pmp xsi:type="xsd:string"/> - <canvas xsi:type="xsd:string"/> - <import_key xsi:type="xsd:string"/> - </product> - </ns8543:createProductOrService> - </SOAP-ENV:Body> -</SOAP-ENV:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#createProductOrService"/><con:wsrmConfig version="1.2"/></con:call><con:call name="Request 2"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/"> - <soapenv:Header/> - <soapenv:Body> - <ns:createProductOrService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> - <authentication xsi:type="ns:authentication"> - <!--You may enter the following 5 items in any order--> - <dolibarrkey xsi:type="xsd:string">?</dolibarrkey> - <sourceapplication xsi:type="xsd:string">?</sourceapplication> - <login xsi:type="xsd:string">?</login> - <password xsi:type="xsd:string">?</password> - <entity xsi:type="xsd:string">?</entity> - </authentication> - <product xsi:type="ns:product"> - <!--You may enter the following 32 items in any order--> - <id xsi:type="xsd:string">?</id> - <ref xsi:type="xsd:string">?</ref> - <ref_ext xsi:type="xsd:string">?</ref_ext> - <type xsi:type="xsd:string">?</type> - <label xsi:type="xsd:string">?</label> - <description xsi:type="xsd:string">?</description> - <date_creation xsi:type="xsd:dateTime">?</date_creation> - <date_modification xsi:type="xsd:dateTime">?</date_modification> - <note xsi:type="xsd:string">?</note> - <status_tobuy xsi:type="xsd:string">?</status_tobuy> - <status_tosell xsi:type="xsd:string">?</status_tosell> - <barcode xsi:type="xsd:string">?</barcode> - <barcode_type xsi:type="xsd:string">?</barcode_type> - <country_id xsi:type="xsd:string">?</country_id> - <country_code xsi:type="xsd:string">?</country_code> - <customcode xsi:type="xsd:string">?</customcode> - <price_net xsi:type="xsd:string">?</price_net> - <price xsi:type="xsd:string">?</price> - <price_min_net xsi:type="xsd:string">?</price_min_net> - <price_min xsi:type="xsd:string">?</price_min> - <price_base_type xsi:type="xsd:string">?</price_base_type> - <vat_rate xsi:type="xsd:string">?</vat_rate> - <vat_npr xsi:type="xsd:string">?</vat_npr> - <localtax1_tx xsi:type="xsd:string">?</localtax1_tx> - <localtax2_tx xsi:type="xsd:string">?</localtax2_tx> - <stock_alert xsi:type="xsd:string">?</stock_alert> - <stock_real xsi:type="xsd:string">?</stock_real> - <stock_pmp xsi:type="xsd:string">?</stock_pmp> - <canvas xsi:type="xsd:string">?</canvas> - <import_key xsi:type="xsd:string">?</import_key> - <dir xsi:type="xsd:string">?</dir> - <images xsi:type="ns:ImagesArray"> - <!--Zero or more repetitions:--> - <image xsi:type="ns:image"> - <!--You may enter the following 4 items in any order--> - <photo xsi:type="xsd:string">?</photo> - <photo_vignette xsi:type="xsd:string">?</photo_vignette> - <imgWidth xsi:type="xsd:string">?</imgWidth> - <imgHeight xsi:type="xsd:string">?</imgHeight> - </image> - </images> - </product> - </ns:createProductOrService> - </soapenv:Body> +</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#getSupplierInvoicesForThirdParty"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="WebServicesDolibarrProductOrServiceBinding" type="wsdl" bindingName="{http://www.dolibarr.org/ns/}WebServicesDolibarrProductOrServiceBinding" soapVersion="1_1" anonymous="optional" definition="http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl"><con:part><con:url>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl</con:url><con:content><![CDATA[<definitions targetNamespace="http://www.dolibarr.org/ns/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.dolibarr.org/ns/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> + <types> + <xsd:schema targetNamespace="http://www.dolibarr.org/ns/"> + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> + <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/> + <xsd:complexType name="authentication"> + <xsd:all> + <xsd:element name="dolibarrkey" type="xsd:string"/> + <xsd:element name="sourceapplication" type="xsd:string"/> + <xsd:element name="login" type="xsd:string"/> + <xsd:element name="password" type="xsd:string"/> + <xsd:element name="entity" type="xsd:string"/> + </xsd:all> + </xsd:complexType> + <xsd:complexType name="result"> + <xsd:all> + <xsd:element name="result_code" type="xsd:string"/> + <xsd:element name="result_label" type="xsd:string"/> + </xsd:all> + </xsd:complexType> + <xsd:complexType name="product"> + <xsd:all> + <xsd:element name="id" type="xsd:string"/> + <xsd:element name="ref" type="xsd:string"/> + <xsd:element name="ref_ext" type="xsd:string"/> + <xsd:element name="type" type="xsd:string"/> + <xsd:element name="label" type="xsd:string"/> + <xsd:element name="description" type="xsd:string"/> + <xsd:element name="date_creation" type="xsd:dateTime"/> + <xsd:element name="date_modification" type="xsd:dateTime"/> + <xsd:element name="note" type="xsd:string"/> + <xsd:element name="status_tobuy" type="xsd:string"/> + <xsd:element name="status_tosell" type="xsd:string"/> + <xsd:element name="barcode" type="xsd:string"/> + <xsd:element name="barcode_type" type="xsd:string"/> + <xsd:element name="country_id" type="xsd:string"/> + <xsd:element name="country_code" type="xsd:string"/> + <xsd:element name="customcode" type="xsd:string"/> + <xsd:element name="price_net" type="xsd:string"/> + <xsd:element name="price" type="xsd:string"/> + <xsd:element name="price_min_net" type="xsd:string"/> + <xsd:element name="price_min" type="xsd:string"/> + <xsd:element name="price_base_type" type="xsd:string"/> + <xsd:element name="vat_rate" type="xsd:string"/> + <xsd:element name="vat_npr" type="xsd:string"/> + <xsd:element name="localtax1_tx" type="xsd:string"/> + <xsd:element name="localtax2_tx" type="xsd:string"/> + <xsd:element name="stock_alert" type="xsd:string"/> + <xsd:element name="stock_real" type="xsd:string"/> + <xsd:element name="stock_pmp" type="xsd:string"/> + <xsd:element name="canvas" type="xsd:string"/> + <xsd:element name="import_key" type="xsd:string"/> + <xsd:element name="dir" type="xsd:string"/> + <xsd:element name="images" type="tns:ImagesArray"/> + </xsd:all> + </xsd:complexType> + <xsd:complexType name="ImagesArray"> + <xsd:sequence> + <xsd:element name="image" type="tns:image" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="image"> + <xsd:all> + <xsd:element name="photo" type="xsd:string"/> + <xsd:element name="photo_vignette" type="xsd:string"/> + <xsd:element name="imgWidth" type="xsd:string"/> + <xsd:element name="imgHeight" type="xsd:string"/> + </xsd:all> + </xsd:complexType> + <xsd:complexType name="filterproduct"> + <xsd:all> + <xsd:element name="type" type="xsd:string"/> + <xsd:element name="status_tobuy" type="xsd:string"/> + <xsd:element name="status_tosell" type="xsd:string"/> + </xsd:all> + </xsd:complexType> + <xsd:complexType name="ProductsArray2"> + <xsd:sequence> + <xsd:element name="product" type="tns:product" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + </xsd:schema> + </types> + <message name="getProductOrServiceRequest"> + <part name="authentication" type="tns:authentication"/> + <part name="id" type="xsd:string"/> + <part name="ref" type="xsd:string"/> + <part name="ref_ext" type="xsd:string"/> + </message> + <message name="getProductOrServiceResponse"> + <part name="result" type="tns:result"/> + <part name="product" type="tns:product"/> + </message> + <message name="createProductOrServiceRequest"> + <part name="authentication" type="tns:authentication"/> + <part name="product" type="tns:product"/> + </message> + <message name="createProductOrServiceResponse"> + <part name="result" type="tns:result"/> + <part name="id" type="xsd:string"/> + </message> + <message name="getListOfProductsOrServicesRequest"> + <part name="authentication" type="tns:authentication"/> + <part name="filterproduct" type="tns:filterproduct"/> + </message> + <message name="getListOfProductsOrServicesResponse"> + <part name="result" type="tns:result"/> + <part name="products" type="tns:ProductsArray2"/> + </message> + <message name="getProductsForCategoryRequest"> + <part name="authentication" type="tns:authentication"/> + <part name="id" type="xsd:string"/> + </message> + <message name="getProductsForCategoryResponse"> + <part name="result" type="tns:result"/> + <part name="products" type="tns:ProductsArray2"/> + </message> + <portType name="WebServicesDolibarrProductOrServicePortType"> + <operation name="getProductOrService"> + <documentation>WS to get product or service</documentation> + <input message="tns:getProductOrServiceRequest"/> + <output message="tns:getProductOrServiceResponse"/> + </operation> + <operation name="createProductOrService"> + <documentation>WS to create a product or service</documentation> + <input message="tns:createProductOrServiceRequest"/> + <output message="tns:createProductOrServiceResponse"/> + </operation> + <operation name="getListOfProductsOrServices"> + <documentation>WS to get list of all products or services id and ref</documentation> + <input message="tns:getListOfProductsOrServicesRequest"/> + <output message="tns:getListOfProductsOrServicesResponse"/> + </operation> + <operation name="getProductsForCategory"> + <documentation>WS to get list of all products or services for a category</documentation> + <input message="tns:getProductsForCategoryRequest"/> + <output message="tns:getProductsForCategoryResponse"/> + </operation> + </portType> + <binding name="WebServicesDolibarrProductOrServiceBinding" type="tns:WebServicesDolibarrProductOrServicePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="getProductOrService"> + <soap:operation soapAction="http://www.dolibarr.org/ns/#getProductOrService" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="createProductOrService"> + <soap:operation soapAction="http://www.dolibarr.org/ns/#createProductOrService" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="getListOfProductsOrServices"> + <soap:operation soapAction="http://www.dolibarr.org/ns/#getListOfProductsOrServices" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="getProductsForCategory"> + <soap:operation soapAction="http://www.dolibarr.org/ns/#getProductsForCategory" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.dolibarr.org/ns/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + </binding> + <service name="WebServicesDolibarrProductOrService"> + <port name="WebServicesDolibarrProductOrServicePort" binding="tns:WebServicesDolibarrProductOrServiceBinding"> + <soap:address location="http://localhost/dolibarr/htdocs/webservices/server_productorservice.php"/> + </port> + </service> +</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:endpoint>http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint></con:endpoints><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#createProductOrService" name="createProductOrService" bindingOperationName="createProductOrService" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> + <SOAP-ENV:Body> + <ns8543:createProductOrService xmlns:ns8543="http://www.Dolibarr.org/ns/"> + <authentication> + <dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey> + <sourceapplication xsi:type="xsd:string">PRESTASHOP</sourceapplication> + <login xsi:type="xsd:string">admin</login> + <password xsi:type="xsd:string">admin</password> + <entity xsi:type="xsd:string"/> + </authentication> + <product> + <id xsi:type="xsd:string"/> + <ref xsi:type="xsd:string">aaa</ref> + <ref_ext xsi:type="xsd:string">aaa</ref_ext> + <type xsi:type="xsd:string">0</type> + <label xsi:type="xsd:string">Écouteurs à isolation sonore Shure SE210</label> + <description xsi:type="xsd:string">les couteurs isolation sonore ergonomiques et l gers offrent la reproduction audio la plus fid le en provenance de sources audio st r o portables ou de salon.</description> + <date_creation xsi:type="xsd:string">2013-03-06 09:24:51</date_creation> + <date_modification xsi:type="xsd:string">2013-03-06 09:24:51</date_modification> + <note xsi:type="xsd:string">imported from Prestashop</note> + <status_tobuy xsi:type="xsd:int">0</status_tobuy> + <status_tosell xsi:type="xsd:int">1</status_tosell> + <barcode xsi:type="xsd:string"/> + <barcode_type xsi:type="xsd:string">upc</barcode_type> + <country_id xsi:type="xsd:string"/> + <country_code xsi:type="xsd:string"/> + <customcode xsi:type="xsd:string"/> + <price_net xsi:type="xsd:string"/> + <price xsi:type="xsd:float">149</price> + <price_base_type xsi:type="xsd:string"/> + <stock_alert xsi:type="xsd:string"/> + <stock_real xsi:type="xsd:string">0</stock_real> + <stock_pmp xsi:type="xsd:string"/> + <canvas xsi:type="xsd:string"/> + <import_key xsi:type="xsd:string"/> + </product> + </ns8543:createProductOrService> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#createProductOrService"/><con:wsrmConfig version="1.2"/></con:call><con:call name="Request 2"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/"> + <soapenv:Header/> + <soapenv:Body> + <ns:createProductOrService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> + <authentication xsi:type="ns:authentication"> + <!--You may enter the following 5 items in any order--> + <dolibarrkey xsi:type="xsd:string">?</dolibarrkey> + <sourceapplication xsi:type="xsd:string">?</sourceapplication> + <login xsi:type="xsd:string">?</login> + <password xsi:type="xsd:string">?</password> + <entity xsi:type="xsd:string">?</entity> + </authentication> + <product xsi:type="ns:product"> + <!--You may enter the following 32 items in any order--> + <id xsi:type="xsd:string">?</id> + <ref xsi:type="xsd:string">?</ref> + <ref_ext xsi:type="xsd:string">?</ref_ext> + <type xsi:type="xsd:string">?</type> + <label xsi:type="xsd:string">?</label> + <description xsi:type="xsd:string">?</description> + <date_creation xsi:type="xsd:dateTime">?</date_creation> + <date_modification xsi:type="xsd:dateTime">?</date_modification> + <note xsi:type="xsd:string">?</note> + <status_tobuy xsi:type="xsd:string">?</status_tobuy> + <status_tosell xsi:type="xsd:string">?</status_tosell> + <barcode xsi:type="xsd:string">?</barcode> + <barcode_type xsi:type="xsd:string">?</barcode_type> + <country_id xsi:type="xsd:string">?</country_id> + <country_code xsi:type="xsd:string">?</country_code> + <customcode xsi:type="xsd:string">?</customcode> + <price_net xsi:type="xsd:string">?</price_net> + <price xsi:type="xsd:string">?</price> + <price_min_net xsi:type="xsd:string">?</price_min_net> + <price_min xsi:type="xsd:string">?</price_min> + <price_base_type xsi:type="xsd:string">?</price_base_type> + <vat_rate xsi:type="xsd:string">?</vat_rate> + <vat_npr xsi:type="xsd:string">?</vat_npr> + <localtax1_tx xsi:type="xsd:string">?</localtax1_tx> + <localtax2_tx xsi:type="xsd:string">?</localtax2_tx> + <stock_alert xsi:type="xsd:string">?</stock_alert> + <stock_real xsi:type="xsd:string">?</stock_real> + <stock_pmp xsi:type="xsd:string">?</stock_pmp> + <canvas xsi:type="xsd:string">?</canvas> + <import_key xsi:type="xsd:string">?</import_key> + <dir xsi:type="xsd:string">?</dir> + <images xsi:type="ns:ImagesArray"> + <!--Zero or more repetitions:--> + <image xsi:type="ns:image"> + <!--You may enter the following 4 items in any order--> + <photo xsi:type="xsd:string">?</photo> + <photo_vignette xsi:type="xsd:string">?</photo_vignette> + <imgWidth xsi:type="xsd:string">?</imgWidth> + <imgHeight xsi:type="xsd:string">?</imgHeight> + </image> + </images> + </product> + </ns:createProductOrService> + </soapenv:Body> </soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#createProductOrService"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#getProductOrService" name="getProductOrService" bindingOperationName="getProductOrService" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/"> <soapenv:Header/> <soapenv:Body>