2
0
forked from Wavyzz/dolibarr

Compare commits

...

105 Commits
6.0.8 ... 6.0

Author SHA1 Message Date
Laurent Destailleur
5d942c9d1a Fix infinit logs 2022-03-10 15:46:00 +01:00
Laurent Destailleur
3ea9c297ea Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2020-03-30 19:46:23 +02:00
Laurent Destailleur
474260e526 Merge pull request #13447 from c3do/patch-1
Fix can set desiredstock to (int) 0 from API Rest
2020-03-30 19:46:02 +02:00
Cédric
eead9a93d3 Fix can set desiredstock to (int) 0 from API Rest
When you set desiredstock to 0 as an integer from the API, it registers to null in the database. Using is_numeric() fixes this.
2020-03-30 13:03:13 +02:00
Laurent Destailleur
7f759c6ff5 Merge pull request #13322 from atm-lena/6.0_FIX_FournCommandClone_ExtrafieldsLines
FIX - Clone Fourn Command, add line's extrafields
2020-03-11 16:36:27 +01:00
atm-lena
20aa51f26b FIX - Clone Fourn Command, add line's extrafields Part 2 2020-03-11 15:26:49 +01:00
atm-lena
35f32391a0 FIX - Clone Fourn Command, add line's extrafields 2020-03-10 14:46:15 +01:00
Laurent Destailleur
e0c8ccb9fb Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2020-01-10 19:45:35 +01:00
Laurent Destailleur
ef00cb0736 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2020-01-10 19:44:52 +01:00
Laurent Destailleur
d7f7f5bf3d Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2020-01-10 19:42:34 +01:00
Laurent Destailleur
7c0a6946a7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2020-01-10 19:42:15 +01:00
Laurent Destailleur
1ecc1afa9e Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2020-01-10 19:41:49 +01:00
Laurent Destailleur
ceb1e699b7 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2020-01-10 19:37:16 +01:00
Laurent Destailleur
c028819cab FIX clone of purchase order 2020-01-10 19:35:49 +01:00
Laurent Destailleur
53149bb7cd Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2019-12-08 04:22:50 +01:00
Laurent Destailleur
394104291a Fix function not found when creating a payment of an expense report 2019-12-08 04:22:09 +01:00
Laurent Destailleur
a872b7d42f Merge pull request #11532 from atm-gauthier/6.0_fix_phone_search
FIX : search by phone pro
2019-07-22 18:30:07 +02:00
gauthier
cd7d3f1a36 FIX : search by phone pro 2019-07-19 15:41:44 +02:00
Laurent Destailleur
c5572e0176 Add info on signature generator 2019-06-25 23:19:00 +02:00
Laurent Destailleur
5259547b96 Merge pull request #11069 from atm-gauthier/6.0_fix_select_prev_situ
Fix prev situation invoice selection (backport fix 8.0)
2019-04-25 18:59:48 +02:00
gauthier
31897f54ac Fix prev situation invoice selection (backport fix 8.0) 2019-04-25 12:37:05 +02:00
Laurent Destailleur
5dfc1c0897 Merge pull request #10921 from atm-greg/Fix_hook_in_margins_heads
FIX missing hook completeTabsHead in margins module
2019-03-31 18:21:48 +02:00
atm-greg
83d7750274 FIX missing hook completeTabsHead in margins module 2019-03-27 09:33:51 +01:00
Laurent Destailleur
8711e51bce Merge pull request #10841 from atm-gauthier/6.0_notest_tab_documents_on_expensereport
FIX : no need to test anything to display documents tabs on expense report
2019-03-15 10:56:53 +01:00
gauthier
8375b47e74 FIX : in fact expensereport must be in $check array 2019-03-15 10:21:50 +01:00
gauthier
3fb6978bc8 FIX : no need to test anything to display documents tabs on expense report 2019-03-14 17:36:49 +01:00
Laurent Destailleur
eab1e13343 Merge pull request #10839 from atm-gauthier/6.0_fix_useless_join
FIX : useless join
2019-03-14 17:12:38 +01:00
gauthier
885797b748 FIX : useless join 2019-03-14 17:00:51 +01:00
Laurent Destailleur
22bb62d900 Merge pull request #10737 from atm-gauthier/6.0_fix_wrong_redirect_link
FIX : wrong redirect link on holiday refuse
2019-03-05 18:43:57 +01:00
gauthier
dada8c8ff5 FIX : wrong redirect link on holiday refuse 2019-03-04 17:23:29 +01:00
Laurent Destailleur
bff2f33022 Merge pull request #10404 from atm-john/6.0_fix_supplier_order_line_fetch
Fix fetch test
2019-02-01 15:56:26 +01:00
John BOTELLA
9a666b265f Use an other test 2019-01-28 11:53:19 +01:00
John BOTELLA
15e1d3b456 Fix fetch test 2019-01-24 09:40:58 +01:00
Laurent Destailleur
c1c3eb61f8 Merge pull request #10356 from atm-gauthier/6.0_fix_dol_loginfunction
FIX : if(!function_exists(dol_loginfunction))
2019-01-17 19:14:46 +01:00
gauthier
d997309bcb FIX : if(!method_exists(dol_loginfunction)) 2019-01-17 14:49:30 +01:00
Laurent Destailleur
05dc40b6b9 Merge pull request #10331 from frederic34/patch-2
correct list of links
2019-01-15 17:52:05 +01:00
Frédéric FRANCE
cf55b54cf5 correct list of links 2019-01-14 10:02:48 +01:00
Laurent Destailleur
66b2a82be6 Merge pull request #10292 from atm-gauthier/6.0_fix_holidays
FIX : holidays get natural_search if search params are set only
2019-01-02 20:04:39 +01:00
gauthier
fc3da0f5be FIX : holidays get natural_search if search params are set only 2019-01-02 10:02:30 +01:00
Laurent Destailleur
b67ed87103 Merge pull request #10166 from atm-maxime/fix_pdf_footer
Fix pdf footer height for all documents
2018-12-04 13:35:11 +01:00
Laurent Destailleur
6d57c1b5f9 Merge pull request #10165 from atm-maxime/fix_user_noperm
Fix #6610
2018-12-04 13:34:11 +01:00
Maxime Kohlhaas
8fea6338e1 Fix #6565
Fix pdf footer height for all documents
2018-12-02 18:51:49 +01:00
Maxime Kohlhaas
42c97cf7d5 Fix #6610 2018-12-02 17:59:11 +01:00
Laurent Destailleur
03a67cee99 Merge pull request #10113 from frederic34/patch-9
llx_paiementfourn.sql #8723
2018-12-01 14:54:57 +01:00
Frédéric FRANCE
0270da7d8c Update 5.0.0-6.0.0.sql 2018-12-01 00:28:58 +01:00
Frédéric FRANCE
6ab12b5911 Update llx_paiementfourn.sql 2018-12-01 00:26:51 +01:00
Laurent Destailleur
d59b1bb0c6 Merge 2018-11-23 11:44:07 +01:00
Laurent Destailleur
9d582a53ca Fix compatibility with new mysql versions 2018-11-23 11:28:28 +01:00
Laurent Destailleur
bd8856b988 Merge pull request #10033 from frederic34/patch-9
Update CMailFile.class.php
2018-11-19 18:20:20 +01:00
Laurent Destailleur
fcb9b693cf Merge pull request #10042 from atm-gauthier/6.0_fix_massaction_sendinvoicebymail
FIX : We want to be able to send PDF of paid invoices
2018-11-19 18:14:12 +01:00
gauthier
ecdfa5219b FIX : We want to be able to send PDF of paid invoices 2018-11-19 17:31:45 +01:00
Frédéric FRANCE
30b1db34cd Update CMailFile.class.php 2018-11-17 11:33:01 +01:00
Laurent Destailleur
edc59b9290 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-11-10 15:49:20 +01:00
Laurent Destailleur
24c499aa44 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2018-11-10 15:48:53 +01:00
Laurent Destailleur
8eac45a762 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2018-11-10 15:48:07 +01:00
Laurent Destailleur
3d85407619 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2018-11-10 15:46:31 +01:00
Laurent Destailleur
ca1e3b4d55 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2018-11-10 15:15:33 +01:00
Laurent Destailleur
94bb1ac511 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2018-11-10 12:49:22 +01:00
Laurent Destailleur
8893d8d59f Fix compatiblity with new version of PHP 2018-11-10 11:56:23 +01:00
Laurent Destailleur
aad0b700d4 Fix travis 2018-11-09 01:22:56 +01:00
Laurent Destailleur
f889c9994b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-11-09 01:21:13 +01:00
Laurent Destailleur
0d6709c9f7 Update phpcs config 2018-11-09 01:20:57 +01:00
Laurent Destailleur
78778e4c58 Merge pull request #9948 from frederic34/patch-9
FIX mode is only customer in stats fichinter
2018-11-08 19:16:00 +01:00
Frédéric FRANCE
8bb1545ed0 Update index.php 2018-11-08 12:16:05 +01:00
Frédéric FRANCE
670eed1e68 Update index.php 2018-11-08 12:13:07 +01:00
Laurent Destailleur
693cf72fca Merge pull request #9920 from ATM-Marc/FIX_6.0_task_activity_access
FIX: task time screen: bad task assignments
2018-11-05 10:21:28 +01:00
Frédéric FRANCE
d6b909a280 Update index.php 2018-11-03 18:26:11 +01:00
Frédéric FRANCE
8ab53012b7 mode is only customer in stats fichinter 2018-11-03 18:20:36 +01:00
Laurent Destailleur
064417dcf1 Merge pull request #9889 from atm-maxime/fix_invoice_from_contract2
Fix invoice creation from contract was invoicing closed services #9087
2018-10-30 21:13:38 +01:00
Marc de Lima Lucio
2fbc305683 FIX: task time screen: last fix was overkill 2018-10-30 16:00:56 +01:00
Laurent Destailleur
38396e490a Merge pull request #9891 from frederic34/patch-17
Update brouillon when validate order
2018-10-30 14:17:29 +01:00
Marc de Lima Lucio
8911d72be8 FIX: task time screen: prevent users with access to all project from assigning to tasks they're not allowed to do 2018-10-30 12:28:04 +01:00
Frédéric FRANCE
a30091fd74 Update commande.class.php 2018-10-27 09:51:19 +02:00
Maxime Kohlhaas
1b054f1b36 Fix invoice creation from contract was invoicing closed services #9087 2018-10-27 09:21:49 +02:00
Laurent Destailleur
7c81124e66 Merge pull request #9869 from ATM-Marc/FIX_6.0_typhon_order_ref
FIX: pdf typhon: order reference duplicate
2018-10-26 15:18:19 +02:00
Marc de Lima Lucio
16c35035c1 FIX: pdf typhon: order reference duplicate 2018-10-25 12:07:40 +02:00
Laurent Destailleur
4060dd5377 Merge pull request #9826 from frederic34/patch-9
Update ajax.lib.php
2018-10-24 02:29:20 +02:00
Laurent Destailleur
52364f0fd9 Merge pull request #9834 from frederic34/patch-19
missing semicolon in MD style css
2018-10-24 02:29:02 +02:00
Laurent Destailleur
2ba6f96765 Update style.css.php 2018-10-24 02:27:59 +02:00
Laurent Destailleur
acaaf53085 Merge pull request #9843 from ATM-Nicolas/fix_variable
FIX : Variable name
2018-10-24 02:07:11 +02:00
ATM-Nicolas
cf28e4e442 FIX : Variable name 2018-10-22 15:19:33 +02:00
Frédéric FRANCE
83e2951107 Update style.css.php 2018-10-21 09:59:14 +02:00
Frédéric FRANCE
28c86a613d Update style.css.php 2018-10-21 09:39:07 +02:00
Frédéric FRANCE
c4029f5e5f Update style.css.php 2018-10-21 09:23:33 +02:00
Frédéric FRANCE
f322c73dd7 Update ajax.lib.php 2018-10-19 22:52:18 +02:00
Laurent Destailleur
6fde6e4250 Merge pull request #9787 from fmarcet/6.0
FIX: When delete a product, llx_product_association rows are not deleted
2018-10-19 14:06:50 +02:00
Ferran Marcet
ffde353441 FIX When delete a product, llx_product_association rows are not deleted 2018-10-17 10:06:06 +02:00
Ferran Marcet
bdae4e1c4d FIX When delete a product, llx_product_association rows are not deleted 2018-10-17 10:04:42 +02:00
Ferran Marcet
b462e7b217 FIX When delete a product, llx_product_association rows are not deleted 2018-10-17 10:01:02 +02:00
Laurent Destailleur
7cd8b36cea Merge pull request #9755 from atm-greg/fix_massaction_delete_tasks
FIX modify parenting before task deletion
2018-10-16 19:45:43 +02:00
Laurent Destailleur
330824748b Merge pull request #9750 from frederic34/patch-16
code comment
2018-10-16 19:37:32 +02:00
atm-greg
06477b40a0 modify parenting before task deletion 2018-10-15 12:34:14 +02:00
Frédéric FRANCE
4d6d3afbea code comment 2018-10-15 08:39:46 +02:00
Laurent Destailleur
fabc11191d Merge pull request #9739 from frederic34/patch-11
fix size of $head when replacing by hook
2018-10-14 16:27:14 +02:00
Laurent Destailleur
f9a66a34d0 Merge pull request #9738 from frederic34/patch-9
fix doc in import.lib.php
2018-10-14 16:24:47 +02:00
Laurent Destailleur
995f54ca52 Merge pull request #9735 from atm-ph/fix_6.0_sort_product_stock_list
Fix 6.0 sort product stock list
2018-10-14 16:23:30 +02:00
Frédéric FRANCE
70a98743e8 Update functions.lib.php 2018-10-14 10:48:06 +02:00
Frédéric FRANCE
1f1a614b47 Update import.lib.php 2018-10-14 10:21:06 +02:00
atm-ph
7b17b453bf Fix sort and switch page 2018-10-12 23:29:35 +02:00
atm-ph
23e4cd57f3 Fix warnings PHP7 2018-10-12 23:27:38 +02:00
Laurent Destailleur
87f744896d Merge pull request #9733 from ATM-Marc/FIX_6.0_propal_customcode
FIX: propal pdf: missing parenthesis for customs code
2018-10-12 21:14:40 +02:00
Laurent Destailleur
d4b02c0552 Release 6.0.8 2018-10-12 19:03:03 +02:00
Marc de Lima Lucio
afd9b4ea1a FIX: propal pdf: missing parenthesis for customs code 2018-10-12 18:19:17 +02:00
Laurent Destailleur
e61bcd03ed Fix travis 2017-09-16 13:03:27 +02:00
Laurent Destailleur
3295498e9e Remove code comment 2017-09-16 12:50:34 +02:00
54 changed files with 424 additions and 378 deletions

View File

@@ -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)

View File

@@ -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>

View File

@@ -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;

View File

@@ -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;

View File

@@ -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)

View File

@@ -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);

View File

@@ -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);

View File

@@ -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)

View File

@@ -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
{

View File

@@ -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>';

View File

@@ -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";

View File

@@ -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
}

View File

@@ -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);

View File

@@ -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())
{

View File

@@ -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);
}
}
}

View File

@@ -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

View File

@@ -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

View File

@@ -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&amp;modulepart=mycompany&amp;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&amp;modulepart=mycompany&amp;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&amp;modulepart=mycompany&amp;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&amp;modulepart=mycompany&amp;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"] = '';
}
/**

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))
{

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))
{

View File

@@ -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'))

View File

@@ -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);

View File

@@ -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'))
{

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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);

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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">';

View File

@@ -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));

View File

@@ -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
{

View File

@@ -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;
}
}

View File

@@ -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)

View File

@@ -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).')';

View File

@@ -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);

View File

@@ -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,

View File

@@ -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;
}

View File

@@ -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)
{

View File

@@ -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."&amp;sall=".$sall."&amp;tosell=".$tosell."&amp;tobuy=".$tobuy.(!empty($search_categ) ? '&amp;search_categ='.$search_categ : '').(!empty($toolowstock) ? '&amp;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)?"&amp;type=$type":"").(!empty($search_categ) ? '&amp;search_categ='.$search_categ : '').(!empty($toolowstock) ? '&amp;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;

View File

@@ -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."&amp;sall=".$sall."&amp;tosell=".$tosell."&amp;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)?"&amp;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":"").'">';

View File

@@ -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();
}

View File

@@ -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');

View File

@@ -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');

View File

@@ -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)
{

View File

@@ -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