Merge remote-tracking branch 'origin/3.9' into develop
This commit is contained in:
commit
8653e7fa5c
@ -175,7 +175,7 @@ if ($action == 'edit')
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="120px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
$var=false;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td>' .$form->selectyesno('MAIN_DISABLE_METEO',(isset($conf->global->MAIN_DISABLE_METEO)?1:0),1) . '</td></tr>';
|
||||
|
||||
@ -222,7 +222,7 @@ else
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="120px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
$var=false;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td>' . yn($conf->global->MAIN_DISABLE_METEO) . '</td></tr>';
|
||||
|
||||
|
||||
@ -43,6 +43,7 @@ $langs->load("errors");
|
||||
$langs->load("admin");
|
||||
$langs->load("companies");
|
||||
$langs->load("resource");
|
||||
$langs->load("holiday");
|
||||
|
||||
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
@ -170,7 +171,7 @@ $tabsql[24]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX
|
||||
$tabsql[25]= "SELECT rowid as rowid, label, type_template, private, position, topic, content, active FROM ".MAIN_DB_PREFIX."c_email_templates";
|
||||
$tabsql[26]= "SELECT rowid as rowid, code, label, short_label, active FROM ".MAIN_DB_PREFIX."c_units";
|
||||
$tabsql[27]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_stcomm";
|
||||
$tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.delay, h.newByMonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
||||
$tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newByMonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
||||
$tabsql[29]= "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status";
|
||||
|
||||
// Criteria to sort dictionaries
|
||||
@ -234,7 +235,7 @@ $tabfield[24]= "code,label";
|
||||
$tabfield[25]= "label,type_template,position,topic,content";
|
||||
$tabfield[26]= "code,label,short_label";
|
||||
$tabfield[27]= "code,libelle";
|
||||
$tabfield[28]= "code,label,delay,newByMonth,country_id,country";
|
||||
$tabfield[28]= "code,label,affect,delay,newByMonth,country_id,country";
|
||||
$tabfield[29]= "code,label,percent,position";
|
||||
|
||||
// Nom des champs d'edition pour modification d'un enregistrement
|
||||
@ -266,7 +267,7 @@ $tabfieldvalue[24]= "code,label";
|
||||
$tabfieldvalue[25]= "label,type_template,position,topic,content";
|
||||
$tabfieldvalue[26]= "code,label,short_label";
|
||||
$tabfieldvalue[27]= "code,libelle";
|
||||
$tabfieldvalue[28]= "code,label,delay,newByMonth,country";
|
||||
$tabfieldvalue[28]= "code,label,affect,delay,newByMonth,country";
|
||||
$tabfieldvalue[29]= "code,label,percent,position";
|
||||
|
||||
// Nom des champs dans la table pour insertion d'un enregistrement
|
||||
@ -298,7 +299,7 @@ $tabfieldinsert[24]= "code,label";
|
||||
$tabfieldinsert[25]= "label,type_template,position,topic,content";
|
||||
$tabfieldinsert[26]= "code,label,short_label";
|
||||
$tabfieldinsert[27]= "code,libelle";
|
||||
$tabfieldinsert[28]= "code,label,delay,newByMonth,fk_country";
|
||||
$tabfieldinsert[28]= "code,label,affect,delay,newByMonth,fk_country";
|
||||
$tabfieldinsert[29]= "code,label,percent,position";
|
||||
|
||||
// Nom du rowid si le champ n'est pas de type autoincrement
|
||||
@ -396,7 +397,7 @@ $tabhelp[24] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[25] = array('type_template'=>$langs->trans("TemplateForElement"),'private'=>$langs->trans("TemplateIsVisibleByOwnerOnly"), 'position'=>$langs->trans("PositionIntoComboList"));
|
||||
$tabhelp[26] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[28] = array('delay'=>$langs->trans("MinimumNoticePeriod"), 'newByMonth'=>$langs->trans("NbAddedAutomatically"));
|
||||
$tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"),'delay'=>$langs->trans("MinimumNoticePeriod"), 'newByMonth'=>$langs->trans("NbAddedAutomatically"));
|
||||
$tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList"));
|
||||
|
||||
// List of check for fields (NOT USED YET)
|
||||
|
||||
@ -169,7 +169,7 @@ else
|
||||
if (empty($mysoc->country_code))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$warnpicto=img_error($langs->trans("WarningMandatorySetupNotComplete"));
|
||||
$warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete"));
|
||||
print '<br><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a>';
|
||||
}
|
||||
else
|
||||
|
||||
@ -505,7 +505,6 @@ if ($action == 'edit')
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -662,7 +661,6 @@ else
|
||||
// Run the test to connect
|
||||
if ($action == 'testconnect')
|
||||
{
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("DoTestServerAvailability"));
|
||||
|
||||
// If we use SSL/TLS
|
||||
@ -688,7 +686,6 @@ else
|
||||
// Show email send test form
|
||||
if ($action == 'test' || $action == 'testhtml')
|
||||
{
|
||||
print '<br>';
|
||||
print load_fiche_titre($action == 'testhtml'?$langs->trans("DoTestSendHTML"):$langs->trans("DoTestSend"));
|
||||
|
||||
// Cree l'objet formulaire mail
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2016 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
|
||||
@ -85,7 +85,7 @@ if (GETPOST('submitthirdparty') && GETPOST('submitthirdparty'))
|
||||
|
||||
if (empty($forbarcode) || empty($fk_barcode_type))
|
||||
{
|
||||
setEventMessages($langs->trans("DefinitionOfBarCodeForProductNotComplete",$thirdpartytmp->getNomUrl()), null, 'warnings');
|
||||
setEventMessages($langs->trans("DefinitionOfBarCodeForThirdpartyNotComplete",$thirdpartytmp->getNomUrl()), null, 'warnings');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -387,11 +387,11 @@ print '<br>';
|
||||
|
||||
if ($producttmp->id > 0)
|
||||
{
|
||||
print $langs->trans("BarCodeDataForProduct",$producttmp->getNomUrl(1)).'<br>';
|
||||
print $langs->trans("BarCodeDataForProduct",'').' '.$producttmp->getNomUrl(1).'<br>';
|
||||
}
|
||||
if ($thirdpartytmp->id > 0)
|
||||
{
|
||||
print $langs->trans("BarCodeDataForThirdparty",$thirdpartytmp->getNomUrl(1)).'<br>';
|
||||
print $langs->trans("BarCodeDataForThirdparty",'').' '.$thirdpartytmp->getNomUrl(1).'<br>';
|
||||
}
|
||||
|
||||
print '<div class="tagtable">';
|
||||
|
||||
@ -158,10 +158,23 @@ print '<table class="border" width="100%">';
|
||||
|
||||
// Reference
|
||||
print '<tr>';
|
||||
print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="2">';
|
||||
print $object->label;
|
||||
print '<td width="20%" class="notopnoleft">';
|
||||
$ways = $object->print_all_ways();
|
||||
print $langs->trans("Ref").'</td><td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
|
||||
foreach ($ways as $way)
|
||||
{
|
||||
print $way."<br>\n";
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Description
|
||||
print '<tr><td width="20%" class="notopnoleft">';
|
||||
print $langs->trans("Description").'</td><td>';
|
||||
print dol_htmlentitiesbr($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
if ($action == 'edit')
|
||||
|
||||
@ -240,7 +240,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
// Company
|
||||
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
|
||||
$filter='s.client in (1,2,3)';
|
||||
print $form->select_company($socid,'socid',$filter,1);
|
||||
print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"');
|
||||
print '</td></tr>';
|
||||
// User
|
||||
print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
|
||||
|
||||
@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php';
|
||||
if (!$user->rights->commande->lire) accessforbidden();
|
||||
|
||||
$langs->load("orders");
|
||||
$langs->load("bills");
|
||||
|
||||
// Security check
|
||||
$socid=GETPOST('socid','int');
|
||||
|
||||
@ -256,7 +256,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
|
||||
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
||||
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
||||
print $form->select_company($socid,'socid',$filter,1);
|
||||
print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"');
|
||||
print '</td></tr>';
|
||||
// User
|
||||
print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
|
||||
|
||||
@ -237,7 +237,7 @@ print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->tra
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
$filter='';
|
||||
print $form->select_company($socid,'socid',$filter,1,1);
|
||||
print $form->select_company($socid,'socid',$filter,1,1,0,array(),0,'','style="width: 95%"');
|
||||
print '</td></tr>';
|
||||
// User
|
||||
print '<tr><td>'.$langs->trans("User").'</td><td>';
|
||||
|
||||
@ -240,7 +240,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
||||
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
||||
print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 100%"');
|
||||
print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1);
|
||||
print '</td></tr>';
|
||||
// User
|
||||
print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
|
||||
|
||||
@ -336,9 +336,11 @@ if ($id)
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print "<tr>";
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/salaries/index.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
print "<tr>";
|
||||
print '<td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $object->ref;
|
||||
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Employee
|
||||
|
||||
@ -898,9 +898,10 @@ class Form
|
||||
* @param array $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||
* @param int $limit Maximum number of elements
|
||||
* @param string $morecss Add more css styles to the SELECT component
|
||||
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
|
||||
* @return string HTML string with select box for thirdparty.
|
||||
*/
|
||||
function select_company($selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100')
|
||||
function select_company($selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='')
|
||||
{
|
||||
$out='';
|
||||
|
||||
@ -934,7 +935,7 @@ class Form
|
||||
}
|
||||
else
|
||||
{*/
|
||||
$out.=$this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss);
|
||||
$out.=$this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss, $moreparam);
|
||||
//}
|
||||
|
||||
return $out;
|
||||
@ -954,9 +955,10 @@ class Form
|
||||
* @param int $outputmode 0=HTML select string, 1=Array
|
||||
* @param int $limit Limit number of answers
|
||||
* @param string $morecss Add more css styles to the SELECT component
|
||||
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
|
||||
* @return string HTML string with
|
||||
*/
|
||||
function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100')
|
||||
function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='')
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
|
||||
@ -1010,7 +1012,7 @@ class Form
|
||||
}
|
||||
|
||||
// Construct $out and $outarray
|
||||
$out.= '<select id="'.$htmlname.'" class="flat'.($morecss?' '.$morecss:'').'" name="'.$htmlname.'"'.$nodatarole.'>'."\n";
|
||||
$out.= '<select id="'.$htmlname.'" class="flat'.($morecss?' '.$morecss:'').'"'.($moreparam?' '.$moreparam:'').' name="'.$htmlname.'"'.$nodatarole.'>'."\n";
|
||||
|
||||
$textifempty='';
|
||||
// Do not use textempty = ' ' or ' ' here, or search on key will search on ' key'.
|
||||
@ -4510,7 +4512,7 @@ class Form
|
||||
* @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' '), <0 to add an empty value with key that is this value.
|
||||
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
|
||||
* @param int $value_as_key 1 to use value as key
|
||||
* @param string $moreparam Add more parameters onto the select tag
|
||||
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
|
||||
* @param int $translate Translate and encode value
|
||||
* @param int $maxlen Length maximum for labels
|
||||
* @param int $disabled Html select box is disabled
|
||||
|
||||
@ -598,7 +598,11 @@ class FormOther
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
$color = colorArrayToHex(colorStringToArray($color,array()),'');
|
||||
if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||
$textcolor='000';
|
||||
$tmpcolorweight=0;
|
||||
foreach(colorStringToArray($color,array()) as $x) $tmpcolorweight+=$x;
|
||||
if ($tmpcolorweight < 400) $textcolor='FFF';
|
||||
if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; color: #'.$textcolor.'; background-color: #'.$color.'" value="'.$color.'">';
|
||||
else print $textifnotdefined;
|
||||
}
|
||||
|
||||
|
||||
@ -39,10 +39,15 @@ function holiday_prepare_head($object)
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/holiday/document.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans('Document');
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
// Attachments
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$upload_dir = $conf->holiday->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
|
||||
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
|
||||
$head[$h][0] = DOL_URL_ROOT.'/holiday/document.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans('Documents');
|
||||
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
|
||||
@ -84,9 +84,14 @@ function member_prepare_head(Adherent $object)
|
||||
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
|
||||
$h++;
|
||||
|
||||
// Attachments
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$upload_dir = $conf->adherent->multidir_output[$object->entity].'/'.get_exdir($object->id,2,0,1,$object,'member').'/'.dol_sanitizeFileName($object->ref);
|
||||
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
|
||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Documents");
|
||||
$head[$h][2] = 'document';
|
||||
$head[$h][1] = $langs->trans('Documents');
|
||||
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/info.php?id='.$object->id;
|
||||
|
||||
@ -312,7 +312,6 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=hrm', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5006__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/month_report.php?&action=request', 'MenuReportMonth', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 4, __ENTITY__);
|
||||
-- HRM - Expense reports
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', 'tripsandexpenses', 15__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__);
|
||||
|
||||
@ -1264,7 +1264,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$newmenu->add("/holiday/list.php?select_statut=2&leftmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->holiday->read);
|
||||
$newmenu->add("/holiday/define_holiday.php?&action=request", $langs->trans("MenuConfCP"), 1, $user->rights->holiday->define_holiday);
|
||||
$newmenu->add("/holiday/view_log.php?&action=request", $langs->trans("MenuLogCP"), 1, $user->rights->holiday->define_holiday);
|
||||
$newmenu->add("/holiday/month_report.php?&action=request", $langs->trans("MenuReportMonth"), 1, $user->rights->holiday->define_holiday);
|
||||
}
|
||||
|
||||
// Trips and expenses (old module)
|
||||
|
||||
@ -93,12 +93,12 @@ class modOauth extends DolibarrModules
|
||||
// $this->rights[$r][4] Niveau 1 pour nommer permission dans code
|
||||
// $this->rights[$r][5] Niveau 2 pour nommer permission dans code
|
||||
|
||||
$r++;
|
||||
/*$r++;
|
||||
$this->rights[$r][0] = 66000;
|
||||
$this->rights[$r][1] = 'OauthAccess';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'read';
|
||||
$this->rights[$r][4] = 'read';*/
|
||||
|
||||
// Main menu entries
|
||||
$this->menus = array(); // List of menus to add
|
||||
|
||||
@ -222,7 +222,7 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file
|
||||
<?php if (! empty($_SESSION['dol_loginmesg']))
|
||||
{
|
||||
?>
|
||||
<div class="center login_main_message" style="max-width: 520px"><div class="error">
|
||||
<div class="center login_main_message"><div class="error">
|
||||
<?php echo $_SESSION['dol_loginmesg']; ?>
|
||||
</div></div>
|
||||
<?php
|
||||
|
||||
@ -167,7 +167,7 @@ if (! empty($hookmanager->resArray['options'])) {
|
||||
<br>
|
||||
|
||||
<?php if ($message) { ?>
|
||||
<div class="center login_main_message" style="max-width: 520px">
|
||||
<div class="center login_main_message">
|
||||
<?php echo dol_htmloutput_mesg($message,'','',1); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
@ -241,7 +241,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
|
||||
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
||||
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
||||
print $form->select_company($socid,'socid',$filter,1);
|
||||
print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"');
|
||||
print '</td></tr>';
|
||||
// User
|
||||
print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
|
||||
|
||||
@ -51,9 +51,9 @@ $var=false;
|
||||
print '<form method="post" action="list.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchASending").'</td></tr>';
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sf_ref" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print $langs->trans("Shipment").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print "</table></form><br>\n";
|
||||
|
||||
/*
|
||||
|
||||
@ -38,6 +38,7 @@ $result = restrictedArea($user, 'expedition',$expeditionid,'');
|
||||
$search_ref_exp = GETPOST("search_ref_exp");
|
||||
$search_ref_liv = GETPOST('search_ref_liv');
|
||||
$search_company = GETPOST("search_company");
|
||||
$sall = GETPOST('sall');
|
||||
$optioncss = GETPOST('optioncss','alpha');
|
||||
|
||||
$sortfield = GETPOST('sortfield','alpha');
|
||||
@ -63,6 +64,13 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
||||
$viewstatut='';
|
||||
}
|
||||
|
||||
// List of fields to search into when doing a "search in all"
|
||||
$fieldstosearchall = array(
|
||||
'e.ref'=>"Ref",
|
||||
's.nom'=>"ThirdParty"
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -100,6 +108,7 @@ if ($viewstatut <> '') {
|
||||
if ($search_ref_exp) $sql .= natural_search('e.ref', $search_ref_exp);
|
||||
if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv);
|
||||
if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
||||
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
||||
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit + 1,$offset);
|
||||
@ -123,12 +132,21 @@ if ($resql)
|
||||
$i = 0;
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||
}
|
||||
|
||||
$moreforfilter='';
|
||||
|
||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"],"e.ref","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"],"s.nom", "", $param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ThirdParty"), $_SERVER["PHP_SELF"],"s.nom", "", $param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateDeliveryPlanned"), $_SERVER["PHP_SELF"],"e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder);
|
||||
if($conf->livraison_bon->enabled)
|
||||
{
|
||||
|
||||
@ -240,7 +240,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
|
||||
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
||||
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
||||
print $form->select_company($socid,'socid',$filter,1);
|
||||
print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"');
|
||||
print '</td></tr>';
|
||||
// User
|
||||
print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
|
||||
|
||||
@ -218,7 +218,7 @@ print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->tra
|
||||
/*
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
$filter='';
|
||||
print $form->select_company($socid,'socid',$filter,1,1);
|
||||
print $form->select_company($socid,'socid',$filter,1,1,0,array(),0,'','style="width: 95%"');
|
||||
print '</td></tr>';
|
||||
*/
|
||||
// User
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
@ -1056,7 +1056,7 @@ if ($action == 'create')
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans("Draft").'</td></tr>';
|
||||
|
||||
// Description (must be a textarea and not html must be allowed (used in list view)
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td>';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
||||
print '<td>';
|
||||
print '<textarea name="description" cols="80" rows="'.ROWS_3.'">'.GETPOST('description').'</textarea>';
|
||||
print '</td></tr>';
|
||||
@ -1068,7 +1068,7 @@ if ($action == 'create')
|
||||
|
||||
$langs->load("project");
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Project").'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
/* Fix: If a project must be linked to any companies (suppliers or not), project must be not be set as limited to customer but must be not linked to any particular thirdparty
|
||||
if ($societe->fournisseur==1)
|
||||
$numprojet=select_projects(-1,$_POST["projectid"],'projectid');
|
||||
@ -1087,7 +1087,7 @@ if ($action == 'create')
|
||||
if ($conf->contrat->enabled)
|
||||
{
|
||||
$langs->load("contracts");
|
||||
print '<tr><td valign="top">'.$langs->trans("Contract").'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Contract").'</td><td>';
|
||||
$numcontrat=$formcontract->select_contract($soc->id,GETPOST('contratid','int'),'contratid',0,1);
|
||||
if ($numcontrat==0)
|
||||
{
|
||||
@ -1106,19 +1106,19 @@ if ($action == 'create')
|
||||
|
||||
// Public note
|
||||
print '<tr>';
|
||||
print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>';
|
||||
print '<td valign="top" colspan="2">';
|
||||
print '<td tdtop">'.$langs->trans('NotePublic').'</td>';
|
||||
print '<td colspan="2">';
|
||||
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||
print $doleditor->Create(1);
|
||||
//print '<textarea name="note_public" cols="80" rows="'.ROWS_3.'">'.$note_public.'</textarea>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Private note
|
||||
if (!empty($user->societe_id))
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
|
||||
print '<td valign="top" colspan="2">';
|
||||
print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>';
|
||||
print '<td colspan="2">';
|
||||
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||
print $doleditor->Create(1);
|
||||
//print '<textarea name="note_private" cols="80" rows="'.ROWS_3.'">'.$note_private.'</textarea>';
|
||||
@ -1313,7 +1313,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
|
||||
// Description (must be a textarea and not html must be allowed (used in list view)
|
||||
print '<tr><td valign="top">';
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey("Description",'description',$object->description,$object,$user->rights->ficheinter->creer,'textarea');
|
||||
print '</td><td colspan="3">';
|
||||
print $form->editfieldval("Description",'description',$object->description,$object,$user->rights->ficheinter->creer,'textarea:8:80');
|
||||
|
||||
@ -763,7 +763,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
|
||||
dol_fiche_head();
|
||||
|
||||
$out='';
|
||||
$typeleaves=$cp->getTypes(1,-1);
|
||||
$typeleaves=$cp->getTypes(1,1);
|
||||
foreach($typeleaves as $key => $val)
|
||||
{
|
||||
$nb_type = $cp->getCPforUser($user->id, $val['rowid']);
|
||||
|
||||
@ -33,7 +33,9 @@ class Holiday extends CommonObject
|
||||
{
|
||||
public $element='holiday';
|
||||
public $table_element='holiday';
|
||||
|
||||
protected $isnolinkedbythird = 1; // No field fk_soc
|
||||
protected $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see id
|
||||
@ -211,7 +213,8 @@ class Holiday extends CommonObject
|
||||
$sql.= " cp.note_private,";
|
||||
$sql.= " cp.note_public,";
|
||||
$sql.= " cp.fk_user_create,";
|
||||
$sql.= " cp.fk_type";
|
||||
$sql.= " cp.fk_type,";
|
||||
$sql.= " cp.entity";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."holiday as cp";
|
||||
$sql.= " WHERE cp.rowid = ".$id;
|
||||
|
||||
@ -247,6 +250,7 @@ class Holiday extends CommonObject
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->fk_user_create = $obj->fk_user_create;
|
||||
$this->fk_type = $obj->fk_type;
|
||||
$this->entity = $obj->entity;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
@ -1804,8 +1808,8 @@ class Holiday extends CommonObject
|
||||
/**
|
||||
* Return array with list of types
|
||||
*
|
||||
* @param int $active Status of type
|
||||
* @param int $affect Filter on affect (a request will change sold or not)
|
||||
* @param int $active Status of type. -1 = Both
|
||||
* @param int $affect Filter on affect (a request will change sold or not). -1 = Both
|
||||
* @return array Return array with list of types
|
||||
*/
|
||||
function getTypes($active=-1, $affect=-1)
|
||||
|
||||
@ -132,7 +132,8 @@ elseif($action == 'add_event')
|
||||
$new_holiday = $nb_holiday + $add_holiday;
|
||||
|
||||
// add event to existing types of vacation
|
||||
foreach ($typeleaves as $key => $leave) {
|
||||
foreach ($typeleaves as $key => $leave)
|
||||
{
|
||||
$vacationTypeID = $leave['rowid'];
|
||||
|
||||
// On ajoute la modification dans le LOG
|
||||
@ -158,8 +159,18 @@ llxHeader(array(),$langs->trans('CPTitreMenu'));
|
||||
print load_fiche_titre($langs->trans('MenuConfCP'), '', 'title_hrm.png');
|
||||
|
||||
print '<div class="info">'.$langs->trans('LastUpdateCP').': '."\n";
|
||||
if ($holiday->getConfCP('lastUpdate')) print '<strong>'.dol_print_date($db->jdate($holiday->getConfCP('lastUpdate')),'dayhour','tzuser').'</strong>';
|
||||
$lastUpdate = $holiday->getConfCP('lastUpdate', 0);
|
||||
if ($lastUpdate)
|
||||
{
|
||||
$monthLastUpdate = $lastUpdate[4].$lastUpdate[5];
|
||||
$yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3];
|
||||
print '<strong>'.dol_print_date($db->jdate($holiday->getConfCP('lastUpdate')),'dayhour','tzuser').'</strong>';
|
||||
print '<br>'.$langs->trans("MonthOfLastMonthlyUpdate").': <strong>'.$yearLastUpdate.'-'.$monthLastUpdate.'</strong>'."\n";
|
||||
}
|
||||
else print $langs->trans('None');
|
||||
|
||||
|
||||
|
||||
print "</div><br>\n";
|
||||
|
||||
$result = $holiday->updateBalance(); // Create users into table holiday if they don't exists. TODO Remove this whif we use field into table user.
|
||||
@ -193,52 +204,77 @@ if ($cp_events == 1)
|
||||
|
||||
$typeleaves=$holiday->getTypes(1,1);
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
print '<input type="hidden" name="action" value="update" />';
|
||||
|
||||
print '<table class="noborder" width="100%;">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td width="55%">'.$langs->trans('Employee').'</td>';
|
||||
foreach($typeleaves as $key => $val)
|
||||
if (count($typeleaves) == 0)
|
||||
{
|
||||
print '<td width="20%" style="text-align:center">'.$val['label'].'</td>';
|
||||
//print '<div class="info">';
|
||||
print $langs->trans("NoLeaveWithCounterDefined")."<br>\n";
|
||||
print $langs->trans("GoIntoDictionaryHolidayTypes");
|
||||
//print '</div>';
|
||||
}
|
||||
print '<td width="20%" style="text-align:center">'.$langs->trans('Note').'</td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
foreach($listUsers as $users)
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
print '<tr '.$bc[$var].' style="height: 20px;">';
|
||||
print '<td>';
|
||||
$userstatic->id=$users['rowid'];
|
||||
$userstatic->lastname=$users['name'];
|
||||
$userstatic->firstname=$users['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
foreach($typeleaves as $key => $val)
|
||||
{
|
||||
$nbtoshow='';
|
||||
if ($holiday->getCPforUser($users['rowid'], $val['rowid']) != '') $nbtoshow=price2num($holiday->getCPforUser($users['rowid'], $val['rowid']), 5);
|
||||
print '<td style="text-align:center">';
|
||||
print '<input type="text" value="'.$nbtoshow.'" name="nb_holiday_'.$val['rowid'].'['.$users['rowid'].']" size="5" style="text-align: center;"/>';
|
||||
//print ' '.$langs->trans('days');
|
||||
print '</td>'."\n";
|
||||
}
|
||||
print '<td style="text-align:center"><input type="text" value="" name="note_holiday['.$users['rowid'].']" size="30"/></td>';
|
||||
print '<td><input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/></td>'."\n";
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
print '<input type="hidden" name="action" value="update" />';
|
||||
|
||||
print '<table class="noborder" width="100%;">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td width="55%">'.$langs->trans('Employee').'</td>';
|
||||
if (count($typeleaves))
|
||||
{
|
||||
foreach($typeleaves as $key => $val)
|
||||
{
|
||||
print '<td width="20%" style="text-align:center">'.$val['label'].'</td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td>'.$langs->trans("NoLeaveWithCounterDefined").'</td>';
|
||||
}
|
||||
print '<td width="20%" style="text-align:center">'.$langs->trans('Note').'</td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
|
||||
$i++;
|
||||
|
||||
|
||||
foreach($listUsers as $users)
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
print '<tr '.$bc[$var].' style="height: 20px;">';
|
||||
print '<td>';
|
||||
$userstatic->id=$users['rowid'];
|
||||
$userstatic->lastname=$users['name'];
|
||||
$userstatic->firstname=$users['firstname'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
if (count($typeleaves))
|
||||
{
|
||||
foreach($typeleaves as $key => $val)
|
||||
{
|
||||
$nbtoshow='';
|
||||
if ($holiday->getCPforUser($users['rowid'], $val['rowid']) != '') $nbtoshow=price2num($holiday->getCPforUser($users['rowid'], $val['rowid']), 5);
|
||||
print '<td style="text-align:center">';
|
||||
print '<input type="text" value="'.$nbtoshow.'" name="nb_holiday_'.$val['rowid'].'['.$users['rowid'].']" size="5" style="text-align: center;"/>';
|
||||
//print ' '.$langs->trans('days');
|
||||
print '</td>'."\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td></td>';
|
||||
}
|
||||
print '<td style="text-align:center"><input type="text" value="" name="note_holiday['.$users['rowid'].']" size="30"/></td>';
|
||||
print '<td><input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/></td>'."\n";
|
||||
print '</tr>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -253,6 +253,7 @@ else
|
||||
dol_fiche_head('');
|
||||
}
|
||||
|
||||
$alltypeleaves=$holiday->getTypes(1,-1); // To have labels
|
||||
|
||||
$out='';
|
||||
$typeleaves=$holiday->getTypes(1,1);
|
||||
@ -291,7 +292,7 @@ print_liste_field_titre($langs->trans("DateCreateCP"),$_SERVER["PHP_SELF"],"cp.d
|
||||
print_liste_field_titre($langs->trans("Employe"),$_SERVER["PHP_SELF"],"cp.fk_user","",'','',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ValidatorCP"),$_SERVER["PHP_SELF"],"cp.fk_validator","",'','',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Duration"),$_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Duration"),$_SERVER["PHP_SELF"],'','','','align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateDebCP"),$_SERVER["PHP_SELF"],"cp.date_debut","",'','align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateFinCP"),$_SERVER["PHP_SELF"],"cp.date_fin","",'','align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"cp.statut","",'','align="center"',$sortfield,$sortorder);
|
||||
@ -407,7 +408,10 @@ if (! empty($holiday->holiday))
|
||||
print '<td style="text-align: center;">'.dol_print_date($date,'day').'</td>';
|
||||
print '<td>'.$userstatic->getNomUrl('1').'</td>';
|
||||
print '<td>'.$approbatorstatic->getNomUrl('1').'</td>';
|
||||
print '<td>'.$infos_CP['fk_type'].'</td>';
|
||||
print '<td>';
|
||||
$label=$alltypeleaves[$infos_CP['fk_type']]['label'];
|
||||
print $label?$label:$infos_CP['fk_type'];
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
$nbopenedday=num_open_day($infos_CP['date_debut_gmt'], $infos_CP['date_fin_gmt'], 0, 1, $infos_CP['halfday']);
|
||||
print $nbopenedday.' '.$langs->trans('DurationDays');
|
||||
|
||||
@ -1,156 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011 François Legastelois <flegastelois@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 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/holiday/month_report.php
|
||||
* \ingroup holiday
|
||||
* \brief Monthly report of paid holiday.
|
||||
*/
|
||||
|
||||
require('../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||
|
||||
// Protection if external user
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
|
||||
// Si l'utilisateur n'a pas le droit de lire cette page
|
||||
if(!$user->rights->holiday->read_all) accessforbidden();
|
||||
|
||||
$langs->load('hrm');
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$html = new Form($db);
|
||||
$htmlother = new FormOther($db);
|
||||
$holidaystatic = new Holiday($db);
|
||||
|
||||
llxHeader(array(),$langs->trans('CPTitreMenu'));
|
||||
|
||||
$cp = new Holiday($db);
|
||||
|
||||
$month = GETPOST('month_start');
|
||||
$year = GETPOST('year_start');
|
||||
|
||||
if(empty($month)) {
|
||||
$month = date('n');
|
||||
}
|
||||
if(empty($year)) {
|
||||
$year = date('Y');
|
||||
}
|
||||
|
||||
$sql = "SELECT cp.rowid, cp.fk_user, cp.date_debut, cp.date_fin, cp.halfday";
|
||||
$sql.= " FROM " . MAIN_DB_PREFIX . "holiday cp";
|
||||
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "user u ON cp.fk_user = u.rowid";
|
||||
$sql.= " WHERE cp.statut = 3"; // Approved
|
||||
// TODO Use BETWEEN instead of date_format
|
||||
$sql.= " AND (date_format(cp.date_debut, '%Y-%c') = '$year-$month' OR date_format(cp.date_fin, '%Y-%c') = '$year-$month')";
|
||||
$sql.= " ORDER BY u.lastname,cp.date_debut";
|
||||
|
||||
$result = $db->query($sql);
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
print load_fiche_titre($langs->trans('MenuReportMonth'), '', 'title_hrm.png');
|
||||
|
||||
// Get month of last update
|
||||
$lastUpdate = $cp->getConfCP('lastUpdate', 0);
|
||||
$monthLastUpdate = $lastUpdate[4].$lastUpdate[5];
|
||||
$yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3];
|
||||
print $langs->trans("MonthOfLastMonthlyUpdate").': <strong>'.$yearLastUpdate.'-'.$monthLastUpdate.'</strong><br><br>'."\n";
|
||||
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print $langs->trans('Month').': ';
|
||||
print $htmlother->select_month($month, 'month_start').' ';
|
||||
print $htmlother->select_year($year,'year_start',1,10,3);
|
||||
|
||||
print '<input type="submit" value="'.$langs->trans("Refresh").'" class="button" />';
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
$var=true;
|
||||
print '<table class="noborder" width="40%;">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans('Ref').'</td>';
|
||||
print '<td>'.$langs->trans('Employee').'</td>';
|
||||
print '<td>'.$langs->trans('DateDebCP').'</td>';
|
||||
print '<td>'.$langs->trans('DateFinCP').'</td>';
|
||||
print '<td align="right">'.$langs->trans('nbJours').'</td>';
|
||||
print '</tr>';
|
||||
|
||||
if($num == '0') {
|
||||
|
||||
print '<tr class="pair">';
|
||||
print '<td colspan="5">'.$langs->trans('None').'</td>';
|
||||
print '</tr>';
|
||||
|
||||
} else {
|
||||
|
||||
$langs->load('users');
|
||||
|
||||
while ($holiday = $db->fetch_array($result))
|
||||
{
|
||||
$user = new User($db);
|
||||
$user->fetch($holiday['fk_user']);
|
||||
$var=!$var;
|
||||
|
||||
$holidaystatic->id=$holiday['rowid'];
|
||||
$holidaystatic->ref=$holiday['rowid'];
|
||||
|
||||
$start_date=$db->jdate($holiday['date_debut']);
|
||||
$end_date=$db->jdate($holiday['date_fin']);
|
||||
$start_date_gmt=$db->jdate($holiday['date_debut'],1);
|
||||
$end_date_gmt=$db->jdate($holiday['date_fin'],1);
|
||||
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$holidaystatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.$user->getNomUrl(1).'</td>';
|
||||
print '<td>'.dol_print_date($start_date,'day');
|
||||
print '</td>';
|
||||
print '<td>'.dol_print_date($end_date,'day');
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
$nbopenedday=num_open_day($start_date_gmt, $end_date_gmt, 0, 1, $holiday['halfday']);
|
||||
print $nbopenedday;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
// Fin de page
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2007-2016 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
|
||||
@ -101,10 +101,10 @@ foreach($cp->logs as $logs_CP)
|
||||
|
||||
}
|
||||
|
||||
if($log_holiday == '2')
|
||||
if ($log_holiday == '2')
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td colspan="7" class="pair" style="text-align: center; padding: 5px;">'.$langs->trans('NoResults').'</td>';
|
||||
print '<td colspan="8" '.$bc[false].'>'.$langs->trans('None').'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -17,46 +17,46 @@
|
||||
*/
|
||||
|
||||
body {
|
||||
font-size:13px;
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
|
||||
background: #f0f0f0;
|
||||
margin: 15px 30px 10px;
|
||||
font-size:13px;
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
|
||||
background: #fcfcfc;
|
||||
margin: 15px 30px 10px;
|
||||
}
|
||||
|
||||
div.titre {
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0 0 0 0;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0 0 0 0;
|
||||
}
|
||||
|
||||
span.titre {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
background: #FFFFFF;
|
||||
color: #444;
|
||||
border: 1px solid #999;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0 0 0 20px;
|
||||
font-size: 90%;
|
||||
font-weight: bold;
|
||||
background: #FFFFFF;
|
||||
color: #444;
|
||||
border: 1px solid #999;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0 0 0 15px;
|
||||
}
|
||||
|
||||
div.soustitre {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #4965B3;
|
||||
padding: 0 1.2em 0.5em 2em;
|
||||
margin: 1.2em 1.2em 1.2em 1.2em;
|
||||
border-bottom: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
text-align: right;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #4965B3;
|
||||
padding: 0 1.2em 0.5em 2em;
|
||||
margin: 1.2em 1.2em 1.2em 1.2em;
|
||||
border-bottom: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
input:disabled
|
||||
{
|
||||
background: #FDFDFD;
|
||||
border: 1px solid #ACBCBB;
|
||||
padding: 0 0 0 0;
|
||||
margin: 0 0 0 0;
|
||||
color: #AAA !important;
|
||||
cursor: not-allowed !important;
|
||||
background: #FDFDFD;
|
||||
border: 1px solid #ACBCBB;
|
||||
padding: 0 0 0 0;
|
||||
margin: 0 0 0 0;
|
||||
color: #AAA !important;
|
||||
cursor: not-allowed !important;
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
@ -105,36 +105,32 @@ input:-webkit-autofill {
|
||||
}
|
||||
|
||||
table.main {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
border: 1px solid #A0A0A0;
|
||||
border-radius: 8px;
|
||||
border: solid 1px rgba(90,90,90,.4);
|
||||
-moz-box-shadow: 0 4px 23px 5px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(60,60,60,0.15);
|
||||
-webkit-box-shadow: 0 4px 23px 5px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(60,60,60,0.15);
|
||||
box-shadow: 0 4px 23px 5px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(60,60,60,0.15);
|
||||
background-color: #FFFFFF;
|
||||
background: -webkit-gradient(linear, center top, center bottom, color-stop(0%, #fff), color-stop(100%, #f8f8f8));
|
||||
background: -moz-linear-gradient(top, #fff, #f8f8f8);
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
border: 1px solid #A0A0A0;
|
||||
border-radius: 8px;
|
||||
border: solid 1px rgba(90,90,90,.4);
|
||||
background-color: #fff;
|
||||
-moz-box-shadow: 0px 1px 6px 2px rgba(0, 0, 0, 0.2);
|
||||
-webkit-box-shadow: 0px 1px 6px 2px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0px 1px 6px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
table.main-inside {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
color: #000000;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
table.listofchoices, tr.listofchoices, td.listofchoices {
|
||||
border-collapse: collapse;
|
||||
border-collapse: collapse;
|
||||
padding: 4px;
|
||||
color: #000000;
|
||||
border: 1px solid #999 !important;
|
||||
border: 1px solid #999 !important;
|
||||
}
|
||||
|
||||
tr.listofchoices {
|
||||
@ -147,119 +143,119 @@ tr.listofchoices {
|
||||
}
|
||||
|
||||
.installchoices table tr td {
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
border-bottom: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
color: #000000;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
border-bottom: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/* OK */
|
||||
div.ok {
|
||||
color: #114466;
|
||||
color: #114466;
|
||||
}
|
||||
font.ok {
|
||||
color: #114466;
|
||||
color: #114466;
|
||||
}
|
||||
|
||||
/* Warning */
|
||||
div.warning {
|
||||
color: #777711;
|
||||
color: #777711;
|
||||
}
|
||||
font.warning {
|
||||
color: #777711;
|
||||
color: #777711;
|
||||
}
|
||||
|
||||
/* Error */
|
||||
div.error {
|
||||
color: #550000;
|
||||
font-weight: bold;
|
||||
padding: 0.2em 0.2em 0.2em 0.2em;
|
||||
margin: 0.5em 0 0.5em 0;
|
||||
border: 1px solid #6C7C8B;
|
||||
color: #550000;
|
||||
font-weight: bold;
|
||||
padding: 0.2em 0.2em 0.2em 0.2em;
|
||||
margin: 0.5em 0 0.5em 0;
|
||||
border: 1px solid #6C7C8B;
|
||||
}
|
||||
font.error {
|
||||
color: #550000;
|
||||
font-weight: bold;
|
||||
color: #550000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Next button */
|
||||
div.nextbutton {
|
||||
text-align: right;
|
||||
margin-top: 10px;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-right: 10px;
|
||||
text-align: right;
|
||||
margin-top: 10px;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
div.header {
|
||||
background-color: #dcdff4;
|
||||
border-bottom: solid black 1px;
|
||||
padding-left: 5px;
|
||||
text-align: center;
|
||||
background-color: #dcdff4;
|
||||
border-bottom: solid black 1px;
|
||||
padding-left: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a:link,a:visited,a:active {
|
||||
text-decoration:none;
|
||||
text-decoration:none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration:underline;
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
a.titre {
|
||||
text-decoration:none;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
|
||||
div.comment {
|
||||
text-decoration:none;
|
||||
color:black;
|
||||
font-size: 13px;
|
||||
text-decoration:none;
|
||||
color:black;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 10px;
|
||||
font-size:16px;
|
||||
font-weight: normal;
|
||||
color: #4965B3;
|
||||
text-shadow: 1px 1px 1px #c0c0c0;
|
||||
margin-top: 10px;
|
||||
font-size:16px;
|
||||
font-weight: normal;
|
||||
color: #4965B3;
|
||||
text-shadow: 1px 1px 1px #c0c0c0;
|
||||
}
|
||||
|
||||
tr.bg1 {
|
||||
background-color: #E5E5E5;
|
||||
background-color: #E5E5E5;
|
||||
}
|
||||
|
||||
tr.bg2 {
|
||||
background-color: #B5C5C5;
|
||||
background-color: #B5C5C5;
|
||||
}
|
||||
|
||||
/* Class for parameters key and value */
|
||||
td.label {
|
||||
color: #5945A3;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0 0 0 0;
|
||||
border-bottom: 1px solid #CCCCDB;
|
||||
color: #5945A3;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0 0 0 0;
|
||||
border-bottom: 1px solid #CCCCDB;
|
||||
}
|
||||
|
||||
/* Class for parameters example */
|
||||
td.comment {
|
||||
color: black;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0 0 0 0;
|
||||
text-decoration:none;
|
||||
font-size: 11px;
|
||||
border-bottom: 1px solid #CCCCDB;
|
||||
color: black;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0 0 0 0;
|
||||
text-decoration:none;
|
||||
font-size: 11px;
|
||||
border-bottom: 1px solid #CCCCDB;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 12px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.install
|
||||
{
|
||||
border: 1px solid #999;
|
||||
padding: 4px 4px 4px 4px;
|
||||
border: 1px solid #999;
|
||||
padding: 4px 4px 4px 4px;
|
||||
}
|
||||
|
||||
div.visible {
|
||||
@ -294,9 +290,9 @@ a.button:hover {
|
||||
}
|
||||
|
||||
.choiceselected {
|
||||
background-color: #dfd;
|
||||
background-repeat: repeat-x;
|
||||
background-position: top left;
|
||||
background-color: #dfd;
|
||||
background-repeat: repeat-x;
|
||||
background-position: top left;
|
||||
}
|
||||
|
||||
.center {
|
||||
|
||||
@ -371,6 +371,7 @@ function pHeader($subtitle,$next,$action='set',$param='',$forcejqueryurl='')
|
||||
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'."\n";
|
||||
print '<html>'."\n";
|
||||
print '<head>'."\n";
|
||||
print '<meta name="viewport" content="width=device-width, initial-scale=1.0">'."\n";
|
||||
print '<meta http-equiv="content-type" content="text/html; charset='.$conf->file->character_set_client.'">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="default.css">'."\n";
|
||||
|
||||
|
||||
@ -362,7 +362,7 @@ HideAnyVATInformationOnPDF=Hide all information related to VAT on generated PDF
|
||||
HideDescOnPDF=Hide products description on generated PDF
|
||||
HideRefOnPDF=Hide products ref. on generated PDF
|
||||
HideDetailsOnPDF=Hide products lines details on generated PDF
|
||||
PlaceCustomerAddressToIsoLocation=Use french standard position (La Posteà for customer address position
|
||||
PlaceCustomerAddressToIsoLocation=Use french standard position (La Poste) for customer address position
|
||||
Library=Library
|
||||
UrlGenerationParameters=Parameters to secure URLs
|
||||
SecurityTokenIsUnique=Use a unique securekey parameter for each URL
|
||||
|
||||
@ -22,7 +22,7 @@ ReviewedByCP=Will be reviewed by
|
||||
DescCP=Description
|
||||
SendRequestCP=Create leave request
|
||||
DelayToRequestCP=Leave requests must be made at least <b>%s day(s)</b> before them.
|
||||
MenuConfCP=Edit balance of leaves
|
||||
MenuConfCP=Balance of leaves
|
||||
UpdateAllCP=Update the leaves
|
||||
SoldeCPUser=Leaves balance is <b>%s</b> days.
|
||||
ErrorEndDateCP=You must select an end date greater than the start date.
|
||||
@ -140,4 +140,7 @@ HolidaysRefusedBody=Your leave request for %s to %s has been denied for the foll
|
||||
HolidaysCanceled=Canceled leaved request
|
||||
HolidaysCanceledBody=Your leave request for %s to %s has been canceled.
|
||||
NewByMonth=Added per month
|
||||
Affect=Followed by a counter
|
||||
FollowedByACounter=1: This type of leave need to be followed by a counter. Counter is incremented manually or automatically and when a leave request is validated, counter is decremented.<br>0: Not followed by a counter.
|
||||
NoLeaveWithCounterDefined=There is no leave types defined that need to be followed by a counter
|
||||
GoIntoDictionaryHolidayTypes=Go into <strong>Home - Setup - Dictionaries - Type of leaves</strong> to setup the different types of leaves.
|
||||
@ -8,7 +8,7 @@ TokenDeleted=Token deleted
|
||||
RequestAccess=Click here to request/renew access and receive a new token to save
|
||||
DeleteAccess=Click here to delete token
|
||||
UseTheFollowingUrlAsRedirectURI=Use the following URL as the Redirect URI when creating your credential on your OAuth provider:
|
||||
ListOfSupportedOauthProviders=Enter here credential provided by your OAuth2 provider. Only supported OAuth2 providers are visible here. This setup may be used by other modules than need OAuth2 authentication.
|
||||
ListOfSupportedOauthProviders=Enter here credential provided by your OAuth2 provider. Only supported OAuth2 providers are visible here. This setup may be used by other modules that need OAuth2 authentication.
|
||||
OAUTH_GOOGLE_NAME=Api Google
|
||||
OAUTH_GOOGLE_ID=Api Google Id
|
||||
OAUTH_GOOGLE_SECRET=Api Google Secret
|
||||
|
||||
@ -873,7 +873,7 @@ else
|
||||
// Description (used in invoice, propal...)
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
|
||||
$doleditor = new DolEditor('desc', GETPOST('desc'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, 80);
|
||||
$doleditor = new DolEditor('desc', GETPOST('desc'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, '80%');
|
||||
$doleditor->Create();
|
||||
|
||||
print "</td></tr>";
|
||||
@ -977,7 +977,7 @@ else
|
||||
print '<tr><td class="tdtop">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="3">';
|
||||
|
||||
// We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF.
|
||||
$doleditor = new DolEditor('note', GETPOST('note'), '', 140, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 8, 70);
|
||||
$doleditor = new DolEditor('note', GETPOST('note'), '', 140, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 8, '80%');
|
||||
$doleditor->Create();
|
||||
|
||||
print "</td></tr>";
|
||||
|
||||
@ -222,10 +222,7 @@ else
|
||||
// multilang
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_lang as pl ON pl.fk_product = p.rowid AND pl.lang = '".$langs->getDefaultLang() ."'";
|
||||
$sql.= ' WHERE p.entity IN ('.getEntity('product', 1).')';
|
||||
if ($sall)
|
||||
{
|
||||
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
||||
}
|
||||
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
||||
// if the type is not 1, we show all products (type = 0,2,3)
|
||||
if (dol_strlen($type))
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
@ -350,8 +350,11 @@ if ($resql)
|
||||
|
||||
// Warehouse
|
||||
print '<td>';
|
||||
$warehousetmp->fetch($objp->fk_entrepot);
|
||||
print $warehousetmp->getNomUrl(1);
|
||||
if ($objp->fk_entrepot > 0)
|
||||
{
|
||||
$warehousetmp->fetch($objp->fk_entrepot);
|
||||
print $warehousetmp->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="center">'.$objp->batch.'</td>';
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>';
|
||||
|
||||
@ -192,7 +192,7 @@ if ($action == 'create')
|
||||
print '<tr><td >'.$langs->trans("LocationSummary").'</td><td colspan="3"><input name="lieu" size="40" value="'.(!empty($object->lieu)?$object->lieu:'').'"></td></tr>';
|
||||
|
||||
// Description
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
// Editeur wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor('desc',(!empty($object->description)?$object->description:''),'',180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70);
|
||||
@ -270,7 +270,7 @@ else
|
||||
print '<tr><td>'.$langs->trans("LocationSummary").'</td><td colspan="3">'.$object->lieu.'</td></tr>';
|
||||
|
||||
// Description
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="3">'.nl2br($object->description).'</td></tr>';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">'.nl2br($object->description).'</td></tr>';
|
||||
|
||||
// Address
|
||||
print '<tr><td>'.$langs->trans('Address').'</td><td colspan="3">';
|
||||
@ -298,17 +298,17 @@ else
|
||||
$calcproducts=$object->nb_products();
|
||||
|
||||
// Total nb of different products
|
||||
print '<tr><td valign="top">'.$langs->trans("NumberOfDifferentProducts").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("NumberOfDifferentProducts").'</td><td colspan="3">';
|
||||
print empty($calcproductsunique['nb'])?'0':$calcproductsunique['nb'];
|
||||
print "</td></tr>";
|
||||
|
||||
// Nb of products
|
||||
print '<tr><td valign="top">'.$langs->trans("NumberOfProducts").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("NumberOfProducts").'</td><td colspan="3">';
|
||||
print empty($calcproducts['nb'])?'0':$calcproducts['nb'];
|
||||
print "</td></tr>";
|
||||
|
||||
// Value
|
||||
print '<tr><td valign="top">'.$langs->trans("EstimatedStockValueShort").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("EstimatedStockValueShort").'</td><td colspan="3">';
|
||||
print price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'],'MT')), 0, $langs, 0, -1, -1, $conf->currency);
|
||||
print "</td></tr>";
|
||||
|
||||
@ -326,7 +326,7 @@ else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print '<tr><td valign="top">'.$langs->trans("LastMovement").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("LastMovement").'</td><td colspan="3">';
|
||||
if ($lastmovementdate)
|
||||
{
|
||||
print dol_print_date($lastmovementdate,'dayhour').' ';
|
||||
@ -529,10 +529,10 @@ else
|
||||
// Ref
|
||||
print '<tr><td width="20%" class="fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="libelle" size="20" value="'.$object->libelle.'"></td></tr>';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("LocationSummary").'</td><td colspan="3"><input name="lieu" size="40" value="'.$object->lieu.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("LocationSummary").'</td><td colspan="3"><input name="lieu" size="40" value="'.$object->lieu.'"></td></tr>';
|
||||
|
||||
// Description
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
// Editeur wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor('desc',$object->description,'',180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70);
|
||||
@ -551,12 +551,12 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
||||
print $form->select_country($object->country_id?$object->country_id:$mysoc->country_code,'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
print '<select name="statut" class="flat">';
|
||||
print '<option value="0" '.($object->statut == 0?'selected':'').'>'.$langs->trans("WarehouseClosed").'</option>';
|
||||
print '<option value="1" '.($object->statut == 0?'':'selected').'>'.$langs->trans("WarehouseOpened").'</option>';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -57,8 +57,7 @@ print '<table class="noborder nohover" width="100%">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td colspan="3">'.$langs->trans("Search").'</td></tr>';
|
||||
print "<tr ".$bc[false]."><td>";
|
||||
print $langs->trans("Ref").':</td><td><input class="flat" type="text" size="18" name="sref"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print "<tr ".$bc[false]."><td>".$langs->trans("Other").':</td><td><input type="text" name="sall" class="flat" size="18"></td>';
|
||||
print $langs->trans("Warehouse").':</td><td><input class="flat" type="text" size="18" name="sall"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print "</table></form><br>";
|
||||
|
||||
$sql = "SELECT e.label, e.rowid, e.statut";
|
||||
|
||||
@ -48,6 +48,17 @@ $offset = $limit * $page;
|
||||
|
||||
$year = strftime("%Y",time());
|
||||
|
||||
// List of fields to search into when doing a "search in all"
|
||||
$fieldstosearchall = array(
|
||||
'e.label'=>"Ref",
|
||||
'e.lieu'=>"LocationSummary",
|
||||
'e.description'=>"Description",
|
||||
'e.address'=>"Address",
|
||||
'e.zip'=>'Zip',
|
||||
'e.town'=>'Town',
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -62,11 +73,10 @@ $sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON e.rowid = ps.fk_entrepot";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON ps.fk_product = p.rowid";
|
||||
$sql.= " WHERE e.entity IN (".getEntity('stock', 1).")";
|
||||
|
||||
if ($search_ref) $sql.= natural_search("e.label", $search_ref); // ref
|
||||
if ($search_label) $sql.= natural_search("e.lieu", $search_label); // label
|
||||
if ($search_status != '' && $search_status >= 0) $sql.= " AND e.statut = ".$search_status;
|
||||
if ($sall) $sql.= natural_search(array('e.label','e.description','e.lieu','e.address','e.town'), $sall);
|
||||
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
||||
$sql.= " GROUP BY e.rowid, e.label, e.statut, e.lieu, e.address, e.zip, e.town, e.fk_pays";
|
||||
$totalnboflines=0;
|
||||
$result=$db->query($sql);
|
||||
@ -95,7 +105,15 @@ if ($result)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
if ($sall)
|
||||
{
|
||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||
}
|
||||
|
||||
$moreforfilter='';
|
||||
|
||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"], "e.label","","","",$sortfield,$sortorder);
|
||||
|
||||
@ -283,7 +283,7 @@ print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->tra
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
||||
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
||||
print $form->select_company($socid,'socid',$filter,1);
|
||||
print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"');
|
||||
print '</td></tr>';
|
||||
// User
|
||||
/*print '<tr><td>'.$langs->trans("ProjectCommercial").'</td><td>';
|
||||
|
||||
@ -1031,6 +1031,12 @@ form#login {
|
||||
}
|
||||
.login_main_message {
|
||||
text-align: center;
|
||||
max-width: 560px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.login_main_message .error {
|
||||
border: 1px solid #caa;
|
||||
padding: 10px;
|
||||
}
|
||||
div#login_left, div#login_right {
|
||||
display: inline-block;
|
||||
|
||||
@ -1077,6 +1077,12 @@ form#login {
|
||||
}
|
||||
.login_main_message {
|
||||
text-align: center;
|
||||
max-width: 560px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.login_main_message .error {
|
||||
border: 1px solid #caa;
|
||||
padding: 10px;
|
||||
}
|
||||
div#login_left, div#login_right {
|
||||
display: inline-block;
|
||||
|
||||
@ -235,7 +235,7 @@ if ($action == 'create')
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print "<tr>";
|
||||
print '<td valign="top" class="fieldrequired" width="15%">'.$langs->trans("Name").'</td>';
|
||||
print '<td class="fieldrequired" width="15%">'.$langs->trans("Name").'</td>';
|
||||
print '<td class="valeur"><input size="30" type="text" id="nom" name="nom" value=""></td></tr>';
|
||||
|
||||
// Multicompany
|
||||
@ -253,7 +253,7 @@ if ($action == 'create')
|
||||
}
|
||||
}
|
||||
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||
print "<tr>".'<td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor('note','','',240,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_8,90);
|
||||
$doleditor->Create();
|
||||
@ -310,14 +310,14 @@ else
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Name
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Name").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Name").'</td>';
|
||||
print '<td width="75%" class="valeur">'.$object->name;
|
||||
if (empty($object->entity))
|
||||
{
|
||||
@ -335,7 +335,7 @@ else
|
||||
}
|
||||
|
||||
// Note
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Description").'</td>';
|
||||
print '<tr><td width="25%" class="tdtop">'.$langs->trans("Description").'</td>';
|
||||
print '<td class="valeur">'.dol_htmlentitiesbr($object->note).' </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -100,14 +100,14 @@ dol_fiche_head($head, 'ldap', $langs->trans("Group"), 0, 'group');
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->showrefnav($fgroup,'id','',$canreadperms);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Name
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Name").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Name").'</td>';
|
||||
print '<td width="75%" class="valeur">'.$fgroup->name;
|
||||
if (!$fgroup->entity)
|
||||
{
|
||||
@ -116,7 +116,7 @@ if (!$fgroup->entity)
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Note
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Note").'</td>';
|
||||
print '<tr><td width="25%" class="tdtop">'.$langs->trans("Note").'</td>';
|
||||
print '<td class="valeur">'.nl2br($fgroup->note).' </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -191,14 +191,14 @@ if ($id)
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->showrefnav($fgroup,'id','',$user->rights->user->user->lire || $user->admin);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Name").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Name").'</td>';
|
||||
print '<td colspan="2">'.$fgroup->name.'';
|
||||
if (! $fgroup->entity)
|
||||
{
|
||||
@ -207,7 +207,7 @@ if ($id)
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Note
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Note").'</td>';
|
||||
print '<tr><td width="25%" class="tdtop">'.$langs->trans("Note").'</td>';
|
||||
print '<td class="valeur">'.dol_htmlentitiesbr($fgroup->note).'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user