Removed TODO and deprecated files
This commit is contained in:
parent
92464b40e7
commit
cdc6493ba5
@ -1,4 +1,4 @@
|
|||||||
#Mon Mar 09 12:23:31 CET 2009
|
#Mon Mar 09 21:45:56 CET 2009
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//dev/initdemo/initdemo.sql=UTF-8
|
encoding//dev/initdemo/initdemo.sql=UTF-8
|
||||||
encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1
|
encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1
|
||||||
@ -640,6 +640,7 @@ encoding//htdocs/theme/yellow/yellow.css.php=ISO-8859-1
|
|||||||
encoding//htdocs/user.class.php=ISO-8859-1
|
encoding//htdocs/user.class.php=ISO-8859-1
|
||||||
encoding//htdocs/user/modules/login.anakin.class.php=ISO-8859-1
|
encoding//htdocs/user/modules/login.anakin.class.php=ISO-8859-1
|
||||||
encoding//htdocs/user/param_ihm.php=ISO-8859-1
|
encoding//htdocs/user/param_ihm.php=ISO-8859-1
|
||||||
|
encoding//htdocs/webservices/server.wsdl=UTF-8
|
||||||
encoding//mysql/data/data.sql=UTF-8
|
encoding//mysql/data/data.sql=UTF-8
|
||||||
encoding//scripts/banque/graph-solde.php=ISO-8859-1
|
encoding//scripts/banque/graph-solde.php=ISO-8859-1
|
||||||
encoding//scripts/mailing/mailing-send.php=ISO-8859-1
|
encoding//scripts/mailing/mailing-send.php=ISO-8859-1
|
||||||
|
|||||||
@ -24,7 +24,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php";
|
include_once(DOL_DOCUMENT_ROOT."/lib/databases/".$conf->db->type.".lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("user");
|
$langs->load("user");
|
||||||
@ -47,20 +48,16 @@ print info_admin($langs->trans("SystemInfoDesc")).'<br>';
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">Dolibarr</td></tr>\n";
|
print "<tr class=\"liste_titre\"><td colspan=\"2\">Dolibarr</td></tr>\n";
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>" . DOL_VERSION . "</td></tr>\n";
|
$dolversion=version_dolibarr();
|
||||||
|
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$dolversion."</td></tr>\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("OS")."</td></tr>\n";
|
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("OS")."</td></tr>\n";
|
||||||
// Récupère la version de l'OS
|
$phpversion=version_os();
|
||||||
ob_start();
|
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n";
|
||||||
phpinfo();
|
|
||||||
$chaine = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
eregi('System </td><td class="v">([^\/]*)</td>',$chaine,$reg);
|
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$reg[1]."</td></tr>\n";
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
@ -68,7 +65,8 @@ print "<br>\n";
|
|||||||
// Serveur web
|
// Serveur web
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("WebServer")."</td></tr>\n";
|
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("WebServer")."</td></tr>\n";
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$_SERVER["SERVER_SOFTWARE"]."</td></tr>\n";
|
$apacheversion=version_webserver();
|
||||||
|
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$apacheversion."</td></tr>\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
@ -76,7 +74,7 @@ print "<br>\n";
|
|||||||
// Php
|
// Php
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Php")."</td></tr>\n";
|
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Php")."</td></tr>\n";
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".phpversion()."</td></tr>\n";
|
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".version_php()."</td></tr>\n";
|
||||||
print "<tr $bc[1]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n";
|
print "<tr $bc[1]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -1,160 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
||||||
*
|
|
||||||
* 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 2 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, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
\file htdocs/comm/action/indexactions.php
|
|
||||||
\ingroup agenda
|
|
||||||
\brief Actions area
|
|
||||||
\version $Id$
|
|
||||||
\TODO This file is deprecated. Not more reach.
|
|
||||||
*/
|
|
||||||
|
|
||||||
require_once("./pre.inc.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/client.class.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php");
|
|
||||||
|
|
||||||
$langs->load("companies");
|
|
||||||
$langs->load("commercial");
|
|
||||||
$langs->load("agenda");
|
|
||||||
|
|
||||||
$page = $_GET["page"];
|
|
||||||
$sortfield=$_GET["sortfield"];
|
|
||||||
$sortorder=$_GET["sortorder"];
|
|
||||||
if ($page == -1) { $page = 0 ; }
|
|
||||||
$limit = $conf->liste_limit;
|
|
||||||
$offset = $limit * $page ;
|
|
||||||
if (! $sortorder) $sortorder="DESC";
|
|
||||||
if (! $sortfield) $sortfield="a.datep";
|
|
||||||
|
|
||||||
// Sécurité accés client
|
|
||||||
if ($user->societe_id > 0)
|
|
||||||
{
|
|
||||||
$action = '';
|
|
||||||
$socid = $user->societe_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Actions
|
|
||||||
*/
|
|
||||||
if ($_GET["action"] == 'builddoc')
|
|
||||||
{
|
|
||||||
$cat = new CommActionRapport($db, $_GET["month"], $_GET["year"]);
|
|
||||||
$result=$cat->generate($_GET["id"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action=='delete_action')
|
|
||||||
{
|
|
||||||
$actioncomm = new ActionComm($db);
|
|
||||||
$actioncomm->fetch($actionid);
|
|
||||||
$result=$actioncomm->delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Affichage liste
|
|
||||||
*/
|
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("ActionsArea"));
|
|
||||||
|
|
||||||
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
|
||||||
|
|
||||||
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
|
||||||
|
|
||||||
// Search actions
|
|
||||||
/*
|
|
||||||
$var=false;
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/action/listactions.php">';
|
|
||||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAnAction").'</td></tr>';
|
|
||||||
print '<tr '.$bc[$var].'><td>';
|
|
||||||
print $langs->trans("Keyword").':</td><td><input type="text" class="flat" name="sf_ref" size="18"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
|
||||||
print '</tr>';
|
|
||||||
print "</form></table><br>\n";
|
|
||||||
*/
|
|
||||||
|
|
||||||
$var=true;
|
|
||||||
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/action/listactions.php">';
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("ViewWithPredefinedFilters").'</td></tr>';
|
|
||||||
// All actions of everybody
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'><td>';
|
|
||||||
print $langs->trans("AllActions").'</td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php">';
|
|
||||||
print img_picto($langs->trans("ViewList"),'object_list').'</a></td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/index.php">';
|
|
||||||
print img_picto($langs->trans("ViewCal"),'object_calendar').'</a></td>';
|
|
||||||
print '</tr>';
|
|
||||||
// All my actions
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'><td>';
|
|
||||||
print $langs->trans("AllMyActions").'</td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?filter=mine">';
|
|
||||||
print img_picto($langs->trans("ViewList"),'object_list').'</a></td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/index.php?filter=mine">';
|
|
||||||
print img_picto($langs->trans("ViewCal"),'object_calendar').'</a></td>';
|
|
||||||
print '</tr>';
|
|
||||||
// Actions i asked
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'><td> ';
|
|
||||||
print $langs->trans("MyActionsAsked").'</td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?filtera='.$user->id.'">';
|
|
||||||
print img_picto($langs->trans("ViewList"),'object_list').'</a></td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/index.php?filtera='.$user->id.'">';
|
|
||||||
print img_picto($langs->trans("ViewCal"),'object_calendar').'</a></td>';
|
|
||||||
print '</tr>';
|
|
||||||
// Actions affected to me
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'><td> ';
|
|
||||||
print $langs->trans("MyActionsToDo").'</td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?filtert='.$user->id.'">';
|
|
||||||
print img_picto($langs->trans("ViewList"),'object_list').'</a></td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/index.php?filtert='.$user->id.'">';
|
|
||||||
print img_picto($langs->trans("ViewCal"),'object_calendar').'</a></td>';
|
|
||||||
print '</tr>';
|
|
||||||
// Actions done by me
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'><td> ';
|
|
||||||
print $langs->trans("MyActionsDone").'</td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?filterd='.$user->id.'">';
|
|
||||||
print img_picto($langs->trans("ViewList"),'object_list').'</a></td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/index.php?filterd='.$user->id.'">';
|
|
||||||
print img_picto($langs->trans("ViewCal"),'object_calendar').'</a></td>';
|
|
||||||
print '</tr>';
|
|
||||||
print "</table></form><br>\n";
|
|
||||||
|
|
||||||
|
|
||||||
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
|
||||||
|
|
||||||
if ($conf->agenda->enabled) show_array_actions_to_do(10);
|
|
||||||
|
|
||||||
if ($conf->agenda->enabled) show_array_last_actions_done(10);
|
|
||||||
|
|
||||||
print '</td></tr></table>';
|
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
|
||||||
?>
|
|
||||||
@ -410,7 +410,7 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
|
|||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
// \TODO G<EFBFBD>rer action <20>mettre paiement
|
// \TODO Gerer action emettre paiement
|
||||||
$resteapayer = 0;
|
$resteapayer = 0;
|
||||||
|
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
|
|||||||
print '<a class="butAction" href="fiche.php?rowid='.$don->id.'&action=valid_promesse">'.$langs->trans("ValidPromess").'</a>';
|
print '<a class="butAction" href="fiche.php?rowid='.$don->id.'&action=valid_promesse">'.$langs->trans("ValidPromess").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// \TODO G<EFBFBD>rer action <20>mettre paiement
|
// \TODO Gerer action emettre paiement
|
||||||
if ($don->statut == 1 && $resteapayer > 0)
|
if ($don->statut == 1 && $resteapayer > 0)
|
||||||
{
|
{
|
||||||
print "<a class=\"butAction\" href=\"paiement.php?facid=$facid&action=create\">".$langs->trans("DoPayment")."</a>";
|
print "<a class=\"butAction\" href=\"paiement.php?facid=$facid&action=create\">".$langs->trans("DoPayment")."</a>";
|
||||||
|
|||||||
@ -2863,7 +2863,7 @@ else
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO Select type (service or product)
|
// TODO Select type (service or product)
|
||||||
|
print $html->select_type_of_lines($objp->fk_product_type,'type',1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Description - Editor wysiwyg
|
// Description - Editor wysiwyg
|
||||||
|
|||||||
@ -608,7 +608,7 @@ class RemiseCheque extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='')
|
function getNomUrl($withpicto=0,$option='')
|
||||||
{
|
{
|
||||||
global $langs; // TODO Renvoyer le libell<EFBFBD> anglais et faire traduction a affichage
|
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
@ -634,14 +634,14 @@ class RemiseCheque extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoi le libell<EFBFBD> d'un statut donne
|
* \brief Renvoi le libelle d'un statut donne
|
||||||
* \param status Statut
|
* \param status Statut
|
||||||
* \param mode 0=libell<EFBFBD> long, 1=libell<EFBFBD> court, 2=Picto + Libell<EFBFBD> court, 3=Picto, 4=Picto + Libell<EFBFBD> long, 5=Libell<EFBFBD> court + Picto
|
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||||
* \return string Libell<EFBFBD> du statut
|
* \return string Libelle du statut
|
||||||
*/
|
*/
|
||||||
function LibStatut($status,$mode=0)
|
function LibStatut($status,$mode=0)
|
||||||
{
|
{
|
||||||
global $langs; // TODO Renvoyer le libell<EFBFBD> anglais et faire traduction a affichage
|
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
if ($mode == 0)
|
if ($mode == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -186,7 +186,6 @@ print '<br>';
|
|||||||
|
|
||||||
if ($conf->global->MAIN_MODULE_NOTIFICATION)
|
if ($conf->global->MAIN_MODULE_NOTIFICATION)
|
||||||
{
|
{
|
||||||
|
|
||||||
print_titre($langs->trans("Notifications"));
|
print_titre($langs->trans("Notifications"));
|
||||||
|
|
||||||
if ($user->rights->prelevement->bons->configurer)
|
if ($user->rights->prelevement->bons->configurer)
|
||||||
|
|||||||
@ -70,7 +70,7 @@ class Conf
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Definition de toutes les Constantes globales d'environnement
|
* Definition de toutes les Constantes globales d'environnement
|
||||||
* - En constante php (\TODO a virer)
|
* - En constante php (TODO a virer)
|
||||||
* - En $this->global->key=value
|
* - En $this->global->key=value
|
||||||
*/
|
*/
|
||||||
$sql = "SELECT name, value FROM ".MAIN_DB_PREFIX."const";
|
$sql = "SELECT name, value FROM ".MAIN_DB_PREFIX."const";
|
||||||
|
|||||||
@ -430,7 +430,7 @@ class FactureFournisseur extends Facture
|
|||||||
{
|
{
|
||||||
$mouvP = new MouvementStock($this->db);
|
$mouvP = new MouvementStock($this->db);
|
||||||
// We increase stock for product
|
// We increase stock for product
|
||||||
$entrepot_id = "1"; // TODO ajouter possibilité de choisir l'entrepot
|
$entrepot_id = "1"; // TODO ajouter possibilite de choisir l'entrepot
|
||||||
// TODO Add price of product in method or '' to update PMP
|
// TODO Add price of product in method or '' to update PMP
|
||||||
$result=$mouvP->reception($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty);
|
$result=$mouvP->reception($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty);
|
||||||
if ($result < 0) { $error++; }
|
if ($result < 0) { $error++; }
|
||||||
|
|||||||
@ -363,6 +363,50 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Return list of types of lines (product or service)
|
||||||
|
* \param selected Preselected type
|
||||||
|
* \param htmlname Name of field in form
|
||||||
|
* \param showempty Add an empty field
|
||||||
|
*/
|
||||||
|
function select_type_of_lines($selected='',$htmlname='type',$showempty=0)
|
||||||
|
{
|
||||||
|
global $db,$langs,$user,$conf;
|
||||||
|
$langs->load("trips");
|
||||||
|
|
||||||
|
if ($conf->produit->enabled && $conf->service->enabled)
|
||||||
|
{
|
||||||
|
print $langs->trans("Type").': ';
|
||||||
|
print '<select class="flat" name="'.$htmlname.'">';
|
||||||
|
if ($showempty)
|
||||||
|
{
|
||||||
|
print '<option value="-1"';
|
||||||
|
if ($selected == -1) print ' selected="true"';
|
||||||
|
print '> </option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<option value="0"';
|
||||||
|
if (0 == $selected) print ' selected="true"';
|
||||||
|
print '>'.$langs->trans("Product");
|
||||||
|
|
||||||
|
print '<option value="1"';
|
||||||
|
if (1 == $selected) print ' selected="true"';
|
||||||
|
print '>'.$langs->trans("Service");
|
||||||
|
|
||||||
|
print '</select>';
|
||||||
|
//if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||||
|
}
|
||||||
|
if (empty($conf->produit->enabled) && $conf->service->enabled)
|
||||||
|
{
|
||||||
|
print '<input type="hidden" name="'.$htmlname.'" value="1">';
|
||||||
|
}
|
||||||
|
if ($conf->produit->enabled && empty($conf->service->enabled))
|
||||||
|
{
|
||||||
|
print '<input type="hidden" name="'.$htmlname.'" value="0">';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return list of types of notes
|
* \brief Return list of types of notes
|
||||||
* \param selected Preselected type
|
* \param selected Preselected type
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$this->option_escompte = 1; // Affiche si il y a eu escompte
|
$this->option_escompte = 1; // Affiche si il y a eu escompte
|
||||||
$this->option_credit_note = 1; // Support credit notes
|
$this->option_credit_note = 1; // Support credit notes
|
||||||
$this->option_freetext = 1; // Support add of a personalised text
|
$this->option_freetext = 1; // Support add of a personalised text
|
||||||
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
|
||||||
|
|
||||||
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
|
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
|
||||||
$this->franchise=1;
|
$this->franchise=1;
|
||||||
|
|||||||
@ -75,8 +75,9 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$this->option_codeproduitservice = 1; // Affiche code produit-service
|
$this->option_codeproduitservice = 1; // Affiche code produit-service
|
||||||
$this->option_multilang = 1; // Dispo en plusieurs langues
|
$this->option_multilang = 1; // Dispo en plusieurs langues
|
||||||
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
||||||
$this->option_credit_note = 1; // Gere les avoirs
|
$this->option_credit_note = 1; // Support credit note
|
||||||
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
$this->option_freetext = 1; // Support add of a personalised text
|
||||||
|
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
|
||||||
|
|
||||||
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
|
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
|
||||||
$this->franchise=1;
|
$this->franchise=1;
|
||||||
|
|||||||
@ -320,8 +320,6 @@ if ($_POST["action"] == "set")
|
|||||||
// If values differs, we save conf file again
|
// If values differs, we save conf file again
|
||||||
//if ($check1 != $dolibarr_main_db_character_set) dolibarr_install_syslog('etape1: Value for character_set is not the one asked for database creation', LOG_WARNING);
|
//if ($check1 != $dolibarr_main_db_character_set) dolibarr_install_syslog('etape1: Value for character_set is not the one asked for database creation', LOG_WARNING);
|
||||||
//if ($check2 != $dolibarr_main_db_collation) dolibarr_install_syslog('etape1: Value for collation is not the one asked for database creation', LOG_WARNING);
|
//if ($check2 != $dolibarr_main_db_collation) dolibarr_install_syslog('etape1: Value for collation is not the one asked for database creation', LOG_WARNING);
|
||||||
// TODO
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -965,7 +965,7 @@ FCKeditorForUsers=Création/édition WYSIWIG de la description et note des utili
|
|||||||
FCKeditorForCompany=Création/édition WYSIWIG de la description et note des tiers
|
FCKeditorForCompany=Création/édition WYSIWIG de la description et note des tiers
|
||||||
FCKeditorForProduct=Création/édition WYSIWIG de la description et note des produits/services
|
FCKeditorForProduct=Création/édition WYSIWIG de la description et note des produits/services
|
||||||
FCKeditorForMembers=Création/édition WYSIWIG de la description et note des adhérents
|
FCKeditorForMembers=Création/édition WYSIWIG de la description et note des adhérents
|
||||||
FCKeditorForProductDetails=Création/édition WYSIWIG des lignes details produits (sur commandes, propales, factures, etc...)<br>Attention: L'utilisation de cette option est fortement non recommandé car peut poser des problèmes dans la gestion de caractères et mises en page des fichiers PDF générés.
|
FCKeditorForProductDetails=Création/édition WYSIWIG des lignes details produits (sur commandes, propales, factures, etc...)<br>Attention: L'utilisation de cette option est fortement déconseillé car peut poser des problèmes dans la gestion de caractères et mises en page des fichiers PDF générés.
|
||||||
FCKeditorForProductDetailsPerso=Création/édition WYSIWIG des lignes details produits personnalisées (sur commandes, propales, factures, etc...)
|
FCKeditorForProductDetailsPerso=Création/édition WYSIWIG des lignes details produits personnalisées (sur commandes, propales, factures, etc...)
|
||||||
FCKeditorForMailing=Création/édition WYSIWIG des mailings
|
FCKeditorForMailing=Création/édition WYSIWIG des mailings
|
||||||
##### OSCommerce 1 #####
|
##### OSCommerce 1 #####
|
||||||
|
|||||||
@ -521,12 +521,12 @@ class DoliDb
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Formatage (par la base de donn<EFBFBD>es) d'un champ de la base au format TMS ou Date (YYYY-MM-DD HH:MM:SS)
|
* \brief Formatage (par la base de donnees) d'un champ de la base au format TMS ou Date (YYYY-MM-DD HH:MM:SS)
|
||||||
* afin de retourner une donn<EFBFBD>e toujours au format universel date TMS unix.
|
* afin de retourner une donnee toujours au format universel date TMS unix.
|
||||||
* Fonction <EFBFBD> utiliser pour g<EFBFBD>n<EFBFBD>rer les SELECT.
|
* Fonction a utiliser pour generer les SELECT.
|
||||||
* \param param Nom champ base de type date ou chaine 'YYYY-MM-DD HH:MM:SS'
|
* \param param Nom champ base de type date ou chaine 'YYYY-MM-DD HH:MM:SS'
|
||||||
* \return date Date au format TMS.
|
* \return date Date au format TMS.
|
||||||
* \TODO Remove unix_timestamp functions
|
* \deprecated Remove unix_timestamp functions so use jdate instead
|
||||||
*/
|
*/
|
||||||
function pdate($param)
|
function pdate($param)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -513,12 +513,12 @@ class DoliDb
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Formatage (par la base de donnees) d'un champ de la base au format TMS ou Date (YYYY-MM-DD HH:MM:SS)
|
* \brief Formatage (par la base de donnees) d'un champ de la base au format TMS ou Date (YYYY-MM-DD HH:MM:SS)
|
||||||
* afin de retourner une donnee toujours au format universel date TMS unix.
|
* afin de retourner une donnee toujours au format universel date TMS unix.
|
||||||
* Fonction a utiliser pour generer les SELECT.
|
* Fonction a utiliser pour generer les SELECT.
|
||||||
* \param param Nom champ base de type date ou chaine 'YYYY-MM-DD HH:MM:SS'
|
* \param param Nom champ base de type date ou chaine 'YYYY-MM-DD HH:MM:SS'
|
||||||
* \return date Date au format TMS.
|
* \return date Date au format TMS.
|
||||||
* \TODO Remove unix_timestamp functions so use jdate instead
|
* \deprecated Remove unix_timestamp functions so use jdate instead
|
||||||
*/
|
*/
|
||||||
function pdate($param)
|
function pdate($param)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -527,12 +527,12 @@ class DoliDb
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Formatage (par la base de donnees) d'un champ de la base au format TMS ou Date (YYYY-MM-DD HH:MM:SS)
|
* \brief Formatage (par la base de donnees) d'un champ de la base au format TMS ou Date (YYYY-MM-DD HH:MM:SS)
|
||||||
* afin de retourner une donnee toujours au format universel date TMS unix.
|
* afin de retourner une donnee toujours au format universel date TMS unix.
|
||||||
* Fonction a utiliser pour generer les SELECT.
|
* Fonction a utiliser pour generer les SELECT.
|
||||||
* \param param Nom champ base de type date ou chaine 'YYYY-MM-DD HH:MM:SS'
|
* \param param Nom champ base de type date ou chaine 'YYYY-MM-DD HH:MM:SS'
|
||||||
* \return date Date au format TMS.
|
* \return date Date au format TMS.
|
||||||
* \TODO Remove unix_timestamp functions so use jdate instead
|
* \deprecated Remove unix_timestamp functions so use jdate instead
|
||||||
*/
|
*/
|
||||||
function pdate($param)
|
function pdate($param)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -753,3 +753,47 @@ function dol_print_reduction($reduction=0,$langs)
|
|||||||
|
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Return OS version
|
||||||
|
* \return string OS version
|
||||||
|
*/
|
||||||
|
function version_os()
|
||||||
|
{
|
||||||
|
// Get version of OS
|
||||||
|
ob_start();
|
||||||
|
phpinfo();
|
||||||
|
$chaine = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
eregi('System </td><td class="v">([^\/]*)</td>',$chaine,$reg);
|
||||||
|
$phpversion=$reg[1];
|
||||||
|
return $phpversion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Return PHP version
|
||||||
|
* \return string PHP version
|
||||||
|
*/
|
||||||
|
function version_php()
|
||||||
|
{
|
||||||
|
return phpversion();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Return Dolibarr version
|
||||||
|
* \return string Dolibarr version
|
||||||
|
*/
|
||||||
|
function version_dolibarr()
|
||||||
|
{
|
||||||
|
return DOL_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Return web server version
|
||||||
|
* \return string Web server version
|
||||||
|
*/
|
||||||
|
function version_webserver()
|
||||||
|
{
|
||||||
|
return $_SERVER["SERVER_SOFTWARE"];
|
||||||
|
}
|
||||||
|
|||||||
@ -33,9 +33,10 @@ accessforbidden();
|
|||||||
|
|
||||||
$staticproduct=new Product($db);
|
$staticproduct=new Product($db);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affichage page accueil
|
* View
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$transAreaType = $langs->trans("ProductsAndServicesArea");
|
$transAreaType = $langs->trans("ProductsAndServicesArea");
|
||||||
@ -53,15 +54,24 @@ print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
|||||||
/*
|
/*
|
||||||
* Zone recherche produit/service
|
* Zone recherche produit/service
|
||||||
*/
|
*/
|
||||||
|
$rowspan=2;
|
||||||
|
if ($conf->barcode->enabled) $rowspan++;
|
||||||
print '<form method="post" action="'.DOL_URL_ROOT.'/product/liste.php">';
|
print '<form method="post" action="'.DOL_URL_ROOT.'/product/liste.php">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print '<td colspan="3">'.$langs->trans("Search").'</td></tr>';
|
print '<td colspan="3">'.$langs->trans("Search").'</td></tr>';
|
||||||
print "<tr $bc[0]><td>";
|
print "<tr $bc[0]><td>";
|
||||||
print $langs->trans("Ref").':</td><td><input class="flat" type="text" size="18" name="sref"></td>';
|
print $langs->trans("Ref").':</td><td><input class="flat" type="text" size="14" name="sref"></td>';
|
||||||
print '<td rowspan="2"><input type="submit" class="button" value="'.$langs->trans("Search").'"></td></tr>';
|
print '<td rowspan="'.$rowspan.'"><input type="submit" class="button" value="'.$langs->trans("Search").'"></td></tr>';
|
||||||
|
if ($conf->barcode->enabled)
|
||||||
|
{
|
||||||
|
print "<tr $bc[0]><td>";
|
||||||
|
print $langs->trans("BarCode").':</td><td><input class="flat" type="text" size="14" name="sbarcode"></td>';
|
||||||
|
//print '<td><input type="submit" class="button" value="'.$langs->trans("Search").'"></td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
print "<tr $bc[0]><td>";
|
print "<tr $bc[0]><td>";
|
||||||
print $langs->trans("Other").':</td><td><input class="flat" type="text" size="18" name="sall"></td>';
|
print $langs->trans("Other").':</td><td><input class="flat" type="text" size="14" name="sall"></td>';
|
||||||
//print '<td><input type="submit" class="button" value="'.$langs->trans("Search").'"></td>';
|
//print '<td><input type="submit" class="button" value="'.$langs->trans("Search").'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print "</table></form><br>";
|
print "</table></form><br>";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -31,15 +31,18 @@ if ($conf->categorie->enabled) require_once(DOL_DOCUMENT_ROOT."/categories/categ
|
|||||||
|
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
|
|
||||||
|
// Security check
|
||||||
if (!$user->rights->produit->lire)
|
if (!$user->rights->produit->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
$sref=isset($_GET["sref"])?$_GET["sref"]:$_POST["sref"];
|
$sref=isset($_GET["sref"])?$_GET["sref"]:$_POST["sref"];
|
||||||
|
$sbarcode=isset($_GET["sbarcode"])?$_GET["sbarcode"]:$_POST["sbarcode"];
|
||||||
$snom=isset($_GET["snom"])?$_GET["snom"]:$_POST["snom"];
|
$snom=isset($_GET["snom"])?$_GET["snom"]:$_POST["snom"];
|
||||||
$sall=isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"];
|
$sall=isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"];
|
||||||
$type=isset($_GET["type"])?$_GET["type"]:$_POST["type"];
|
$type=isset($_GET["type"])?$_GET["type"]:$_POST["type"];
|
||||||
$sref=trim($sref);
|
$sref=trim($sref);
|
||||||
|
$sbarcode=trim($sbarcode);
|
||||||
$snom=trim($snom);
|
$snom=trim($snom);
|
||||||
$sall=trim($sall);
|
$sall=trim($sall);
|
||||||
$type=trim($type);
|
$type=trim($type);
|
||||||
@ -52,15 +55,20 @@ $page = $_GET["page"];
|
|||||||
$limit = $conf->liste_limit;
|
$limit = $conf->liste_limit;
|
||||||
$offset = $limit * $page ;
|
$offset = $limit * $page ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
if (isset($_POST["button_removefilter_x"]))
|
if (isset($_POST["button_removefilter_x"]))
|
||||||
{
|
{
|
||||||
$sref="";
|
$sref="";
|
||||||
$snom="";
|
$sbarcode="";
|
||||||
|
$snom="";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->categorie->enabled && isset($_REQUEST['catid']))
|
if ($conf->categorie->enabled && isset($_REQUEST['catid']))
|
||||||
{
|
{
|
||||||
$catid = $_REQUEST['catid'];
|
$catid = $_REQUEST['catid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -71,81 +79,76 @@ if ($conf->categorie->enabled && isset($_REQUEST['catid']))
|
|||||||
|
|
||||||
if ($_GET["canvas"] <> '' && file_exists('canvas/product.'.$_GET["canvas"].'.class.php') )
|
if ($_GET["canvas"] <> '' && file_exists('canvas/product.'.$_GET["canvas"].'.class.php') )
|
||||||
{
|
{
|
||||||
$class = 'Product'.ucfirst($_GET["canvas"]);
|
$class = 'Product'.ucfirst($_GET["canvas"]);
|
||||||
include_once('canvas/product.'.$_GET["canvas"].'.class.php');
|
include_once('canvas/product.'.$_GET["canvas"].'.class.php');
|
||||||
|
|
||||||
$object = new $class($db);
|
$object = new $class($db);
|
||||||
$object->LoadListDatas($limit, $offset, $sortfield, $sortorder);
|
$object->LoadListDatas($limit, $offset, $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$title=$langs->trans("ProductsAndServices");
|
$title=$langs->trans("ProductsAndServices");
|
||||||
|
|
||||||
if (isset($_GET["type"]) || isset($_POST["type"]))
|
if (isset($_GET["type"]) || isset($_POST["type"]))
|
||||||
{
|
{
|
||||||
if ($type==1) { $texte = $langs->trans("Services"); }
|
if ($type==1) { $texte = $langs->trans("Services"); }
|
||||||
else { $texte = $langs->trans("Products"); }
|
else { $texte = $langs->trans("Products"); }
|
||||||
} else {
|
} else {
|
||||||
$texte = $langs->trans("ProductsAndServices");
|
$texte = $langs->trans("ProductsAndServices");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.price, p.price_ttc, p.price_base_type,';
|
$sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type,';
|
||||||
$sql.= ' p.fk_product_type, '.$db->pdate('p.tms').' as datem,';
|
$sql.= ' p.fk_product_type, '.$db->pdate('p.tms').' as datem,';
|
||||||
$sql.= ' p.duration, p.envente as statut, p.seuil_stock_alerte';
|
$sql.= ' p.duration, p.envente as statut, p.seuil_stock_alerte';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'product as p';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'product as p';
|
||||||
if ($conf->categorie->enabled && ($catid || !$user->rights->categorie->voir))
|
if ($conf->categorie->enabled && ($catid || !$user->rights->categorie->voir))
|
||||||
{
|
{
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = p.rowid";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = p.rowid";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cp.fk_categorie = c.rowid";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cp.fk_categorie = c.rowid";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["fourn_id"] > 0)
|
if ($_GET["fourn_id"] > 0)
|
||||||
{
|
{
|
||||||
$fourn_id = $_GET["fourn_id"];
|
$fourn_id = $_GET["fourn_id"];
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."product_fournisseur as pf";
|
$sql .= ", ".MAIN_DB_PREFIX."product_fournisseur as pf";
|
||||||
}
|
}
|
||||||
$sql .= " WHERE 1=1";
|
$sql .= " WHERE 1=1";
|
||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
$sql .= " AND (p.ref like '%".addslashes($sall)."%' OR p.label like '%".addslashes($sall)."%' OR p.description like '%".addslashes($sall)."%' OR p.note like '%".addslashes($sall)."%')";
|
$sql .= " AND (p.ref like '%".addslashes($sall)."%' OR p.label like '%".addslashes($sall)."%' OR p.description like '%".addslashes($sall)."%' OR p.note like '%".addslashes($sall)."%')";
|
||||||
}
|
}
|
||||||
# if the type is not 1, we show all products (type = 0,2,3)
|
# if the type is not 1, we show all products (type = 0,2,3)
|
||||||
if (strlen($_GET["type"]) || strlen($_POST["type"]))
|
if (strlen($_GET["type"]) || strlen($_POST["type"]))
|
||||||
{
|
{
|
||||||
if ($type==1) {
|
if ($type==1) {
|
||||||
$sql .= " AND p.fk_product_type = '1'";
|
$sql .= " AND p.fk_product_type = '1'";
|
||||||
} else {
|
} else {
|
||||||
$sql .= " AND p.fk_product_type <> '1'";
|
$sql .= " AND p.fk_product_type <> '1'";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if ($sref)
|
|
||||||
{
|
|
||||||
$sql .= " AND p.ref like '%".$sref."%'";
|
|
||||||
}
|
|
||||||
if ($snom)
|
|
||||||
{
|
|
||||||
$sql .= " AND p.label like '%".addslashes($snom)."%'";
|
|
||||||
}
|
}
|
||||||
|
if ($sref) $sql .= " AND p.ref like '%".$sref."%'";
|
||||||
|
if ($sbarcode) $sql .= " AND p.barcode like '%".$sbarcode."%'";
|
||||||
|
if ($snom) $sql .= " AND p.label like '%".addslashes($snom)."%'";
|
||||||
if (isset($_GET["envente"]) && strlen($_GET["envente"]) > 0)
|
if (isset($_GET["envente"]) && strlen($_GET["envente"]) > 0)
|
||||||
{
|
{
|
||||||
$sql .= " AND p.envente = ".$_GET["envente"];
|
$sql .= " AND p.envente = ".$_GET["envente"];
|
||||||
}
|
}
|
||||||
if (isset($_GET["canvas"]) && strlen($_GET["canvas"]) > 0)
|
if (isset($_GET["canvas"]) && strlen($_GET["canvas"]) > 0)
|
||||||
{
|
{
|
||||||
$sql .= " AND p.canvas = '".mysql_escape_string($_GET["canvas"])."'";
|
$sql .= " AND p.canvas = '".mysql_escape_string($_GET["canvas"])."'";
|
||||||
}
|
}
|
||||||
if($catid)
|
if($catid)
|
||||||
{
|
{
|
||||||
$sql .= " AND cp.fk_categorie = ".$catid;
|
$sql .= " AND cp.fk_categorie = ".$catid;
|
||||||
}
|
}
|
||||||
if ($conf->categorie->enabled && !$user->rights->categorie->voir)
|
if ($conf->categorie->enabled && !$user->rights->categorie->voir)
|
||||||
{
|
{
|
||||||
$sql.= ' AND IFNULL(c.visible,1)=1';
|
$sql.= ' AND IFNULL(c.visible,1)=1';
|
||||||
}
|
}
|
||||||
if ($fourn_id > 0)
|
if ($fourn_id > 0)
|
||||||
{
|
{
|
||||||
$sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".$fourn_id;
|
$sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".$fourn_id;
|
||||||
}
|
}
|
||||||
$sql .= " ORDER BY $sortfield $sortorder ";
|
$sql .= " ORDER BY $sortfield $sortorder ";
|
||||||
$sql .= $db->plimit($limit + 1 ,$offset);
|
$sql .= $db->plimit($limit + 1 ,$offset);
|
||||||
@ -157,7 +160,7 @@ if ($resql)
|
|||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if ($num == 1 && ($sall or $snom or $sref))
|
if ($num == 1 && ($sall || $snom || $sref || $sbarcode) && $_POST["action"] != 'list')
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
Header("Location: fiche.php?id=$objp->rowid");
|
Header("Location: fiche.php?id=$objp->rowid");
|
||||||
@ -171,14 +174,14 @@ if ($resql)
|
|||||||
|
|
||||||
llxHeader("","",$texte);
|
llxHeader("","",$texte);
|
||||||
|
|
||||||
// Displays product removal confirmation
|
// Displays product removal confirmation
|
||||||
if (!empty($_GET['delprod']))
|
if (!empty($_GET['delprod']))
|
||||||
{
|
{
|
||||||
print '<div class="warning">'.$langs->trans("ProductDeleted",$_GET['delprod']).'</div><br />';
|
print '<div class="warning">'.$langs->trans("ProductDeleted",$_GET['delprod']).'</div><br />';
|
||||||
}
|
}
|
||||||
|
|
||||||
$param="&sref=".$sref."&snom=".$snom."&sall=".$sall."&envente=".$_POST["envente"];
|
$param="&sref=".$sref.($sbarcode?"&sbarcode=".$sbarcode:"")."&snom=".$snom."&sall=".$sall."&envente=".$_POST["envente"];
|
||||||
$param.="&fourn_id=".$fourn_id;
|
$param.=($fourn_id?"&fourn_id=".$fourn_id:"");
|
||||||
$param.=isset($type)?"&type=".$type:"";
|
$param.=isset($type)?"&type=".$type:"";
|
||||||
print_barre_liste($texte, $page, "liste.php", $param, $sortfield, $sortorder,'',$num);
|
print_barre_liste($texte, $page, "liste.php", $param, $sortfield, $sortorder,'',$num);
|
||||||
|
|
||||||
@ -204,6 +207,7 @@ if ($resql)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<form action="liste.php" method="post" name="formulaire">';
|
print '<form action="liste.php" method="post" name="formulaire">';
|
||||||
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||||
@ -214,6 +218,7 @@ if ($resql)
|
|||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print_liste_field_titre($langs->trans("Ref"),"liste.php", "p.ref",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),"liste.php", "p.ref",$param,"","",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Label"),"liste.php", "p.label",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Label"),"liste.php", "p.label",$param,"","",$sortfield,$sortorder);
|
||||||
|
if ($conf->barcode->enabled) print_liste_field_titre($langs->trans("BarCode"),"liste.php", "p.barcode",$param,"",'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateModification"),"liste.php", "p.tms",$param,"",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateModification"),"liste.php", "p.tms",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
if ($conf->service->enabled && $type != 0) print_liste_field_titre($langs->trans("Duration"),"liste.php", "p.duration",$param,"",'align="center"',$sortfield,$sortorder);
|
if ($conf->service->enabled && $type != 0) print_liste_field_titre($langs->trans("Duration"),"liste.php", "p.duration",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("SellingPrice"),"liste.php", "p.price",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("SellingPrice"),"liste.php", "p.price",$param,"",'align="right"',$sortfield,$sortorder);
|
||||||
@ -224,11 +229,17 @@ if ($resql)
|
|||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="sref" value="'.$sref.'">';
|
print '<input class="flat" type="text" name="sref" size="8" value="'.$sref.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="snom" value="'.$snom.'">';
|
print '<input class="flat" type="text" name="snom" size="12" value="'.$snom.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if ($conf->barcode->enabled)
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre" align="right">';
|
||||||
|
print '<input class="flat" type="text" name="sbarcode" size="6" value="'.$sbarcode.'">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -289,6 +300,12 @@ if ($resql)
|
|||||||
// Label
|
// Label
|
||||||
print '<td>'.dol_trunc($objp->label,40).'</td>';
|
print '<td>'.dol_trunc($objp->label,40).'</td>';
|
||||||
|
|
||||||
|
// Barcode
|
||||||
|
if ($conf->barcode->enabled)
|
||||||
|
{
|
||||||
|
print '<td align="right">'.$objp->barcode.'</td>';
|
||||||
|
}
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<td align="center">'.dol_print_date($objp->datem,'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($objp->datem,'day')."</td>\n";
|
||||||
|
|
||||||
@ -341,7 +358,7 @@ if ($resql)
|
|||||||
|
|
||||||
if ($num > $conf->liste_limit)
|
if ($num > $conf->liste_limit)
|
||||||
{
|
{
|
||||||
if ($sref || $snom || $sall || $_POST["search"])
|
if ($sref || $snom || $sall || $sbarcode || $_POST["search"])
|
||||||
{
|
{
|
||||||
print_barre_liste('', $page, "liste.php", "&sref=".$sref."&snom=".$snom."&sall=".$sall."&envente=".$_POST["envente"], $sortfield, $sortorder,'',$num);
|
print_barre_liste('', $page, "liste.php", "&sref=".$sref."&snom=".$snom."&sall=".$sall."&envente=".$_POST["envente"], $sortfield, $sortorder,'',$num);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user