Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2011-11-04 00:28:53 +01:00
commit fbdb483510
391 changed files with 64 additions and 60 deletions

View File

@ -1,22 +1,22 @@
<?php
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* 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, see <http://www.gnu.org/licenses/>.
*/
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* 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, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/comm/action/class/actioncomm.class.php
@ -626,52 +626,52 @@ class ActionComm extends CommonObject
if ($mode == 0)
{
if ($percent==-1 && ! $hidenastatus) return $langs->trans('StatusNotApplicable');
if ($percent==0) return $langs->trans('StatusActionToDo').' (0%)';
if ($percent > 0 && $percent < 100) return $langs->trans('StatusActionInProcess').' ('.$percent.'%)';
if ($percent >= 100) return $langs->trans('StatusActionDone').' (100%)';
if ($percent==-1 && ! $hidenastatus) return $langs->trans('StatusNotApplicable');
else if ($percent==0) return $langs->trans('StatusActionToDo').' (0%)';
else if ($percent > 0 && $percent < 100) return $langs->trans('StatusActionInProcess').' ('.$percent.'%)';
else if ($percent >= 100) return $langs->trans('StatusActionDone').' (100%)';
}
if ($mode == 1)
else if ($mode == 1)
{
if ($percent==-1 && ! $hidenastatus) return $langs->trans('StatusNotApplicable');
if ($percent==0) return $langs->trans('StatusActionToDo');
if ($percent > 0 && $percent < 100) return $percent.'%';
if ($percent >= 100) return $langs->trans('StatusActionDone');
if ($percent==-1 && ! $hidenastatus) return $langs->trans('StatusNotApplicable');
else if ($percent==0) return $langs->trans('StatusActionToDo');
else if ($percent > 0 && $percent < 100) return $percent.'%';
else if ($percent >= 100) return $langs->trans('StatusActionDone');
}
if ($mode == 2)
else if ($mode == 2)
{
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9').' '.$langs->trans('StatusNotApplicable');
if ($percent==0) return img_picto($langs->trans('StatusActionToDo'),'statut1').' '.$langs->trans('StatusActionToDo');
if ($percent > 0 && $percent < 100) return img_picto($langs->trans('StatusActionInProcess'),'statut3').' '. $percent.'%';
if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6').' '.$langs->trans('StatusActionDone');
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9').' '.$langs->trans('StatusNotApplicable');
else if ($percent==0) return img_picto($langs->trans('StatusActionToDo'),'statut1').' '.$langs->trans('StatusActionToDo');
else if ($percent > 0 && $percent < 100) return img_picto($langs->trans('StatusActionInProcess'),'statut3').' '. $percent.'%';
else if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6').' '.$langs->trans('StatusActionDone');
}
if ($mode == 3)
else if ($mode == 3)
{
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans("Status").': '.$langs->trans('StatusNotApplicable'),'statut9');
if ($percent==0) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionToDo').' (0%)','statut1');
if ($percent > 0 && $percent < 100) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionInProcess').' ('.$percent.'%)','statut3');
if ($percent >= 100) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionDone').' (100%)','statut6');
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans("Status").': '.$langs->trans('StatusNotApplicable'),'statut9');
else if ($percent==0) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionToDo').' (0%)','statut1');
else if ($percent > 0 && $percent < 100) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionInProcess').' ('.$percent.'%)','statut3');
else if ($percent >= 100) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionDone').' (100%)','statut6');
}
if ($mode == 4)
else if ($mode == 4)
{
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9').' '.$langs->trans('StatusNotApplicable');
if ($percent==0) return img_picto($langs->trans('StatusActionToDo'),'statut1').' '.$langs->trans('StatusActionToDo').' (0%)';
if ($percent > 0 && $percent < 100) return img_picto($langs->trans('StatusActionInProcess'),'statut3').' '.$langs->trans('StatusActionInProcess').' ('.$percent.'%)';;
if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6').' '.$langs->trans('StatusActionDone').' (100%)';
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9').' '.$langs->trans('StatusNotApplicable');
else if ($percent==0) return img_picto($langs->trans('StatusActionToDo'),'statut1').' '.$langs->trans('StatusActionToDo').' (0%)';
else if ($percent > 0 && $percent < 100) return img_picto($langs->trans('StatusActionInProcess'),'statut3').' '.$langs->trans('StatusActionInProcess').' ('.$percent.'%)';
else if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6').' '.$langs->trans('StatusActionDone').' (100%)';
}
if ($mode == 5)
else if ($mode == 5)
{
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9');
if ($percent==0) return '0% '.img_picto($langs->trans('StatusActionToDo'),'statut1');
if ($percent > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3');
if ($percent >= 100) return $langs->trans('StatusActionDone').' '.img_picto($langs->trans('StatusActionDone'),'statut6');
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9');
else if ($percent==0) return '0% '.img_picto($langs->trans('StatusActionToDo'),'statut1');
else if ($percent > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3');
else if ($percent >= 100) return $langs->trans('StatusActionDone').' '.img_picto($langs->trans('StatusActionDone'),'statut6');
}
if ($mode == 6)
else if ($mode == 6)
{
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9');
if ($percent==0) return '0% '.img_picto($langs->trans('StatusActionToDo'),'statut1');
if ($percent > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3');
if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6');
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9');
else if ($percent==0) return '0% '.img_picto($langs->trans('StatusActionToDo'),'statut1');
else if ($percent > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3');
else if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6');
}
return '';
}

View File

@ -112,7 +112,7 @@ class Conf
$sql = "SELECT ".$db->decrypt('name')." as name,";
$sql.= " ".$db->decrypt('value')." as value, entity";
$sql.= " FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE entity IN (0,1,".$this->entity.")"; // 1 to herite configuration
$sql.= " WHERE entity IN (0,".$this->entity.")";
$sql.= " ORDER BY entity"; // This is to have entity 0 first, then entity 1 that overwrite.
$result = $db->query($sql);

View File

@ -39,13 +39,13 @@ $search_compta_fournisseur = GETPOST("search_compta_fournisseur");
$search_datec = GETPOST("search_datec");
// Security check
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
$socid = GETPOST('socid');
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'societe',$socid,'');
$result = restrictedArea($user,'societe',$socid,'');
$page = isset($_GET["page"])?$_GET["page"]:'';
$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:'';
$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:'';
$page = GETPOST('page');
$sortorder = GETPOST('sortorder');
$sortfield = GETPOST('sortfield');
if ($page == -1) { $page = 0 ; }
$offset = $conf->liste_limit * $page ;
$pageprev = $page - 1;
@ -54,7 +54,7 @@ if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="nom";
// Load categ filters
$search_categ = isset($_GET["search_categ"])?$_GET["search_categ"]:$_POST["search_categ"];
$search_categ = GETPOST('search_categ');
/*
@ -73,12 +73,14 @@ if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.f
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st";
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_fournisseur as cf";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE s.fk_stcomm = st.id AND s.fournisseur=1";
$sql.= " WHERE s.fk_stcomm = st.id AND s.fournisseur = 1";
$sql.= " AND s.entity = ".$conf->entity;
if ($search_categ) $sql.= " AND s.rowid = cf.fk_societe"; // Join for the needed table to filter by categ
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($socid) $sql .= " AND s.rowid = ".$socid;
if ($socname) {
$sql .= " AND s.nom like '%".$db->escape($socname)."%'";
if ($socname)
{
$sql .= " AND s.nom LIKE '%".$db->escape($socname)."%'";
$sortfield = "s.nom";
$sortorder = "ASC";
}

0
htdocs/langs/ar_SA/admin.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/agenda.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/banks.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/bills.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/bookmarks.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/boxes.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/categories.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/commercial.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/companies.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/compta.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/contracts.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/deliveries.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/dict.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/donations.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/ecm.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/errors.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/exports.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/ftp.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/help.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/install.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/interventions.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/languages.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/ldap.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/mails.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/main.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/members.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/orders.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/oscommerce.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/other.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/paybox.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/products.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/projects.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/propal.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/sendings.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/shop.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/stocks.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/suppliers.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/trips.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/users.lang Executable file → Normal file
View File

0
htdocs/langs/ar_SA/withdrawals.lang Executable file → Normal file
View File

0
htdocs/langs/ca_ES/cashdesk.lang Executable file → Normal file
View File

0
htdocs/langs/ca_ES/externalsite.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/admin.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/agenda.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/banks.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/bills.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/bookmarks.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/boxes.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/categories.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/commercial.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/companies.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/compta.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/contracts.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/deliveries.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/dict.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/donations.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/ecm.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/errors.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/exports.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/ftp.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/help.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/install.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/interventions.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/languages.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/ldap.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/mails.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/main.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/members.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/orders.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/oscommerce.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/other.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/paybox.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/products.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/projects.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/propal.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/sendings.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/shop.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/stocks.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/suppliers.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/trips.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/users.lang Executable file → Normal file
View File

0
htdocs/langs/da_DK/withdrawals.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/admin.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/agenda.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/banks.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/bills.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/boxes.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/categories.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/commercial.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/companies.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/compta.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/contracts.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/deliveries.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/dict.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/donations.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/ecm.lang Executable file → Normal file
View File

0
htdocs/langs/de_AT/errors.lang Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More