forked from Wavyzz/dolibarr
Compare commits
105 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d942c9d1a | ||
|
|
3ea9c297ea | ||
|
|
474260e526 | ||
|
|
eead9a93d3 | ||
|
|
7f759c6ff5 | ||
|
|
20aa51f26b | ||
|
|
35f32391a0 | ||
|
|
e0c8ccb9fb | ||
|
|
ef00cb0736 | ||
|
|
d7f7f5bf3d | ||
|
|
7c0a6946a7 | ||
|
|
1ecc1afa9e | ||
|
|
ceb1e699b7 | ||
|
|
c028819cab | ||
|
|
53149bb7cd | ||
|
|
394104291a | ||
|
|
a872b7d42f | ||
|
|
cd7d3f1a36 | ||
|
|
c5572e0176 | ||
|
|
5259547b96 | ||
|
|
31897f54ac | ||
|
|
5dfc1c0897 | ||
|
|
83d7750274 | ||
|
|
8711e51bce | ||
|
|
8375b47e74 | ||
|
|
3fb6978bc8 | ||
|
|
eab1e13343 | ||
|
|
885797b748 | ||
|
|
22bb62d900 | ||
|
|
dada8c8ff5 | ||
|
|
bff2f33022 | ||
|
|
9a666b265f | ||
|
|
15e1d3b456 | ||
|
|
c1c3eb61f8 | ||
|
|
d997309bcb | ||
|
|
05dc40b6b9 | ||
|
|
cf55b54cf5 | ||
|
|
66b2a82be6 | ||
|
|
fc3da0f5be | ||
|
|
b67ed87103 | ||
|
|
6d57c1b5f9 | ||
|
|
8fea6338e1 | ||
|
|
42c97cf7d5 | ||
|
|
03a67cee99 | ||
|
|
0270da7d8c | ||
|
|
6ab12b5911 | ||
|
|
d59b1bb0c6 | ||
|
|
9d582a53ca | ||
|
|
bd8856b988 | ||
|
|
fcb9b693cf | ||
|
|
ecdfa5219b | ||
|
|
30b1db34cd | ||
|
|
edc59b9290 | ||
|
|
24c499aa44 | ||
|
|
8eac45a762 | ||
|
|
3d85407619 | ||
|
|
ca1e3b4d55 | ||
|
|
94bb1ac511 | ||
|
|
8893d8d59f | ||
|
|
aad0b700d4 | ||
|
|
f889c9994b | ||
|
|
0d6709c9f7 | ||
|
|
78778e4c58 | ||
|
|
8bb1545ed0 | ||
|
|
670eed1e68 | ||
|
|
693cf72fca | ||
|
|
d6b909a280 | ||
|
|
8ab53012b7 | ||
|
|
064417dcf1 | ||
|
|
2fbc305683 | ||
|
|
38396e490a | ||
|
|
8911d72be8 | ||
|
|
a30091fd74 | ||
|
|
1b054f1b36 | ||
|
|
7c81124e66 | ||
|
|
16c35035c1 | ||
|
|
4060dd5377 | ||
|
|
52364f0fd9 | ||
|
|
2ba6f96765 | ||
|
|
acaaf53085 | ||
|
|
cf28e4e442 | ||
|
|
83e2951107 | ||
|
|
28c86a613d | ||
|
|
c4029f5e5f | ||
|
|
f322c73dd7 | ||
|
|
6fde6e4250 | ||
|
|
ffde353441 | ||
|
|
bdae4e1c4d | ||
|
|
b462e7b217 | ||
|
|
7cd8b36cea | ||
|
|
330824748b | ||
|
|
06477b40a0 | ||
|
|
4d6d3afbea | ||
|
|
fabc11191d | ||
|
|
f9a66a34d0 | ||
|
|
995f54ca52 | ||
|
|
70a98743e8 | ||
|
|
1f1a614b47 | ||
|
|
7b17b453bf | ||
|
|
23e4cd57f3 | ||
|
|
87f744896d | ||
|
|
d4b02c0552 | ||
|
|
afd9b4ea1a | ||
|
|
e61bcd03ed | ||
|
|
3295498e9e |
@@ -99,6 +99,7 @@ else
|
||||
}
|
||||
|
||||
print "Release : ".$release."\n";
|
||||
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
|
||||
print "Include custom in signature : ".$includecustom."\n";
|
||||
print "Include constants in signature : ";
|
||||
foreach ($includeconstants as $countrycode => $tmp)
|
||||
|
||||
@@ -25,19 +25,19 @@
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement" />
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH">
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCatch">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedFOREACH">
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedForeach">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIF">
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIf">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSE">
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedElse">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSEIF">
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedElseif">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
|
||||
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.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
|
||||
@@ -539,9 +540,9 @@ class AccountancyCategory
|
||||
/**
|
||||
* get cpts of category
|
||||
*
|
||||
* @param int $cat_id Id accounting account category
|
||||
* @param int $cat_id Id accounting account category
|
||||
*
|
||||
* @return array Result in table
|
||||
* @return array|int Result in table or -1 if error
|
||||
*/
|
||||
public function getCptsCat($cat_id) {
|
||||
global $mysoc;
|
||||
|
||||
@@ -868,6 +868,7 @@ if (empty($reshook))
|
||||
// Add custom code and origin country into description
|
||||
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code)))
|
||||
{
|
||||
$tmptxt = '(';
|
||||
// Define output language
|
||||
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
|
||||
$outputlangs = $langs;
|
||||
|
||||
@@ -76,6 +76,9 @@ class Commande extends CommonOrder
|
||||
public $facturee;
|
||||
public $billed; // billed or not
|
||||
|
||||
/**
|
||||
* @var int Draft Status of the order
|
||||
*/
|
||||
public $brouillon;
|
||||
public $cond_reglement_code;
|
||||
|
||||
@@ -226,7 +229,7 @@ class Commande extends CommonOrder
|
||||
$mybool|=@include_once $dir.$file;
|
||||
}
|
||||
|
||||
if (! $mybool)
|
||||
if ($mybool === false)
|
||||
{
|
||||
dol_print_error('',"Failed to include file ".$file);
|
||||
return '';
|
||||
@@ -400,6 +403,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->ref = $num;
|
||||
$this->statut = self::STATUS_VALIDATED;
|
||||
$this->brouillon = 0;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
|
||||
@@ -1196,6 +1196,8 @@ if (empty($reshook))
|
||||
{
|
||||
// Don't add lines with qty 0 when coming from a shipment including all order lines
|
||||
if($srcobject->element == 'shipping' && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS && $lines[$i]->qty == 0) continue;
|
||||
// Don't add closed lines when coming from a contract
|
||||
if($srcobject->element == 'contrat' && $lines[$i]->statut == 5) continue;
|
||||
|
||||
$label=(! empty($lines[$i]->label)?$lines[$i]->label:'');
|
||||
$desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);
|
||||
|
||||
@@ -290,7 +290,7 @@ if ($search_firstname) $sql.= natural_search('p.firstname', $search
|
||||
if ($search_societe) $sql.= natural_search('s.nom', $search_societe);
|
||||
if (strlen($search_poste)) $sql.= natural_search('p.poste', $search_poste);
|
||||
if (strlen($search_phone_perso)) $sql.= natural_search('p.phone_perso', $search_phone_perso);
|
||||
if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone);
|
||||
if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone_pro);
|
||||
if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $search_phone_mobile);
|
||||
if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax);
|
||||
if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype);
|
||||
|
||||
@@ -175,12 +175,12 @@ if (! $error && $massaction == 'confirm_presend')
|
||||
{
|
||||
//var_dump($thirdpartyid.' - '.$objectid.' - '.$object->statut);
|
||||
|
||||
if ($objectclass == 'Facture' && $object->statut != Facture::STATUS_VALIDATED)
|
||||
if ($objectclass == 'Facture' && $object->statut == Facture::STATUS_DRAFT)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$nbignored++;
|
||||
$resaction.='<div class="error">'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$object->ref).'</div><br>';
|
||||
continue; // Payment done or started or canceled
|
||||
continue;
|
||||
}
|
||||
if ($objectclass == 'Commande' && $object->statut == Commande::STATUS_DRAFT)
|
||||
{
|
||||
@@ -598,6 +598,17 @@ if (! $error && $massaction == 'delete' && $permtodelete)
|
||||
$result=$objecttmp->fetch($toselectid);
|
||||
if ($result > 0)
|
||||
{
|
||||
if ($objectclass == "Task" && $objecttmp->hasChildren() > 0) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".$objecttmp->id;
|
||||
$res = $db->query($sql);
|
||||
|
||||
if (!$res)
|
||||
{
|
||||
setEventMessage('ErrorRecordParentingNotModified', 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (in_array($objecttmp->element, array('societe','member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1);
|
||||
else $result = $objecttmp->delete($user);
|
||||
if ($result <= 0)
|
||||
|
||||
@@ -493,7 +493,7 @@ class CMailFile
|
||||
if (! empty($addr_cc)) $this->message->setCc($this->getArrayAddress($addr_cc));
|
||||
if (! empty($addr_bcc)) $this->message->setBcc($this->getArrayAddress($addr_bcc));
|
||||
//if (! empty($errors_to)) $this->message->setErrorsTo($this->getArrayAddress($errors_to);
|
||||
if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) $this->message->setReadReceiptTo($this->getArrayAddress($from));
|
||||
if (isset($deliveryreceipt) && $deliveryreceipt == 1) $this->message->setReadReceiptTo($this->getArrayAddress($from));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -3242,7 +3242,7 @@ class Form
|
||||
if ($obj->situation_final != 1) {
|
||||
//Not prov?
|
||||
if (substr($obj->facnumber, 1, 4) != 'PROV') {
|
||||
if ($selected == $obj->situation_final) {
|
||||
if ($selected == $obj->rowid) {
|
||||
$opt .= '<option value="' . $obj->rowid . '" selected>' . $obj->facnumber . '</option>';
|
||||
} else {
|
||||
$opt .= '<option value="' . $obj->rowid . '">' . $obj->facnumber . '</option>';
|
||||
|
||||
@@ -776,16 +776,16 @@ class FormFile
|
||||
{
|
||||
$colspan=2;
|
||||
|
||||
foreach($link_list as $file)
|
||||
foreach($link_list as $link)
|
||||
{
|
||||
$out.='<tr class="oddeven">';
|
||||
$out.='<td colspan="'.$colspan.'" class="maxwidhtonsmartphone">';
|
||||
$out.='<a data-ajax="false" href="' . $link->url . '" target="_blank">';
|
||||
$out.=$file->label;
|
||||
$out.=$link->label;
|
||||
$out.='</a>';
|
||||
$out.='</td>';
|
||||
$out.='<td align="right">';
|
||||
$out.=dol_print_date($file->datea,'dayhour');
|
||||
$out.=dol_print_date($link->datea,'dayhour');
|
||||
$out.='</td>';
|
||||
if ($delallowed || $printer || $morepicto) $out.='<td></td>';
|
||||
$out.='</tr>'."\n";
|
||||
|
||||
@@ -225,7 +225,7 @@ class FormProjets
|
||||
}
|
||||
else if ($obj->fk_statut == 2)
|
||||
{
|
||||
if ($discard_close == 2) $disabled=1;
|
||||
if ($discard_closed == 2) $disabled=1;
|
||||
$labeltoshow.=' - '.$langs->trans("Closed");
|
||||
}
|
||||
else if ( empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY) && $socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid))
|
||||
@@ -295,22 +295,28 @@ class FormProjets
|
||||
/**
|
||||
* Output a combo list with projects qualified for a third party
|
||||
*
|
||||
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
|
||||
* @param int $selected Id task preselected
|
||||
* @param string $htmlname Name of HTML select
|
||||
* @param int $maxlength Maximum length of label
|
||||
* @param int $option_only Return only html options lines without the select tag
|
||||
* @param string $show_empty Add an empty line ('1' or string to show for empty line)
|
||||
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
|
||||
* @param int $forcefocus Force focus on field (works with javascript only)
|
||||
* @param int $disabled Disabled
|
||||
* @param string $morecss More css added to the select component
|
||||
* @return int Nbr of project if OK, <0 if KO
|
||||
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
|
||||
* @param int $selected Id task preselected
|
||||
* @param string $htmlname Name of HTML select
|
||||
* @param int $maxlength Maximum length of label
|
||||
* @param int $option_only Return only html options lines without the select tag
|
||||
* @param string $show_empty Add an empty line ('1' or string to show for empty line)
|
||||
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
|
||||
* @param int $forcefocus Force focus on field (works with javascript only)
|
||||
* @param int $disabled Disabled
|
||||
* @param string $morecss More css added to the select component
|
||||
* @param User $usertofilter User object to use for filtering
|
||||
* @return int Nbr of project if OK, <0 if KO
|
||||
*/
|
||||
function selectTasks($socid=-1, $selected='', $htmlname='taskid', $maxlength=24, $option_only=0, $show_empty='1', $discard_closed=0, $forcefocus=0, $disabled=0, $morecss='maxwidth500')
|
||||
function selectTasks($socid=-1, $selected='', $htmlname='taskid', $maxlength=24, $option_only=0, $show_empty='1', $discard_closed=0, $forcefocus=0, $disabled=0, $morecss='maxwidth500', $usertofilter=null)
|
||||
{
|
||||
global $user,$conf,$langs;
|
||||
|
||||
if(is_null($usertofilter))
|
||||
{
|
||||
$usertofilter = $user;
|
||||
}
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
$out='';
|
||||
@@ -319,10 +325,10 @@ class FormProjets
|
||||
if (! empty($conf->global->PROJECT_HIDE_UNSELECTABLES)) $hideunselectables = true;
|
||||
|
||||
$projectsListId = false;
|
||||
if (empty($user->rights->projet->all->lire))
|
||||
if (empty($usertofilter->rights->projet->all->lire))
|
||||
{
|
||||
$projectstatic=new Project($this->db);
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1);
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($usertofilter,0,1);
|
||||
}
|
||||
|
||||
// Search all projects
|
||||
@@ -367,7 +373,7 @@ class FormProjets
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
// If we ask to filter on a company and user has no permission to see all companies and project is linked to another company, we hide project.
|
||||
if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($user->rights->societe->lire))
|
||||
if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($usertofilter->rights->societe->lire))
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@@ -292,17 +292,19 @@ class Utils
|
||||
dol_syslog("Run command ".$fullcommandcrypted);
|
||||
$handlein = popen($fullcommandclear, 'r');
|
||||
$i=0;
|
||||
while (!feof($handlein))
|
||||
{
|
||||
$i++; // output line number
|
||||
$read = fgets($handlein);
|
||||
// Exclude warning line we don't want
|
||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||
fwrite($handle,$read);
|
||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
|
||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
|
||||
if ($handlein) {
|
||||
while (!feof($handlein))
|
||||
{
|
||||
$i++; // output line number
|
||||
$read = fgets($handlein);
|
||||
// Exclude warning line we don't want
|
||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||
fwrite($handle,$read);
|
||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
|
||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
|
||||
}
|
||||
pclose($handlein);
|
||||
}
|
||||
pclose($handlein);
|
||||
|
||||
if ($compression == 'none') fclose($handle);
|
||||
if ($compression == 'gz') gzclose($handle);
|
||||
|
||||
@@ -547,7 +547,7 @@ function ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0,
|
||||
* @param string $text_on Text if on
|
||||
* @param string $text_off Text if off
|
||||
* @param array $input Array of type->list of CSS element to switch. Example: array('disabled'=>array(0=>'cssid'))
|
||||
* @return void
|
||||
* @return string html for button on/off
|
||||
*/
|
||||
function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input=array())
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.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
|
||||
@@ -1250,6 +1251,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experience trouble with pdf thumb generation and imagick, you can disable here.
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$ret = dol_convert_file($file, 'png', $fileimage);
|
||||
if ($ret < 0) $error++;
|
||||
}
|
||||
@@ -5975,11 +5977,12 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
|
||||
// No need to make a return $head. Var is modified as a reference
|
||||
if (! empty($hookmanager))
|
||||
{
|
||||
$parameters=array('object' => $object, 'mode' => $mode, 'head'=>$head);
|
||||
$reshook=$hookmanager->executeHooks('completeTabsHead',$parameters);
|
||||
$parameters=array('object' => $object, 'mode' => $mode, 'head' => $head);
|
||||
$reshook=$hookmanager->executeHooks('completeTabsHead', $parameters);
|
||||
if ($reshook > 0)
|
||||
{
|
||||
$head = $hookmanager->resArray;
|
||||
$h = count($head);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.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
|
||||
@@ -20,10 +21,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/lib/order.lib.php
|
||||
* \brief Ensemble de fonctions de base pour le module commande
|
||||
* \ingroup commande
|
||||
*/
|
||||
* \file htdocs/core/lib/import.lib.php
|
||||
* \brief Ensemble de fonctions de base pour le module import
|
||||
* \ingroup import
|
||||
|
||||
/**
|
||||
* Function to return list of tabs for import pages
|
||||
|
||||
@@ -377,7 +377,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh
|
||||
if ($feature == 'project') $feature='projet';
|
||||
if ($feature == 'task') $feature='projet_task';
|
||||
|
||||
$check = array('adherent','banque','user','usergroup','produit','service','produit|service','categorie'); // Test on entity only (Objects with no link to company)
|
||||
$check = array('adherent','banque','user','usergroup','produit','service','produit|service','categorie','expensereport'); // Test on entity only (Objects with no link to company)
|
||||
$checksoc = array('societe'); // Test for societe object
|
||||
$checkother = array('contact','agenda'); // Test on entity and link to third party. Allowed if link is empty (Ex: contacts...).
|
||||
$checkproject = array('projet','project'); // Test for project object
|
||||
|
||||
@@ -126,179 +126,181 @@ function checkLoginPassEntity($usertotest,$passwordtotest,$entitytotest,$authmod
|
||||
* @param Societe $mysoc Company object
|
||||
* @return void
|
||||
*/
|
||||
function dol_loginfunction($langs,$conf,$mysoc)
|
||||
{
|
||||
global $dolibarr_main_demo,$db;
|
||||
global $smartphone,$hookmanager;
|
||||
|
||||
// Instantiate hooks of thirdparty module only if not already define
|
||||
$hookmanager->initHooks(array('mainloginpage'));
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("other");
|
||||
$langs->load("help");
|
||||
$langs->load("admin");
|
||||
|
||||
$main_authentication=$conf->file->main_authentication;
|
||||
$session_name=session_name();
|
||||
|
||||
$dol_url_root = DOL_URL_ROOT;
|
||||
|
||||
// Title
|
||||
$appli=constant('DOL_APPLICATION_TITLE');
|
||||
$title=$appli.' '.constant('DOL_VERSION');
|
||||
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE;
|
||||
$titletruedolibarrversion=constant('DOL_VERSION'); // $title used by login template after the @ to inform of true Dolibarr version
|
||||
|
||||
// Note: $conf->css looks like '/theme/eldy/style.css.php'
|
||||
$conf->css = "/theme/".(GETPOST('theme','alpha')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
|
||||
$themepath=dol_buildpath($conf->css,1);
|
||||
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
|
||||
if (! function_exists('dol_loginfunction')) {
|
||||
function dol_loginfunction($langs,$conf,$mysoc)
|
||||
{
|
||||
foreach($conf->modules_parts['theme'] as $reldir)
|
||||
global $dolibarr_main_demo,$db;
|
||||
global $smartphone,$hookmanager;
|
||||
|
||||
// Instantiate hooks of thirdparty module only if not already define
|
||||
$hookmanager->initHooks(array('mainloginpage'));
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("other");
|
||||
$langs->load("help");
|
||||
$langs->load("admin");
|
||||
|
||||
$main_authentication=$conf->file->main_authentication;
|
||||
$session_name=session_name();
|
||||
|
||||
$dol_url_root = DOL_URL_ROOT;
|
||||
|
||||
// Title
|
||||
$appli=constant('DOL_APPLICATION_TITLE');
|
||||
$title=$appli.' '.constant('DOL_VERSION');
|
||||
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE;
|
||||
$titletruedolibarrversion=constant('DOL_VERSION'); // $title used by login template after the @ to inform of true Dolibarr version
|
||||
|
||||
// Note: $conf->css looks like '/theme/eldy/style.css.php'
|
||||
$conf->css = "/theme/".(GETPOST('theme','alpha')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
|
||||
$themepath=dol_buildpath($conf->css,1);
|
||||
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
|
||||
{
|
||||
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
|
||||
foreach($conf->modules_parts['theme'] as $reldir)
|
||||
{
|
||||
$themepath=dol_buildpath($reldir.$conf->css, 1);
|
||||
break;
|
||||
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
|
||||
{
|
||||
$themepath=dol_buildpath($reldir.$conf->css, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$conf_css = $themepath."?lang=".$langs->defaultlang;
|
||||
|
||||
// Select templates dir
|
||||
if (! empty($conf->modules_parts['tpl'])) // Using this feature slow down application
|
||||
{
|
||||
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl/'));
|
||||
foreach($dirtpls as $reldir)
|
||||
$conf_css = $themepath."?lang=".$langs->defaultlang;
|
||||
|
||||
// Select templates dir
|
||||
if (! empty($conf->modules_parts['tpl'])) // Using this feature slow down application
|
||||
{
|
||||
$tmp=dol_buildpath($reldir.'login.tpl.php');
|
||||
if (file_exists($tmp)) { $template_dir=preg_replace('/login\.tpl\.php$/','',$tmp); break; }
|
||||
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl/'));
|
||||
foreach($dirtpls as $reldir)
|
||||
{
|
||||
$tmp=dol_buildpath($reldir.'login.tpl.php');
|
||||
if (file_exists($tmp)) { $template_dir=preg_replace('/login\.tpl\.php$/','',$tmp); break; }
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_dir = DOL_DOCUMENT_ROOT."/core/tpl/";
|
||||
}
|
||||
|
||||
// Set cookie for timeout management
|
||||
$prefix=dol_getprefix();
|
||||
$sessiontimeout='DOLSESSTIMEOUT_'.$prefix;
|
||||
if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) setcookie($sessiontimeout, $conf->global->MAIN_SESSION_TIMEOUT, 0, "/", '', 0);
|
||||
|
||||
if (GETPOST('urlfrom','alpha')) $_SESSION["urlfrom"]=GETPOST('urlfrom','alpha');
|
||||
else unset($_SESSION["urlfrom"]);
|
||||
|
||||
if (! GETPOST("username")) $focus_element='username';
|
||||
else $focus_element='password';
|
||||
|
||||
$demologin='';
|
||||
$demopassword='';
|
||||
if (! empty($dolibarr_main_demo))
|
||||
{
|
||||
$tab=explode(',',$dolibarr_main_demo);
|
||||
$demologin=$tab[0];
|
||||
$demopassword=$tab[1];
|
||||
}
|
||||
|
||||
// Execute hook getLoginPageOptions (for table)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
if (is_array($hookmanager->resArray) && ! empty($hookmanager->resArray)) {
|
||||
$morelogincontent = $hookmanager->resArray; // (deprecated) For compatibility
|
||||
} else {
|
||||
$morelogincontent = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
// Execute hook getLoginPageExtraOptions (eg for js)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageExtraOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
$moreloginextracontent = $hookmanager->resPrint;
|
||||
|
||||
// Login
|
||||
$login = (! empty($hookmanager->resArray['username']) ? $hookmanager->resArray['username'] : (GETPOST("username","alpha") ? GETPOST("username","alpha") : $demologin));
|
||||
$password = $demopassword;
|
||||
|
||||
// Show logo (search in order: small company logo, large company logo, theme logo, common logo)
|
||||
$width=0;
|
||||
$urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
|
||||
|
||||
if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
||||
}
|
||||
elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($mysoc->logo);
|
||||
$width=128;
|
||||
}
|
||||
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png';
|
||||
}
|
||||
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png';
|
||||
}
|
||||
|
||||
// Security graphical code
|
||||
$captcha=0;
|
||||
$captcha_refresh='';
|
||||
if (function_exists("imagecreatefrompng") && ! empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA))
|
||||
{
|
||||
$captcha=1;
|
||||
$captcha_refresh=img_picto($langs->trans("Refresh"),'refresh','id="captcha_refresh_img"');
|
||||
}
|
||||
|
||||
// Extra link
|
||||
$forgetpasslink=0;
|
||||
$helpcenterlink=0;
|
||||
if (empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK) || empty($conf->global->MAIN_HELPCENTER_DISABLELINK))
|
||||
{
|
||||
if (empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK))
|
||||
else
|
||||
{
|
||||
$forgetpasslink=1;
|
||||
$template_dir = DOL_DOCUMENT_ROOT."/core/tpl/";
|
||||
}
|
||||
|
||||
if (empty($conf->global->MAIN_HELPCENTER_DISABLELINK))
|
||||
|
||||
// Set cookie for timeout management
|
||||
$prefix=dol_getprefix();
|
||||
$sessiontimeout='DOLSESSTIMEOUT_'.$prefix;
|
||||
if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) setcookie($sessiontimeout, $conf->global->MAIN_SESSION_TIMEOUT, 0, "/", '', 0);
|
||||
|
||||
if (GETPOST('urlfrom','alpha')) $_SESSION["urlfrom"]=GETPOST('urlfrom','alpha');
|
||||
else unset($_SESSION["urlfrom"]);
|
||||
|
||||
if (! GETPOST("username")) $focus_element='username';
|
||||
else $focus_element='password';
|
||||
|
||||
$demologin='';
|
||||
$demopassword='';
|
||||
if (! empty($dolibarr_main_demo))
|
||||
{
|
||||
$helpcenterlink=1;
|
||||
$tab=explode(',',$dolibarr_main_demo);
|
||||
$demologin=$tab[0];
|
||||
$demopassword=$tab[1];
|
||||
}
|
||||
|
||||
// Execute hook getLoginPageOptions (for table)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
if (is_array($hookmanager->resArray) && ! empty($hookmanager->resArray)) {
|
||||
$morelogincontent = $hookmanager->resArray; // (deprecated) For compatibility
|
||||
} else {
|
||||
$morelogincontent = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
// Execute hook getLoginPageExtraOptions (eg for js)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageExtraOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
$moreloginextracontent = $hookmanager->resPrint;
|
||||
|
||||
// Login
|
||||
$login = (! empty($hookmanager->resArray['username']) ? $hookmanager->resArray['username'] : (GETPOST("username","alpha") ? GETPOST("username","alpha") : $demologin));
|
||||
$password = $demopassword;
|
||||
|
||||
// Show logo (search in order: small company logo, large company logo, theme logo, common logo)
|
||||
$width=0;
|
||||
$urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
|
||||
|
||||
if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
||||
}
|
||||
elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($mysoc->logo);
|
||||
$width=128;
|
||||
}
|
||||
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png';
|
||||
}
|
||||
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png';
|
||||
}
|
||||
|
||||
// Security graphical code
|
||||
$captcha=0;
|
||||
$captcha_refresh='';
|
||||
if (function_exists("imagecreatefrompng") && ! empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA))
|
||||
{
|
||||
$captcha=1;
|
||||
$captcha_refresh=img_picto($langs->trans("Refresh"),'refresh','id="captcha_refresh_img"');
|
||||
}
|
||||
|
||||
// Extra link
|
||||
$forgetpasslink=0;
|
||||
$helpcenterlink=0;
|
||||
if (empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK) || empty($conf->global->MAIN_HELPCENTER_DISABLELINK))
|
||||
{
|
||||
if (empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK))
|
||||
{
|
||||
$forgetpasslink=1;
|
||||
}
|
||||
|
||||
if (empty($conf->global->MAIN_HELPCENTER_DISABLELINK))
|
||||
{
|
||||
$helpcenterlink=1;
|
||||
}
|
||||
}
|
||||
|
||||
// Home message
|
||||
$main_home='';
|
||||
if (! empty($conf->global->MAIN_HOME))
|
||||
{
|
||||
$substitutionarray=getCommonSubstitutionArray($langs);
|
||||
complete_substitutions_array($substitutionarray, $langs);
|
||||
$texttoshow = make_substitutions($conf->global->MAIN_HOME, $substitutionarray, $langs);
|
||||
|
||||
$main_home=dol_htmlcleanlastbr($texttoshow);
|
||||
}
|
||||
|
||||
// Google AD
|
||||
$main_google_ad_client = ((! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))?1:0);
|
||||
|
||||
// Set jquery theme
|
||||
$dol_loginmesg = (! empty($_SESSION["dol_loginmesg"])?$_SESSION["dol_loginmesg"]:'');
|
||||
$favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1);
|
||||
if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL;
|
||||
$jquerytheme = 'smoothness';
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
|
||||
|
||||
// Set dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen, dol_no_mouse_hover
|
||||
$dol_hide_topmenu=GETPOST('dol_hide_topmenu','int');
|
||||
$dol_hide_leftmenu=GETPOST('dol_hide_leftmenu','int');
|
||||
$dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen','int');
|
||||
$dol_no_mouse_hover=GETPOST('dol_no_mouse_hover','int');
|
||||
$dol_use_jmobile=GETPOST('dol_use_jmobile','int');
|
||||
|
||||
// Include login page template
|
||||
include $template_dir.'login.tpl.php';
|
||||
|
||||
|
||||
$_SESSION["dol_loginmesg"] = '';
|
||||
}
|
||||
|
||||
// Home message
|
||||
$main_home='';
|
||||
if (! empty($conf->global->MAIN_HOME))
|
||||
{
|
||||
$substitutionarray=getCommonSubstitutionArray($langs);
|
||||
complete_substitutions_array($substitutionarray, $langs);
|
||||
$texttoshow = make_substitutions($conf->global->MAIN_HOME, $substitutionarray, $langs);
|
||||
|
||||
$main_home=dol_htmlcleanlastbr($texttoshow);
|
||||
}
|
||||
|
||||
// Google AD
|
||||
$main_google_ad_client = ((! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))?1:0);
|
||||
|
||||
// Set jquery theme
|
||||
$dol_loginmesg = (! empty($_SESSION["dol_loginmesg"])?$_SESSION["dol_loginmesg"]:'');
|
||||
$favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1);
|
||||
if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL;
|
||||
$jquerytheme = 'smoothness';
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
|
||||
|
||||
// Set dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen, dol_no_mouse_hover
|
||||
$dol_hide_topmenu=GETPOST('dol_hide_topmenu','int');
|
||||
$dol_hide_leftmenu=GETPOST('dol_hide_leftmenu','int');
|
||||
$dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen','int');
|
||||
$dol_no_mouse_hover=GETPOST('dol_no_mouse_hover','int');
|
||||
$dol_use_jmobile=GETPOST('dol_use_jmobile','int');
|
||||
|
||||
// Include login page template
|
||||
include $template_dir.'login.tpl.php';
|
||||
|
||||
|
||||
$_SESSION["dol_loginmesg"] = '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -149,6 +149,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -158,6 +158,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -129,6 +129,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -245,6 +245,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$heightforinfotot = 40; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
{
|
||||
|
||||
@@ -175,6 +175,7 @@ class pdf_strato extends ModelePDFContract
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -163,6 +163,7 @@ class pdf_merou extends ModelePdfExpedition
|
||||
$heightforinfotot = 0; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -225,6 +225,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$heightforinfotot = 8; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -205,6 +205,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$heightforinfotot = 40; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -265,6 +265,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$heightforinfotot = 50+(4*$nbpayments); // Height reserved to output the info and total part and payment part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
{
|
||||
|
||||
@@ -166,6 +166,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -195,6 +195,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$heightforinfotot = 30; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
@@ -754,43 +755,6 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
|
||||
$posy+=2;
|
||||
|
||||
// Add list of linked orders on shipment
|
||||
// Currently not supported by pdf_writeLinkedObjects, link for delivery to order is done through shipment)
|
||||
if ($object->origin == 'expedition' || $object->origin == 'shipping')
|
||||
{
|
||||
$Yoff=$posy-5;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
|
||||
$shipment = new Expedition($this->db);
|
||||
$shipment->fetch($object->origin_id);
|
||||
|
||||
$origin = $shipment->origin;
|
||||
$origin_id = $shipment->origin_id;
|
||||
|
||||
if ($conf->$origin->enabled)
|
||||
{
|
||||
$outputlangs->load('orders');
|
||||
|
||||
$classname = ucfirst($origin);
|
||||
$linkedobject = new $classname($this->db);
|
||||
$result=$linkedobject->fetch($origin_id);
|
||||
if ($result >= 0)
|
||||
{
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$text=$linkedobject->ref;
|
||||
if ($linkedobject->ref_client) $text.=' ('.$linkedobject->ref_client.')';
|
||||
$Yoff = $Yoff+8;
|
||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - 100,$Yoff);
|
||||
$pdf->MultiCell(100, 2, $outputlangs->transnoentities("RefOrder") ." : ".$outputlangs->transnoentities($text), 0, 'R');
|
||||
$Yoff = $Yoff+3;
|
||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - 60,$Yoff);
|
||||
$pdf->MultiCell(60, 2, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($linkedobject->date,"day",false,$outputlangs,true), 0, 'R');
|
||||
}
|
||||
}
|
||||
|
||||
$posy=$Yoff;
|
||||
}
|
||||
|
||||
// Show list of linked objects
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size);
|
||||
|
||||
|
||||
@@ -195,6 +195,7 @@ class pdf_standard extends ModelePDFProduct
|
||||
$heightforinfotot = 40; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
{
|
||||
|
||||
@@ -141,6 +141,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -159,6 +159,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -328,6 +328,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$heightforsignature = empty($conf->global->PROPAL_DISABLE_SIGNATURE)?(pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature"))+10):0;
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;
|
||||
|
||||
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||
|
||||
@@ -211,6 +211,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -223,6 +223,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -219,6 +219,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -239,6 +239,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
|
||||
@@ -30,7 +30,7 @@ $WIDTH=DolGraph::getDefaultGraphSizeForStats('width');
|
||||
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height');
|
||||
|
||||
$mode='customer';
|
||||
if ($mode == 'customer' && ! $user->rights->ficheinter->lire) accessforbidden();
|
||||
if (! $user->rights->ficheinter->lire) accessforbidden();
|
||||
|
||||
$userid=GETPOST('userid','int');
|
||||
$socid=GETPOST('socid','int');
|
||||
@@ -49,10 +49,7 @@ $endyear=$year;
|
||||
|
||||
$object_status=GETPOST('object_status');
|
||||
|
||||
$langs->load('interventions');
|
||||
$langs->load('companies');
|
||||
$langs->load('other');
|
||||
$langs->load('suppliers');
|
||||
$langs->loadLangs(array('interventions', 'companies', 'other', 'suppliers'));
|
||||
|
||||
|
||||
/*
|
||||
@@ -62,11 +59,8 @@ $langs->load('suppliers');
|
||||
$form=new Form($db);
|
||||
$objectstatic=new FichInter($db);
|
||||
|
||||
if ($mode == 'customer')
|
||||
{
|
||||
$title=$langs->trans("InterventionStatistics");
|
||||
$dir=$conf->ficheinter->dir_temp;
|
||||
}
|
||||
$title=$langs->trans("InterventionStatistics");
|
||||
$dir=$conf->ficheinter->dir_temp;
|
||||
|
||||
llxHeader('', $title);
|
||||
|
||||
@@ -79,19 +73,18 @@ if ($object_status != '' && $object_status > -1) $stats->where .= ' AND c.fk_sta
|
||||
|
||||
// Build graphic number of object
|
||||
$data = $stats->getNbByMonthWithPrevYear($endyear,$startyear);
|
||||
//var_dump($data);
|
||||
// $data = array(array('Lib',val1,val2,val3),...)
|
||||
|
||||
|
||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||
{
|
||||
$filenamenb = $dir.'/interventionsnbinyear-'.$user->id.'-'.$year.'.png';
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsnbinyear-'.$user->id.'-'.$year.'.png';
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsnbinyear-'.$user->id.'-'.$year.'.png';
|
||||
}
|
||||
else
|
||||
{
|
||||
$filenamenb = $dir.'/interventionsnbinyear-'.$year.'.png';
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsnbinyear-'.$year.'.png';
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsnbinyear-'.$year.'.png';
|
||||
}
|
||||
|
||||
$px1 = new DolGraph();
|
||||
@@ -123,20 +116,17 @@ if (! $mesg)
|
||||
|
||||
// Build graphic amount of object
|
||||
$data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear);
|
||||
//var_dump($data);
|
||||
// $data = array(array('Lib',val1,val2,val3),...)
|
||||
|
||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||
{
|
||||
$filenameamount = $dir.'/interventionsamountinyear-'.$user->id.'-'.$year.'.png';
|
||||
if ($mode == 'customer') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsamountinyear-'.$user->id.'-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstatssupplier&file=interventionsamountinyear-'.$user->id.'-'.$year.'.png';
|
||||
$fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsamountinyear-'.$user->id.'-'.$year.'.png';
|
||||
}
|
||||
else
|
||||
{
|
||||
$filenameamount = $dir.'/interventionsamountinyear-'.$year.'.png';
|
||||
if ($mode == 'customer') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsamountinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstatssupplier&file=interventionsamountinyear-'.$year.'.png';
|
||||
$fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsamountinyear-'.$year.'.png';
|
||||
}
|
||||
|
||||
$px2 = new DolGraph();
|
||||
@@ -171,14 +161,12 @@ $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
|
||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||
{
|
||||
$filename_avg = $dir.'/interventionsaverage-'.$user->id.'-'.$year.'.png';
|
||||
if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsaverage-'.$user->id.'-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstatssupplier&file=interventionsaverage-'.$user->id.'-'.$year.'.png';
|
||||
$fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsaverage-'.$user->id.'-'.$year.'.png';
|
||||
}
|
||||
else
|
||||
{
|
||||
$filename_avg = $dir.'/interventionsaverage-'.$year.'.png';
|
||||
if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsaverage-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstatssupplier&file=interventionsaverage-'.$year.'.png';
|
||||
$fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsaverage-'.$year.'.png';
|
||||
}
|
||||
|
||||
$px3 = new DolGraph();
|
||||
@@ -221,13 +209,12 @@ if (! count($arrayyears)) $arrayyears[$nowyear]=$nowyear;
|
||||
|
||||
$h=0;
|
||||
$head = array();
|
||||
$head[$h][0] = DOL_URL_ROOT . '/commande/stats/index.php?mode='.$mode;
|
||||
$head[$h][0] = DOL_URL_ROOT . '/fichinter/stats/index.php';
|
||||
$head[$h][1] = $langs->trans("ByMonthYear");
|
||||
$head[$h][2] = 'byyear';
|
||||
$h++;
|
||||
|
||||
if ($mode == 'customer') $type='order_stats';
|
||||
if ($mode == 'supplier') $type='supplier_order_stats';
|
||||
$type = 'fichinter_stats';
|
||||
|
||||
complete_head_from_modules($conf,$langs,null,$head,$h,$type);
|
||||
|
||||
@@ -246,9 +233,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
// Company
|
||||
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,0,0,array(),0,'','style="width: 95%"');
|
||||
$filter = 's.client in (1,2,3)';
|
||||
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">';
|
||||
@@ -289,7 +275,8 @@ foreach ($data as $val)
|
||||
{
|
||||
$year = $val['year'];
|
||||
while (! empty($year) && $oldyear > $year+1)
|
||||
{ // If we have empty year
|
||||
{
|
||||
// If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.8'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.9'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
||||
|
||||
if (! defined('EURO')) define('EURO',chr(128));
|
||||
|
||||
|
||||
@@ -1178,7 +1178,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
false,
|
||||
$this->lines[$i]->date_start,
|
||||
$this->lines[$i]->date_end,
|
||||
0,
|
||||
$this->lines[$i]->array_options,
|
||||
$this->lines[$i]->fk_unit
|
||||
);
|
||||
if ($result < 0)
|
||||
@@ -1288,6 +1288,10 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
foreach($this->lines as $line)
|
||||
$line->fetch_optionals($line->rowid);
|
||||
|
||||
// Load source object
|
||||
$objFrom = clone $this;
|
||||
|
||||
@@ -3017,48 +3021,59 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
||||
if ($result)
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
$this->rowid = $objp->rowid;
|
||||
$this->id = $objp->rowid;
|
||||
$this->fk_commande = $objp->fk_commande;
|
||||
$this->desc = $objp->description;
|
||||
$this->qty = $objp->qty;
|
||||
$this->ref_fourn = $objp->ref;
|
||||
$this->ref_supplier = $objp->ref;
|
||||
$this->subprice = $objp->subprice;
|
||||
$this->tva_tx = $objp->tva_tx;
|
||||
$this->localtax1_tx = $objp->localtax1_tx;
|
||||
$this->localtax2_tx = $objp->localtax2_tx;
|
||||
$this->localtax1_type = $objp->localtax1_type;
|
||||
$this->localtax2_type = $objp->localtax2_type;
|
||||
$this->remise = $objp->remise;
|
||||
$this->remise_percent = $objp->remise_percent;
|
||||
$this->fk_product = $objp->fk_product;
|
||||
$this->info_bits = $objp->info_bits;
|
||||
$this->total_ht = $objp->total_ht;
|
||||
$this->total_tva = $objp->total_tva;
|
||||
$this->total_localtax1 = $objp->total_localtax1;
|
||||
$this->total_localtax2 = $objp->total_localtax2;
|
||||
$this->total_ttc = $objp->total_ttc;
|
||||
$this->product_type = $objp->product_type;
|
||||
$this->special_code = $objp->special_code;
|
||||
|
||||
$this->ref = $objp->product_ref;
|
||||
$this->product_ref = $objp->product_ref;
|
||||
$this->product_libelle = $objp->product_libelle;
|
||||
$this->product_desc = $objp->product_desc;
|
||||
|
||||
$this->date_start = $this->db->jdate($objp->date_start);
|
||||
$this->date_end = $this->db->jdate($objp->date_end);
|
||||
$this->fk_unit = $objp->fk_unit;
|
||||
|
||||
$this->multicurrency_subprice = $objp->multicurrency_subprice;
|
||||
$this->multicurrency_total_ht = $objp->multicurrency_total_ht;
|
||||
$this->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||
$this->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||
|
||||
$this->db->free($result);
|
||||
return 1;
|
||||
|
||||
if (!empty($objp))
|
||||
{
|
||||
|
||||
|
||||
$this->rowid = $objp->rowid;
|
||||
$this->id = $objp->rowid;
|
||||
$this->fk_commande = $objp->fk_commande;
|
||||
$this->desc = $objp->description;
|
||||
$this->qty = $objp->qty;
|
||||
$this->ref_fourn = $objp->ref;
|
||||
$this->ref_supplier = $objp->ref;
|
||||
$this->subprice = $objp->subprice;
|
||||
$this->tva_tx = $objp->tva_tx;
|
||||
$this->localtax1_tx = $objp->localtax1_tx;
|
||||
$this->localtax2_tx = $objp->localtax2_tx;
|
||||
$this->localtax1_type = $objp->localtax1_type;
|
||||
$this->localtax2_type = $objp->localtax2_type;
|
||||
$this->remise = $objp->remise;
|
||||
$this->remise_percent = $objp->remise_percent;
|
||||
$this->fk_product = $objp->fk_product;
|
||||
$this->info_bits = $objp->info_bits;
|
||||
$this->total_ht = $objp->total_ht;
|
||||
$this->total_tva = $objp->total_tva;
|
||||
$this->total_localtax1 = $objp->total_localtax1;
|
||||
$this->total_localtax2 = $objp->total_localtax2;
|
||||
$this->total_ttc = $objp->total_ttc;
|
||||
$this->product_type = $objp->product_type;
|
||||
$this->special_code = $objp->special_code;
|
||||
|
||||
$this->ref = $objp->product_ref;
|
||||
$this->product_ref = $objp->product_ref;
|
||||
$this->product_libelle = $objp->product_libelle;
|
||||
$this->product_desc = $objp->product_desc;
|
||||
|
||||
$this->date_start = $this->db->jdate($objp->date_start);
|
||||
$this->date_end = $this->db->jdate($objp->date_end);
|
||||
$this->fk_unit = $objp->fk_unit;
|
||||
|
||||
$this->multicurrency_subprice = $objp->multicurrency_subprice;
|
||||
$this->multicurrency_total_ht = $objp->multicurrency_total_ht;
|
||||
$this->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||
$this->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||
|
||||
$this->db->free($result);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error='Supplier order line with id='.$rowid.' not found';
|
||||
dol_syslog(get_class($this)."::fetch Error ".$this->error, LOG_ERR);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -568,7 +568,7 @@ if ($action == 'confirm_refuse')
|
||||
}
|
||||
|
||||
} else {
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=NoMotifRefuse');
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'&error=NoMotifRefuse');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ if ($result < 0)
|
||||
setEventMessages($holiday->error, $holiday->errors, 'errors');
|
||||
}
|
||||
|
||||
$filters=natural_search(array('u.firstname','u.lastname'), $search_name);
|
||||
if(!empty($search_name)) $filters=natural_search(array('u.firstname','u.lastname'), $search_name);
|
||||
|
||||
$listUsers = $holiday->fetchUsers(false,true,$filters);
|
||||
if (is_numeric($listUsers) && $listUsers < 0)
|
||||
|
||||
@@ -299,7 +299,7 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire
|
||||
{
|
||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut, u.photo, x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
//if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE u.rowid = x.fk_user_author";
|
||||
$sql.= " AND x.entity = ".$conf->entity;
|
||||
if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) $sql.=' AND x.fk_user_author IN ('.join(',',$childids).')';
|
||||
|
||||
@@ -317,6 +317,7 @@ ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN multicurrency_amount double
|
||||
|
||||
|
||||
ALTER TABLE llx_paiementfourn ADD COLUMN model_pdf varchar(255);
|
||||
ALTER TABLE llx_paiementfourn ADD COLUMN fk_user_modif integer AFTER fk_user_author;
|
||||
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expensereport',201);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202);
|
||||
|
||||
@@ -28,6 +28,7 @@ create table llx_paiementfourn
|
||||
amount real DEFAULT 0, -- montant
|
||||
multicurrency_amount double(24,8) DEFAULT 0, -- multicurrency amount
|
||||
fk_user_author integer, -- auteur
|
||||
fk_user_modif integer,
|
||||
fk_paiement integer NOT NULL, -- moyen de paiement
|
||||
num_paiement varchar(50), -- numero de paiement (cheque)
|
||||
note text,
|
||||
|
||||
@@ -96,6 +96,9 @@ function marges_prepare_head()
|
||||
$head[$h][2] = 'checkMargins';
|
||||
}
|
||||
|
||||
complete_head_from_modules($conf,$langs,null,$head,$h,'margins','remove');
|
||||
complete_head_from_modules($conf,$langs,null,$head,$h,'margins');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* Copyright (C) 2014 Henry Florian <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2014 Ion agorria <ion@agorria.com>
|
||||
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2017 Gustavo Novaro
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -884,7 +884,7 @@ class Product extends CommonObject
|
||||
$sql.= ", duration = '" . $this->db->escape($this->duration_value . $this->duration_unit) ."'";
|
||||
$sql.= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy)."'";
|
||||
$sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'";
|
||||
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? $this->desiredstock : "null");
|
||||
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? $this->desiredstock : "null");
|
||||
$sql.= ", cost_price = " . ($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
|
||||
$sql.= ", fk_unit= " . (!$this->fk_unit ? 'NULL' : $this->fk_unit);
|
||||
$sql.= ", price_autogen = " . (!$this->price_autogen ? 0 : 1);
|
||||
@@ -1114,6 +1114,19 @@ class Product extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// Delete from product_association
|
||||
if (!$error){
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_association";
|
||||
$sql.= " WHERE fk_product_pere = ".$id." OR fk_product_fils = ".$id;
|
||||
dol_syslog(get_class($this).'::delete', LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if (! $result)
|
||||
{
|
||||
$error++;
|
||||
$this->errors[] = $this->db->lasterror();
|
||||
}
|
||||
}
|
||||
|
||||
// Delete product
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@@ -54,6 +54,7 @@ $fourn_id = GETPOST("fourn_id",'int');
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if (empty($page) || $page < 0) $page = 0;
|
||||
if (! $sortfield) $sortfield="p.ref";
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
@@ -91,11 +92,15 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
||||
$sref="";
|
||||
$snom="";
|
||||
$sall="";
|
||||
$tosell="";
|
||||
$tobuy="";
|
||||
$search_sale="";
|
||||
$search_categ="";
|
||||
$type="";
|
||||
$catid='';
|
||||
$toolowstock='';
|
||||
$fourn_id='';
|
||||
$sbarcode='';
|
||||
}
|
||||
|
||||
|
||||
@@ -182,6 +187,20 @@ if ($resql)
|
||||
}
|
||||
$texte.=' ('.$langs->trans("Stocks").')';
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($sall) $param.="&sall=".$sall;
|
||||
if ($tosell) $param.="&tosell=".$tosell;
|
||||
if ($tobuy) $param.="&tobuy=".$tobuy;
|
||||
if ($type) $param.="&type=".$type;
|
||||
if ($fourn_id) $param.="&fourn_id=".$fourn_id;
|
||||
if ($snom) $param.="&snom=".$snom;
|
||||
if ($sref) $param.="&sref=".$sref;
|
||||
if ($search_sale) $param.="&search_sale=".$search_sale;
|
||||
if ($search_categ) $param.="&search_categ=".$search_categ;
|
||||
if ($toolowstock) $param.="&toolowstock=".$toolowstock;
|
||||
if ($sbarcode) $param.="&sbarcode=".$sbarcode;
|
||||
if ($catid) $param.="&catid=".$catid;
|
||||
|
||||
llxHeader("", $texte, $helpurl);
|
||||
|
||||
@@ -192,14 +211,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
|
||||
if ($sref || $snom || $sall || GETPOST('search'))
|
||||
{
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy.(!empty($search_categ) ? '&search_categ='.$search_categ : '').(!empty($toolowstock) ? '&toolowstock='.$toolowstock : ''), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
|
||||
}
|
||||
else
|
||||
{
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":"").(!empty($search_categ) ? '&search_categ='.$search_categ : '').(!empty($toolowstock) ? '&toolowstock='.$toolowstock : ''), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
|
||||
}
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
|
||||
|
||||
if (! empty($catid))
|
||||
{
|
||||
@@ -235,14 +247,6 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
$param='';
|
||||
if ($tosell) $param.="&tosell=".$tosell;
|
||||
if ($tobuy) $param.="&tobuy=".$tobuy;
|
||||
if ($type) $param.="&type=".$type;
|
||||
if ($fourn_id) $param.="&fourn_id=".$fourn_id;
|
||||
if ($snom) $param.="&snom=".$snom;
|
||||
if ($sref) $param.="&sref=".$sref;
|
||||
|
||||
$formProduct = new FormProduct($db);
|
||||
$formProduct->loadWarehouses();
|
||||
$warehouses_list = $formProduct->cache_warehouses;
|
||||
|
||||
@@ -58,6 +58,7 @@ $fourn_id = GETPOST("fourn_id",'int');
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if (empty($page) || $page < 0) $page = 0;
|
||||
if (! $sortfield) $sortfield="p.ref";
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
@@ -88,6 +89,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
||||
$sref="";
|
||||
$snom="";
|
||||
$sall="";
|
||||
$tosell="";
|
||||
$tobuy="";
|
||||
$search_sale="";
|
||||
$search_categ="";
|
||||
$type="";
|
||||
@@ -95,6 +98,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
||||
$toolowstock='';
|
||||
$search_batch='';
|
||||
$search_warehouse='';
|
||||
$fourn_id='';
|
||||
$sbarcode='';
|
||||
}
|
||||
|
||||
|
||||
@@ -193,6 +198,24 @@ if ($resql)
|
||||
}
|
||||
$texte.=' ('.$langs->trans("StocksByLotSerial").')';
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($sall) $param.="&sall=".$sall;
|
||||
if ($tosell) $param.="&tosell=".$tosell;
|
||||
if ($tobuy) $param.="&tobuy=".$tobuy;
|
||||
if ($type) $param.="&type=".$type;
|
||||
if ($fourn_id) $param.="&fourn_id=".$fourn_id;
|
||||
if ($snom) $param.="&snom=".$snom;
|
||||
if ($sref) $param.="&sref=".$sref;
|
||||
if ($search_batch) $param.="&search_batch=".$search_batch;
|
||||
if ($sbarcode) $param.="&sbarcode=".$sbarcode;
|
||||
if ($search_warehouse) $param.="&search_warehouse=".$search_warehouse;
|
||||
if ($catid) $param.="&catid=".$catid;
|
||||
if ($toolowstock) $param.="&toolowstock=".$toolowstock;
|
||||
if ($search_sale) $param.="&search_sale=".$search_sale;
|
||||
if ($search_categ) $param.="&search_categ=".$search_categ;
|
||||
/*if ($eatby) $param.="&eatby=".$eatby;
|
||||
if ($sellby) $param.="&sellby=".$sellby;*/
|
||||
|
||||
llxHeader("",$title,$helpurl,$texte);
|
||||
|
||||
@@ -203,14 +226,8 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
|
||||
if ($sref || $snom || $sall || GETPOST('search'))
|
||||
{
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
|
||||
}
|
||||
else
|
||||
{
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
|
||||
}
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
|
||||
|
||||
|
||||
if (! empty($catid))
|
||||
{
|
||||
@@ -244,17 +261,6 @@ if ($resql)
|
||||
}
|
||||
|
||||
|
||||
$param='';
|
||||
if ($tosell) $param.="&tosell=".$tosell;
|
||||
if ($tobuy) $param.="&tobuy=".$tobuy;
|
||||
if ($type) $param.="&type=".$type;
|
||||
if ($fourn_id) $param.="&fourn_id=".$fourn_id;
|
||||
if ($snom) $param.="&snom=".$snom;
|
||||
if ($sref) $param.="&sref=".$sref;
|
||||
if ($search_batch) $param.="&search_batch=".$search_batch;
|
||||
/*if ($eatby) $param.="&eatby=".$eatby;
|
||||
if ($sellby) $param.="&sellby=".$sellby;*/
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ $id = GETPOST('id','int');
|
||||
$action = GETPOST('action','alpha');
|
||||
$backtopage = GETPOST('backtopage');
|
||||
$myparam = GETPOST('myparam','alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
|
||||
|
||||
$search_entity=GETPOST('search_entity','int');
|
||||
@@ -152,7 +153,7 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
||||
$search_import_key='';
|
||||
$search_date_creation='';
|
||||
$search_date_update='';
|
||||
$toselect='';
|
||||
$toselect=array();
|
||||
$search_array_options=array();
|
||||
}
|
||||
|
||||
|
||||
@@ -399,7 +399,7 @@ print '<div class="float valignmiddle">';
|
||||
$titleassigntask = $langs->trans("AssignTaskToMe");
|
||||
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", $usertoprocess->getFullName($langs));
|
||||
print '<div class="taskiddiv inline-block">';
|
||||
$formproject->selectTasks($socid?$socid:-1, $taskid, 'taskid', 32, 0, 1, 1);
|
||||
$formproject->selectTasks($socid?$socid:-1, $taskid, 'taskid', 32, 0, 1, 1, 0, 0, '', $usertoprocess);
|
||||
print '</div>';
|
||||
print ' ';
|
||||
print $formcompany->selectTypeContact($object, '', 'type','internal','rowid', 0, 'maxwidth200');
|
||||
|
||||
@@ -402,7 +402,7 @@ print '<div class="float valignmiddle">';
|
||||
$titleassigntask = $langs->trans("AssignTaskToMe");
|
||||
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", $usertoprocess->getFullName($langs));
|
||||
print '<div class="taskiddiv inline-block">';
|
||||
$formproject->selectTasks($socid?$socid:-1, $taskid, 'taskid', 32, 0, 1, 1);
|
||||
$formproject->selectTasks($socid?$socid:-1, $taskid, 'taskid', 32, 0, 1, 1, 0, 0, '', $usertoprocess);
|
||||
print '</div>';
|
||||
print ' ';
|
||||
print $formcompany->selectTypeContact($object, '', 'type','internal','rowid', 0, 'maxwidth200');
|
||||
|
||||
@@ -1262,7 +1262,7 @@ div#tmenu_tooltip {
|
||||
<?php } else { ?>
|
||||
background: rgb(<?php echo $colorbackhmenu1 ?>);
|
||||
/*
|
||||
background-image: linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
|
||||
background-image: linear-gradient(to top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
|
||||
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
|
||||
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
|
||||
@@ -1343,7 +1343,7 @@ ul.tmenu { /* t r b l */
|
||||
ul.tmenu li {
|
||||
background: rgb(<?php echo $colorbackhmenu1 ?>);
|
||||
/*
|
||||
background-image: linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: linear-gradient(to top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
@@ -1374,7 +1374,7 @@ li.tmenusel, li.tmenu:hover {
|
||||
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.5) 0%, rgba(250,250,250,0) 100%) !important;
|
||||
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0) 100%) !important;
|
||||
background-image: -ms-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important;
|
||||
background-image: linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important;
|
||||
background-image: linear-gradient(to bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important;
|
||||
background: rgb(<?php echo $colorbackhmenu1 ?>);
|
||||
*/
|
||||
/* background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/nav-overlay3.png',1); ?>) 50% 0 repeat-x !important; Nicer but problem when menu wrap on 2 lines */
|
||||
@@ -1964,7 +1964,7 @@ td.ecmroot {
|
||||
background-image: -moz-linear-gradient(bottom, rgba(200,200,200,0.1) 0%, rgba(255,255,255,0.3) 120%) !important;
|
||||
background-image: -webkit-linear-gradient(bottom, rgba(200,200,200,0.1) 0%, rgba(255,255,255,0.3) 120%) !important;
|
||||
background-image: -ms-linear-gradient(bottom, rgba(200,200,200,0.1) 0%, rgba(255,255,255,0.3) 120%) !important;
|
||||
background-image: linear-gradient(bottom, rgba(200,200,200,0.1) 0%, rgba(255,255,255,0.3) 120%) !important;
|
||||
background-image: linear-gradient(to bottom, rgba(200,200,200,0.1) 0%, rgba(255,255,255,0.3) 120%) !important;
|
||||
|
||||
background: #FFF;
|
||||
background-repeat: repeat-x !important;
|
||||
@@ -2613,7 +2613,7 @@ div.pagination li.paginationafterarrows {
|
||||
|
||||
/* Prepare to remove class pair - impair
|
||||
.noborder > tbody > tr:nth-child(even) td {
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: linear-gradient(to bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
@@ -2626,7 +2626,7 @@ div.pagination li.paginationafterarrows {
|
||||
}
|
||||
|
||||
.noborder > tbody > tr:nth-child(odd) td {
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: linear-gradient(to bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
@@ -2867,7 +2867,7 @@ div .tdtop {
|
||||
/* Prepare to remove class pair - impair */
|
||||
|
||||
.noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre) {
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: linear-gradient(to bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
@@ -2878,7 +2878,7 @@ div .tdtop {
|
||||
}
|
||||
|
||||
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre) {
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: linear-gradient(to bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
@@ -2918,7 +2918,7 @@ div .tdtop {
|
||||
.boxstats130 {
|
||||
width: 135px;
|
||||
height: 48px;
|
||||
padding: 3px
|
||||
padding: 3px;
|
||||
}
|
||||
@media only screen and (max-width: 767px)
|
||||
{
|
||||
|
||||
@@ -1169,7 +1169,7 @@ else
|
||||
|
||||
// Check if user has rights
|
||||
$object->getrights();
|
||||
if (empty($object->nb_rights) && $object->statut != 0) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
||||
if (empty($object->nb_rights) && $object->statut != 0 && empty($object->admin)) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
||||
|
||||
// Connexion ldap
|
||||
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
||||
|
||||
Reference in New Issue
Block a user