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

This commit is contained in:
Laurent Destailleur 2012-11-14 18:59:07 +01:00
commit 511a75b5de
22 changed files with 155 additions and 144 deletions

View File

@ -1,20 +1,21 @@
<?php
/* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
*
* 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.
*
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
*
* 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 holiday.class.php
@ -1182,12 +1183,12 @@ class Holiday extends CommonObject
// On séléctionne les utilisateurs qui ne sont pas déjà dans le module
$sql = "SELECT u.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_users as u";
$sql.= " WHERE u.fk_user NOT IN(".$listUsersDolibarr.")";
$sql.= " WHERE u.fk_user NOT IN (".$listUsersDolibarr.")";
$result = $this->db->query($sql);
$resql = $this->db->query($sql);
// Si pas d'erreur SQL
if($result) {
if ($resql) {
$i = 0;
$num = $this->db->num_rows($resql);

View File

@ -43,14 +43,14 @@ if (empty($conf->holiday->enabled))
}
$verifConf.= "SELECT value";
$verifConf.= " FROM ".MAIN_DB_PREFIX."holiday_config";
$verifConf.= " WHERE name = 'userGroup'";
$sql = "SELECT value";
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_config";
$sql.= " WHERE name = 'userGroup'";
$result = $db->query($verifConf);
$result = $db->query($sql);
$obj = $db->fetch_object($result);
if($obj->value == NULL)
if ($obj->value == NULL)
{
llxHeader('',$langs->trans('CPTitreMenu'));
print '<div class="tabBar">';

View File

@ -1,20 +1,21 @@
<?php
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
*
* 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.
*
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
*
* 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 fiche.php
@ -33,14 +34,14 @@ require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
// Get parameters
$myparam = GETPOST("myparam");
$action=GETPOST('action');
$id=GETPOST('id');
$action=GETPOST('action', 'alpha');
$id=GETPOST('id', 'int');
// Protection if external user
if ($user->societe_id > 0) accessforbidden();
$user_id = $user->id;
$now=dol_now();
/*******************************************************************
@ -50,7 +51,6 @@ $user_id = $user->id;
// Si création de la demande
if ($action == 'create')
{
// Si pas le droit de créer une demande
if(!$user->rights->holiday->write)
{
@ -290,7 +290,6 @@ if ($action == 'confirm_send')
$delayForRequest = $cp->getConfCP('delayForRequest');
//$delayForRequest = $delayForRequest * (60*60*24);
$now=dol_now();
$nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd');
// Si l'option pour avertir le valideur en cas de délai trop court
@ -703,11 +702,11 @@ if (empty($id) || $action == 'add' || $action == 'request')
// Liste des utiliseurs du groupes choisi dans la config
$idGroupValid = $cp->getConfCP('userGroup');
$validator = new UserGroup($db,$idGroupValid);
$validator = new UserGroup($db, $idGroupValid);
$valideurarray = $validator->listUsersForGroup();
print '<td>';
print $html->select_dolusers($valideur,"valideur",1,"",0,$valideurarray,'');
print $html->select_dolusers($validator->id, "valideur", 1, "", 0, $valideurarray);
print '</td>';
print '</tr>';
print '<tr>';

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -71,6 +71,7 @@ $search_statut = GETPOST('select_statut');
$max_year = 5;
$min_year = 10;
$filter='';
llxHeader(array(),$langs->trans('CPTitreMenu'));
@ -185,7 +186,7 @@ if($holiday_payes == '-1')
$var=true; $num = count($holiday->holiday);
$html = new Form($db);
$htmlother = new FormOther($db);
print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num,$nbtotalofrecords);
print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, "", $num);
print '<div class="tabBar">';

View File

@ -124,3 +124,7 @@ BankCode=Codi banc
DeskCode=Codi oficina
BankAccountNumber=Número compte
BankAccountNumberKey=Dígit Control
## filters
FilterableFields=Camps filtrables
FilteredFields=Campos filtrats
FilteredFieldsValues=Valors de filtres

View File

@ -43,3 +43,4 @@ Language_sl_SI=Eslovè
Language_sv_SV=Suec
Language_sv_SE=Suec
Language_zh_CN=Xinès
Language_zh_TW=Xinès (Tradicional)

View File

@ -124,3 +124,7 @@ BankCode=Código banco
DeskCode=Código oficina
BankAccountNumber=Número cuenta
BankAccountNumberKey=Dígito Control
## filters
FilterableFields=Campos filtrables
FilteredFields=Campos filtrados
FilteredFieldsValues=Valores de filtros

View File

@ -46,3 +46,4 @@ Language_sl_SI=Esloveno
Language_sv_SV=Sueco
Language_sv_SE=Sueco
Language_zh_CN=Chino
Language_zh_TW=Chino (Tradicional)

View File

@ -294,7 +294,7 @@ function getInvoice($authentication,$id='',$ref='',$ref_ext='')
$linesresp[]=array(
'id'=>$line->rowid,
'type'=>$line->product_type,
'desc'=>dol_htmlcleanlastbr($line->description),
'desc'=>dol_htmlcleanlastbr($line->desc),
'total_net'=>$line->total_ht,
'total_vat'=>$line->total_tva,
'total'=>$line->total_ttc,