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

This commit is contained in:
Laurent Destailleur 2019-12-15 17:18:21 +01:00
commit cb71d5a7bb
105 changed files with 300 additions and 220 deletions

View File

@ -36,7 +36,7 @@ Note: Prerequisites to build autoexe DoliWamp package:
> perl makepack-dolibarrmodule.pl > perl makepack-dolibarrmodule.pl
- To build developper documentation, launch the script - To build developper documentation, launch the script
> perl dolybarr-doxygen-build.pl > perl dolibarr-doxygen-build.pl
Note: Note:

View File

@ -36,7 +36,7 @@ $SOURCE="../..";
$result = open( IN, "< " . $SOURCE . "/htdocs/filefunc.inc.php" ); $result = open( IN, "< " . $SOURCE . "/htdocs/filefunc.inc.php" );
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; } if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; }
while (<IN>) { while (<IN>) {
if ( $_ =~ /define\('DOL_VERSION','([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; } if ( $_ =~ /define\('DOL_VERSION', '([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; }
} }
close IN; close IN;
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3); ($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);

View File

@ -8,7 +8,7 @@
# Usage: dolibarr-doxygen-filter.pl pathtofilefromdolibarrroot # Usage: dolibarr-doxygen-filter.pl pathtofilefromdolibarrroot
$file=$ARGV[0]; $file=$ARGV[0];
if (! $file) if (! $file)
{ {
print "Usage: dolibarr-doxygen-filter.pl pathtofilefromdolibarrroot\n"; print "Usage: dolibarr-doxygen-filter.pl pathtofilefromdolibarrroot\n";
exit; exit;
@ -75,7 +75,7 @@ while (<FILE>)
{ {
$insidedquote=0; $insidedquote=0;
} }
} }
} }
} }
$ignore=""; $ignore="";

View File

@ -145,7 +145,7 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
// Need to ignore document custom etc. Note: this also ignore natively symbolic links. // Need to ignore document custom etc. Note: this also ignore natively symbolic links.
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i'); $files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
*/ */
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$'; $regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs $regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname'); $files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir=''; $dir='';

View File

@ -21,7 +21,7 @@
*/ */
/** /**
* \file htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php * \file htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php
* \ingroup Accountancy (Double entries) * \ingroup Accountancy (Double entries)
* \brief Tab to setup lettering * \brief Tab to setup lettering
*/ */

View File

@ -114,7 +114,7 @@ if ($id > 0)
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield centpercent">'; print '<table class="border tableforfield centpercent">';
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
// Login // Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))

View File

@ -898,7 +898,7 @@ if ($rowid > 0)
'moreattr' => 'maxlength="128"', 'moreattr' => 'maxlength="128"',
); );
} }
// @TODO Add other extrafields mandatory for thirdparty creation // @todo Add other extrafields mandatory for thirdparty creation
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id, $langs->trans("CreateDolibarrThirdParty"), $langs->trans("ConfirmCreateThirdParty"), "confirm_create_thirdparty", $formquestion, 1); print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id, $langs->trans("CreateDolibarrThirdParty"), $langs->trans("ConfirmCreateThirdParty"), "confirm_create_thirdparty", $formquestion, 1);
} }

View File

@ -53,7 +53,7 @@ $head = subscription_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans("Subscription"), -1, 'payment'); dol_fiche_head($head, 'info', $langs->trans("Subscription"), -1, 'payment');
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'rowid', $linkback, 1); dol_banner_tab($object, 'rowid', $linkback, 1);

View File

@ -87,12 +87,9 @@ if ($action != 'create' && $action != 'edit')
} }
/* ************************************************************************** */ /*
/* */ * Creation of an optional field
/* Creation of an optional field */
/* */
/* ************************************************************************** */
if ($action == 'create') if ($action == 'create')
{ {
print '<br><div id="newattrib"></div>'; print '<br><div id="newattrib"></div>';
@ -101,11 +98,9 @@ if ($action == 'create')
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
} }
/* ************************************************************************** */ /*
/* */ * Edition of an optional field
/* Edition of an optional field */ */
/* */
/* ************************************************************************** */
if ($action == 'edit' && ! empty($attrname)) if ($action == 'edit' && ! empty($attrname))
{ {
print "<br>"; print "<br>";

View File

@ -587,8 +587,8 @@ if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
print '</a></td>'; print '</a></td>';
print '</tr>'; print '</tr>';
/* Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation.
/* /*
// Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation.
// Ask for payment bank during order // Ask for payment bank during order
if ($conf->banque->enabled) if ($conf->banque->enabled)
{ {

View File

@ -25,7 +25,7 @@
*/ */
/** /**
* \file htdocs/admin/commandefournisseurdispatch_extrafields.php * \file htdocs/admin/commande_fournisseur_dispatch_extrafields.php
* \ingroup reception * \ingroup reception
* \brief Page to setup extra fields of reception * \brief Page to setup extra fields of reception
*/ */

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -214,8 +214,8 @@ if (!$error && $xml)
$includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']); $includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']);
// Defined qualified files (must be same than into generate_filelist_xml.php) // Defined qualified files (must be same than into generate_filelist_xml.php)
$regextoinclude = '\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$'; $regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs $regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude); $scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
// Fill file_list with files in signature, new files, modified files // Fill file_list with files in signature, new files, modified files

View File

@ -432,7 +432,7 @@ print '</td>';
print '</tr>'; print '</tr>';
*/ */
// @TODO Use module notification instead... // @todo Use module notification instead...
// Email de réception des notifications // Email de réception des notifications
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationTo").'</td>'; print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationTo").'</td>';

View File

@ -132,24 +132,21 @@ foreach ($modulesdir as $dir)
$classname = ucfirst($classname); $classname = ucfirst($classname);
require_once $dir_part.$file_searched; require_once $dir_part.$file_searched;
if (class_exists($classname)) // if (class_exists($classname))
{ // {
dol_syslog("Found API classname=".$classname); // dol_syslog("Found API classname=".$classname);
$api->r->addAPIClass($classname,''); // $api->r->addAPIClass($classname,'');
// require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Routes.php';
// $tmpclass = new ReflectionClass($classname);
// try {
// $classMetadata = CommentParser::parse($tmpclass->getDocComment());
// } catch (Exception $e) {
// throw new RestException(500, "Error while parsing comments of `$classname` class. " . $e->getMessage());
// }
/* // //$listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched);
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Routes.php'; // }
$tmpclass = new ReflectionClass($classname);
try {
$classMetadata = CommentParser::parse($tmpclass->getDocComment());
} catch (Exception $e) {
throw new RestException(500, "Error while parsing comments of `$classname` class. " . $e->getMessage());
}*/
//$listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched);
/* }
}*/ }*/
} }
} }
@ -160,7 +157,7 @@ foreach ($modulesdir as $dir)
} }
//var_dump($listofapis); //var_dump($listofapis);
$listofapis = Routes::toArray(); // TODO api for "status" is lost here $listofapis = Routes::toArray(); // @todo api for "status" is lost here
//var_dump($listofapis); //var_dump($listofapis);

View File

@ -1286,9 +1286,9 @@ class Setup extends DolibarrApi
$sql = "SELECT rowid, code, pos, label, use_default, description"; $sql = "SELECT rowid, code, pos, label, use_default, description";
$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_type as t"; $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_type as t";
$sql .= " WHERE t.active = ".$active; $sql .= " WHERE t.active = ".(int) $active;
if ($type) $sql .= " AND t.type LIKE '%".$this->db->escape($type)."%'"; // if ($type) $sql .= " AND t.type LIKE '%".$this->db->escape($type)."%'";
if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; // if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'";
// Add sql filters // Add sql filters
if ($sqlfilters) if ($sqlfilters)
{ {
@ -1473,8 +1473,8 @@ class Setup extends DolibarrApi
$includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']); $includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']);
// Defined qualified files (must be same than into generate_filelist_xml.php) // Defined qualified files (must be same than into generate_filelist_xml.php)
$regextoinclude = '\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$'; $regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs $regextoexclude = '('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude); $scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
// Fill file_list with files in signature, new files, modified files // Fill file_list with files in signature, new files, modified files

View File

@ -17,9 +17,9 @@
*/ */
/** /**
* \file htdocs/asset/admin/asset_extrafields.php * \file htdocs/asset/admin/assets_extrafields.php
* \ingroup asset * \ingroup asset
* \brief Page to setup extra fields of assets * \brief Page to setup extra fields of assets
*/ */
require '../../main.inc.php'; require '../../main.inc.php';

View File

@ -222,7 +222,7 @@ if ($id > 0 && ! preg_match('/^add/i', $action))
dol_fiche_head($head, $hselected, $langs->trans("Bookmark"), -1, 'bookmark'); dol_fiche_head($head, $hselected, $langs->trans("Bookmark"), -1, 'bookmark');
$linkback = '<a href="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/bookmarks/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', '', 0); dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', '', 0);

View File

@ -98,7 +98,7 @@ class Categorie extends CommonObject
/** /**
* @var array Foreign keys mapping from type string * @var array Foreign keys mapping from type string
* *
* @TODO Move to const array when PHP 5.6 will be our minimum target * @todo Move to const array when PHP 5.6 will be our minimum target
*/ */
protected $MAP_CAT_FK = array( protected $MAP_CAT_FK = array(
'product' => 'product', 'product' => 'product',

View File

@ -623,7 +623,7 @@ if (empty($reshook) && $action == 'update')
*/ */
if (empty($reshook) && $action == 'confirm_delete' && GETPOST("confirm") == 'yes') if (empty($reshook) && $action == 'confirm_delete' && GETPOST("confirm") == 'yes')
{ {
$object->fetch($id); $object->fetch($id);
$object->fetch_optionals(); $object->fetch_optionals();
$object->fetch_userassigned(); $object->fetch_userassigned();
$object->oldcopy = clone $object; $object->oldcopy = clone $object;

View File

@ -1112,7 +1112,7 @@ class ActionComm extends CommonObject
/** /**
* Load all objects with filters. * Load all objects with filters.
* @TODO WARNING: This make a fetch on all records instead of making one request with a join. * @todo WARNING: This make a fetch on all records instead of making one request with a join.
* *
* @param DoliDb $db Database handler * @param DoliDb $db Database handler
* @param int $socid Filter by thirdparty * @param int $socid Filter by thirdparty

View File

@ -89,6 +89,7 @@ $pid=GETPOST("search_projectid", "int", 3)?GETPOST("search_projectid", "int", 3)
$status=GETPOST("search_status", 'aZ09')?GETPOST("search_status", 'aZ09'):GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo' $status=GETPOST("search_status", 'aZ09')?GETPOST("search_status", 'aZ09'):GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo'
$type=GETPOST("search_type", 'aZ09')?GETPOST("search_type", 'aZ09'):GETPOST("type", 'aZ09'); $type=GETPOST("search_type", 'aZ09')?GETPOST("search_type", 'aZ09'):GETPOST("type", 'aZ09');
$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); $maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
if (GETPOST('search_actioncode', 'array')) if (GETPOST('search_actioncode', 'array'))
{ {
@ -167,6 +168,10 @@ if ($action == 'delete_action')
{ {
$event = new ActionComm($db); $event = new ActionComm($db);
$event->fetch($actionid); $event->fetch($actionid);
$event->fetch_optionals();
$event->fetch_userassigned();
$event->oldcopy = clone $event;
$result = $event->delete(); $result = $event->delete();
} }

View File

@ -88,6 +88,7 @@ $pid=GETPOST("search_projectid", "int", 3)?GETPOST("search_projectid", "int", 3)
$status=GETPOST("search_status", 'alpha')?GETPOST("search_status", 'alpha'):GETPOST("status", 'alpha'); $status=GETPOST("search_status", 'alpha')?GETPOST("search_status", 'alpha'):GETPOST("status", 'alpha');
$type=GETPOST("search_type", 'alpha')?GETPOST("search_type", 'alpha'):GETPOST("type", 'alpha'); $type=GETPOST("search_type", 'alpha')?GETPOST("search_type", 'alpha'):GETPOST("type", 'alpha');
$maxprint=((GETPOST("maxprint", 'int')!='')?GETPOST("maxprint", 'int'):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); $maxprint=((GETPOST("maxprint", 'int')!='')?GETPOST("maxprint", 'int'):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
if (GETPOST('search_actioncode', 'array')) if (GETPOST('search_actioncode', 'array'))
{ {
@ -154,6 +155,10 @@ if ($action == 'delete_action')
{ {
$event = new ActionComm($db); $event = new ActionComm($db);
$event->fetch($actionid); $event->fetch($actionid);
$event->fetch_optionals();
$event->fetch_userassigned();
$event->oldcopy = clone $event;
$result = $event->delete(); $result = $event->delete();
} }
@ -162,6 +167,26 @@ if ($action == 'delete_action')
/* /*
* View * View
*/ */
$parameters = array(
'socid' => $socid,
'status' => $status,
'year' => $year,
'month' => $month,
'day' => $day,
'type' => $type,
'maxprint' => $maxprint,
'filter' => $filter,
'filtert' => $filtert,
'showbirthday' => $showbirthday,
'canedit' => $canedit,
'optioncss' => $optioncss,
'actioncode' => $actioncode,
'pid' => $pid,
'resourceid' => $resourceid,
'usergroup' => $usergroup,
);
$reshook = $hookmanager->executeHooks('beforeAgendaPerUser', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
$form = new Form($db); $form = new Form($db);
$companystatic = new Societe($db); $companystatic = new Societe($db);

View File

@ -238,7 +238,7 @@ if ($object->id > 0)
dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"), -1, 'company'); dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"), -1, 'company');
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');

View File

@ -1189,7 +1189,7 @@ else
dol_fiche_head($head, 'card', $langs->trans("Mailing"), -1, 'email'); dol_fiche_head($head, 'card', $langs->trans("Mailing"), -1, 'email');
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlright = ''; $morehtmlright = '';
if ($object->statut == 2) $morehtmlright .= ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.') '; if ($object->statut == 2) $morehtmlright .= ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.') ';

View File

@ -221,7 +221,7 @@ if ($object->fetch($id) >= 0)
dol_fiche_head($head, 'targets', $langs->trans("Mailing"), -1, 'email'); dol_fiche_head($head, 'targets', $langs->trans("Mailing"), -1, 'email');
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlright = ''; $morehtmlright = '';
$nbtry = $nbok = 0; $nbtry = $nbok = 0;

View File

@ -54,7 +54,7 @@ if ($object->fetch($id) >= 0)
dol_fiche_head($head, 'info', $langs->trans("Mailing"), -1, 'email'); dol_fiche_head($head, 'info', $langs->trans("Mailing"), -1, 'email');
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/comm/mailing/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlright=''; $morehtmlright='';
$nbtry = $nbok = 0; $nbtry = $nbok = 0;

View File

@ -132,7 +132,7 @@ class Account extends CommonObject
/** /**
* IBAN number (International Bank Account Number). Stored into iban_prefix field into database * IBAN number (International Bank Account Number). Stored into iban_prefix field into database
* @var * @var string
*/ */
public $iban; public $iban;
@ -1427,6 +1427,7 @@ class Account extends CommonObject
if (!empty($this->iban)) if (!empty($this->iban))
{ {
// If IBAN defined, we can know country of account from it // If IBAN defined, we can know country of account from it
$reg = array();
if (preg_match("/^([a-zA-Z][a-zA-Z])/i", $this->iban, $reg)) return $reg[1]; if (preg_match("/^([a-zA-Z][a-zA-Z])/i", $this->iban, $reg)) return $reg[1];
} }

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file htdocs/compta/bank/various_expenses/card.php * \file htdocs/compta/bank/various_payment/card.php
* \ingroup bank * \ingroup bank
* \brief Page of various expenses * \brief Page of various expenses
*/ */

View File

@ -248,7 +248,7 @@ if ($action == "create" || $action == "start")
$vartouse = 'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse; $vartouse = 'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse;
$bankid = $conf->global->$vartouse; // This value is ok for 'Terminal 0' for module 'CashDesk' and 'TakePos' (they manage only 1 terminal) $bankid = $conf->global->$vartouse; // This value is ok for 'Terminal 0' for module 'CashDesk' and 'TakePos' (they manage only 1 terminal)
// Hook to get the good bank id according to posmodule and posnumber. // Hook to get the good bank id according to posmodule and posnumber.
// @TODO add hook here // @todo add hook here
if ($bankid > 0) if ($bankid > 0)
{ {

View File

@ -85,11 +85,11 @@ if ($action != 'create' && $action != 'edit')
} }
/* ************************************************************************** */ /*
/* */ *
/* Creation of an optional field */ * Creation of an optional field
/* */ *
/* ************************************************************************** */ */
if ($action == 'create') if ($action == 'create')
{ {
@ -99,11 +99,11 @@ if ($action == 'create')
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
} }
/* ************************************************************************** */ /*
/* */ *
/* Edition of an optional field */ * Edition of an optional field
/* */ *
/* ************************************************************************** */ */
if ($action == 'edit' && ! empty($attrname)) if ($action == 'edit' && ! empty($attrname))
{ {
$langs->load("members"); $langs->load("members");

View File

@ -86,11 +86,11 @@ if ($action != 'create' && $action != 'edit')
} }
/* ************************************************************************** */ /*
/* */ *
/* Creation of an optional field */ * Creation of an optional field
/* */ *
/* ************************************************************************** */ */
if ($action == 'create') if ($action == 'create')
{ {
@ -100,11 +100,11 @@ if ($action == 'create')
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
} }
/* ************************************************************************** */ /*
/* */ *
/* Edition of an optional field */ * Edition of an optional field
/* */ *
/* ************************************************************************** */ */
if ($action == 'edit' && ! empty($attrname)) if ($action == 'edit' && ! empty($attrname))
{ {
$langs->load("members"); $langs->load("members");

View File

@ -86,11 +86,11 @@ if ($action != 'create' && $action != 'edit')
} }
/* ************************************************************************** */ /*
/* */ *
/* Creation d'un champ optionnel * Creation d'un champ optionnel
/* */ *
/* ************************************************************************** */ */
if ($action == 'create') if ($action == 'create')
{ {
@ -100,11 +100,11 @@ if ($action == 'create')
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
} }
/* ************************************************************************** */ /*
/* */ *
/* Edition d'un champ optionnel */ * Edition d'un champ optionnel
/* */ *
/* ************************************************************************** */ */
if ($action == 'edit' && ! empty($attrname)) if ($action == 'edit' && ! empty($attrname))
{ {
print "<br>"; print "<br>";

View File

@ -86,11 +86,11 @@ if ($action != 'create' && $action != 'edit')
} }
/* ************************************************************************** */ /*
/* */ *
/* Creation d'un champ optionnel * Creation d'un champ optionnel
/* */ *
/* ************************************************************************** */ */
if ($action == 'create') if ($action == 'create')
{ {
@ -100,11 +100,11 @@ if ($action == 'create')
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
} }
/* ************************************************************************** */ /*
/* */ *
/* Edition d'un champ optionnel */ * Edition d'un champ optionnel
/* */ *
/* ************************************************************************** */ */
if ($action == 'edit' && ! empty($attrname)) if ($action == 'edit' && ! empty($attrname))
{ {
print "<br>"; print "<br>";

View File

@ -1976,7 +1976,14 @@ if (empty($reshook))
if ($tva_npr) if ($tva_npr)
$info_bits |= 0x01; $info_bits |= 0x01;
if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) { $price2num_pu_ht = price2num($pu_ht);
$price2num_remise_percent = price2num($remise_percent);
$price2num_price_min = price2num($price_min);
if (empty($price2num_pu_ht)) $price2num_pu_ht = 0;
if (empty($price2num_remise_percent)) $price2num_remise_percent = 0;
if (empty($price2num_price_min)) $price2num_price_min = 0;
if ($usercanproductignorepricemin && (! empty($price_min) && ($price2num_pu_ht * (1 - $price2num_remise_percent / 100) < $price2num_price_min))) {
$mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency));
setEventMessages($mesg, null, 'errors'); setEventMessages($mesg, null, 'errors');
} else { } else {

View File

@ -204,7 +204,7 @@ if ($action == 'valide')
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide', '', 0, 2); print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide', '', 0, 2);
} }
$linkback = '<a href="' . DOL_URL_ROOT . '/compta/paiement/list.php">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/compta/paiement/list.php?restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', ''); dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', '');

View File

@ -19,7 +19,7 @@
*/ */
/** /**
* \file htdocs/compat/paiement/class/cpaiement.class.php * \file htdocs/compta/paiement/class/cpaiement.class.php
* \ingroup facture * \ingroup facture
* \brief This file is to manage CRUD function of type of payments * \brief This file is to manage CRUD function of type of payments
*/ */

View File

@ -58,7 +58,7 @@ $head = payment_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans("PaymentCustomerInvoice"), -1, 'payment'); dol_fiche_head($head, 'info', $langs->trans("PaymentCustomerInvoice"), -1, 'payment');
$linkback = '<a href="' . DOL_URL_ROOT . '/compta/paiement/list.php">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/compta/paiement/list.php?restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', ''); dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', '');

View File

@ -280,7 +280,7 @@ class RejetPrelevement
* *
* @param int $amounts If you want to get the amount of the order for each invoice * @param int $amounts If you want to get the amount of the order for each invoice
* @return array Array List of invoices related to the withdrawal line * @return array Array List of invoices related to the withdrawal line
* @TODO A withdrawal line is today linked to one and only one invoice. So the function should return only one object ? * @todo A withdrawal line is today linked to one and only one invoice. So the function should return only one object ?
*/ */
private function getListInvoices($amounts = 0) private function getListInvoices($amounts = 0)
{ {

View File

@ -815,7 +815,9 @@ if (! empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING'))
$sql = "SELECT b.doc_ref, b.numero_compte, b.subledger_account, b.subledger_label, pcg_type, date_format(b.doc_date,'%Y-%m') as dm, sum(b.debit) as debit, sum(b.credit) as credit, sum(b.montant) as amount"; $sql = "SELECT b.doc_ref, b.numero_compte, b.subledger_account, b.subledger_label, pcg_type, date_format(b.doc_date,'%Y-%m') as dm, sum(b.debit) as debit, sum(b.credit) as credit, sum(b.montant) as amount";
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_account as aa"; $sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_account as aa";
$sql.= " WHERE b.numero_compte = aa.account_number AND b.entity = ".$conf->entity; $sql.= " WHERE b.entity = ".$conf->entity;
$sql.= " AND aa.entity = ".$conf->entity;
$sql.= " AND b.numero_compte = aa.account_number";
$sql.= " AND ".$predefinedgroupwhere; $sql.= " AND ".$predefinedgroupwhere;
$sql.= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'"; $sql.= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'";
if (! empty($date_start) && ! empty($date_end)) if (! empty($date_start) && ! empty($date_end))

View File

@ -420,7 +420,7 @@ elseif ($modecompta=="BOOKKEEPING")
foreach ($cpts as $i => $cpt) // Loop on each account. foreach ($cpts as $i => $cpt) // Loop on each account.
{ {
// We make 1 loop for each account because we may want detail per account. // We make 1 loop for each account because we may want detail per account.
// @TODO Optimize to ask a 'group by' account and a filter with account in (..., ...) in request // @todo Optimize to ask a 'group by' account and a filter with account in (..., ...) in request
// Each month // Each month
$resultN = 0; $resultN = 0;

View File

@ -194,7 +194,8 @@ elseif ($modecompta=="BOOKKEEPING")
$sql = "SELECT date_format(b.doc_date,'%Y-%m') as dm, sum(b.credit) as amount_ttc"; $sql = "SELECT date_format(b.doc_date,'%Y-%m') as dm, sum(b.credit) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_journal as aj"; $sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_journal as aj";
$sql.= " WHERE b.entity = ".$conf->entity; $sql.= " WHERE b.entity = ".$conf->entity;
$sql.= " AND b.code_journal = aj.code AND aj.nature = 2" ; // @TODO currently count amount in sale journal, but we need to define a category group for turnover $sql.= " AND aj.entity = ".$conf->entity;
$sql.= " AND b.code_journal = aj.code AND aj.nature = 2" ; // @todo currently count amount in sale journal, but we need to define a category group for turnover
} }
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";

View File

@ -261,6 +261,7 @@ class Contact extends CommonObject
$this->lastname = $this->lastname ?trim($this->lastname) : trim($this->name); $this->lastname = $this->lastname ?trim($this->lastname) : trim($this->name);
$this->firstname = trim($this->firstname); $this->firstname = trim($this->firstname);
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname = ucwords($this->lastname); if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname = ucwords($this->lastname);
if (!empty($conf->global->MAIN_ALL_TO_UPPER)) $this->lastname = strtoupper($this->lastname);
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname = ucwords($this->firstname); if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname = ucwords($this->firstname);
if (empty($this->socid)) $this->socid = 0; if (empty($this->socid)) $this->socid = 0;
if (empty($this->priv)) $this->priv = 0; if (empty($this->priv)) $this->priv = 0;
@ -372,6 +373,10 @@ class Contact extends CommonObject
$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity); $this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
// Clean parameters // Clean parameters
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname = ucwords($this->lastname);
if (!empty($conf->global->MAIN_ALL_TO_UPPER)) $this->lastname = strtoupper($this->lastname);
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname = ucwords($this->firstname);
$this->lastname = trim($this->lastname) ?trim($this->lastname) : trim($this->lastname); $this->lastname = trim($this->lastname) ?trim($this->lastname) : trim($this->lastname);
$this->firstname = trim($this->firstname); $this->firstname = trim($this->firstname);
$this->email = trim($this->email); $this->email = trim($this->email);

View File

@ -1117,7 +1117,7 @@ if (!$error && $massaction == 'validate' && $permissiontoadd)
{ {
$objecttmp = new $objectclass($db); $objecttmp = new $objectclass($db);
if ($objecttmp->element == 'invoice' && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) if (($objecttmp->element == 'facture' || $objecttmp->element == 'invoice') && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_BILL))
{ {
$langs->load("errors"); $langs->load("errors");
setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors');
@ -1280,7 +1280,7 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == '
} }
// Generate document foreach object according to model linked to object // Generate document foreach object according to model linked to object
// @TODO : propose model selection // @todo : propose model selection
if (!$error && $massaction == 'generate_doc' && $permissiontoread) if (!$error && $massaction == 'generate_doc' && $permissiontoread)
{ {
$db->begin(); $db->begin();

View File

@ -431,7 +431,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$object->socid = $sendtosocid; // To link to a company $object->socid = $sendtosocid; // To link to a company
$object->sendtoid = $sendtoid; // To link to contact addresses. This is an array. $object->sendtoid = $sendtoid; // To link to contact addresses. This is an array.
$object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) $object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
$object->actionmsg = $actionmsg; // Long text (@TODO Replace this with $message, we already have details of email in dedicated properties) $object->actionmsg = $actionmsg; // Long text (@todo Replace this with $message, we already have details of email in dedicated properties)
$object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentBy')...); $object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentBy')...);
$object->trackid = $trackid; $object->trackid = $trackid;
@ -444,7 +444,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$object->sendtouserid = $sendtouserid; $object->sendtouserid = $sendtouserid;
} }
$object->email_msgid = $mailfile->msgid; // @TODO Set msgid into $mailfile after sending $object->email_msgid = $mailfile->msgid; // @todo Set msgid into $mailfile after sending
$object->email_from = $from; $object->email_from = $from;
$object->email_subject = $subject; $object->email_subject = $subject;
$object->email_to = $sendto; $object->email_to = $sendto;

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -19,7 +19,7 @@
*/ */
/** /**
* \file htdocs/core/boxes/box_adherent_birthdays.php * \file htdocs/core/boxes/box_birthdays_members.php
* \ingroup member * \ingroup member
* \brief Box for member birthdays * \brief Box for member birthdays
*/ */

View File

@ -19,7 +19,7 @@
*/ */
/** /**
* \file core/boxes/box_ticket_latest.php * \file htdocs/core/boxes/box_last_ticket.php
* \ingroup ticket * \ingroup ticket
* \brief This box shows latest created tickets * \brief This box shows latest created tickets
*/ */

View File

@ -19,7 +19,7 @@
*/ */
/** /**
* \file htdocs/core/boxes/box_activite.php * \file htdocs/core/boxes/box_project.php
* \ingroup projet * \ingroup projet
* \brief Module to show Projet activity of the current Year * \brief Module to show Projet activity of the current Year
*/ */

View File

@ -73,7 +73,7 @@ abstract class CommonObject
public $table_element; public $table_element;
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = ''; public $table_element_line = '';
@ -577,7 +577,7 @@ abstract class CommonObject
$this->country = $tmparray['label']; $this->country = $tmparray['label'];
} }
if ($withregion && $this->state_id && (empty($this->state_code) || empty($this->state) || empty($this->region) || empty($this->region_cpde))) if ($withregion && $this->state_id && (empty($this->state_code) || empty($this->state) || empty($this->region) || empty($this->region_code)))
{ {
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
$tmparray = getState($this->state_id, 'all', 0, 1); $tmparray = getState($this->state_id, 'all', 0, 1);
@ -1986,7 +1986,7 @@ abstract class CommonObject
*/ */
public function setMulticurrencyCode($code) public function setMulticurrencyCode($code)
{ {
dol_syslog(get_class($this).'::setMulticurrencyCode('.$id.')'); dol_syslog(get_class($this).'::setMulticurrencyCode('.$code.')');
if ($this->statut >= 0 || $this->element == 'societe') if ($this->statut >= 0 || $this->element == 'societe')
{ {
$fieldname = 'multicurrency_code'; $fieldname = 'multicurrency_code';
@ -2028,7 +2028,7 @@ abstract class CommonObject
*/ */
public function setMulticurrencyRate($rate, $mode = 1) public function setMulticurrencyRate($rate, $mode = 1)
{ {
dol_syslog(get_class($this).'::setMulticurrencyRate('.$id.')'); dol_syslog(get_class($this).'::setMulticurrencyRate('.$rate.','.$mode.')');
if ($this->statut >= 0 || $this->element == 'societe') if ($this->statut >= 0 || $this->element == 'societe')
{ {
$fieldname = 'multicurrency_tx'; $fieldname = 'multicurrency_tx';
@ -2598,7 +2598,7 @@ abstract class CommonObject
*/ */
public function updateRangOfLine($rowid, $rang) public function updateRangOfLine($rowid, $rang)
{ {
$fieldposition = 'rang'; // @TODO Rename 'rang' into 'position' $fieldposition = 'rang'; // @todo Rename 'rang' into 'position'
if (in_array($this->table_element_line, array('bom_bomline', 'ecm_files', 'emailcollector_emailcollectoraction'))) $fieldposition = 'position'; if (in_array($this->table_element_line, array('bom_bomline', 'ecm_files', 'emailcollector_emailcollectoraction'))) $fieldposition = 'position';
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element_line.' SET '.$fieldposition.' = '.$rang; $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element_line.' SET '.$fieldposition.' = '.$rang;
@ -4883,7 +4883,7 @@ abstract class CommonObject
/** /**
* Build thumb * Build thumb
* @TODO Move this into files.lib.php * @todo Move this into files.lib.php
* *
* @param string $file Path file in UTF8 to original file to create thumbs from. * @param string $file Path file in UTF8 to original file to create thumbs from.
* @return void * @return void
@ -6607,7 +6607,7 @@ abstract class CommonObject
// Show only the key field in params // Show only the key field in params
if (is_array($params) && array_key_exists('onlykey', $params) && $key != $params['onlykey']) continue; if (is_array($params) && array_key_exists('onlykey', $params) && $key != $params['onlykey']) continue;
// @TODO Add test also on 'enabled' (different than 'list' that is 'visibility') // @todo Add test also on 'enabled' (different than 'list' that is 'visibility')
$enabled = 1; $enabled = 1;
$visibility = 1; $visibility = 1;

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file htdocs/core/ajax/fileupload.class.php * \file htdocs/core/class/fileupload.class.php
* \brief File to return Ajax response on file upload * \brief File to return Ajax response on file upload
*/ */

View File

@ -971,7 +971,7 @@ class FormFile
} }
// Get list of files starting with name of ref (but not followed by "-" to discard uploaded files and get only generated files) // Get list of files starting with name of ref (but not followed by "-" to discard uploaded files and get only generated files)
// @TODO Why not showing by default all files by just removing the '[^\-]+' at end of regex ? // @todo Why not showing by default all files by just removing the '[^\-]+' at end of regex ?
if (!empty($conf->global->MAIN_SHOW_ALL_FILES_ON_DOCUMENT_TOOLTIP)) if (!empty($conf->global->MAIN_SHOW_ALL_FILES_ON_DOCUMENT_TOOLTIP))
{ {
$filterforfilesearch = preg_quote(basename($modulesubdir), '/'); $filterforfilesearch = preg_quote(basename($modulesubdir), '/');

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* \file ticket/class/html.ticket.class.php * \file htdocs/core/class/html.formticket.class.php
* \ingroup ticket * \ingroup ticket
* \brief Fichier de la classe permettant la generation du formulaire html d'envoi de mail unitaire * \brief Fichier de la classe permettant la generation du formulaire html d'envoi de mail unitaire
*/ */

View File

@ -65,7 +65,7 @@ class Notify
// Les codes actions sont definis dans la table llx_notify_def // Les codes actions sont definis dans la table llx_notify_def
// codes actions supported are // codes actions supported are
// @TODO defined also into interface_50_modNotificiation_Notificiation.class.php // @todo defined also into interface_50_modNotificiation_Notificiation.class.php
public $arrayofnotifsupported = array( public $arrayofnotifsupported = array(
'BILL_VALIDATE', 'BILL_VALIDATE',
'BILL_PAYED', 'BILL_PAYED',

View File

@ -732,7 +732,7 @@ class Utils
chdir($dirofmodule); chdir($dirofmodule);
require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
$utils = new Utils($db); $utils = new Utils($this->db);
// Build HTML doc // Build HTML doc
$command=$conf->global->MODULEBUILDER_ASCIIDOCTOR.' '.$destfile.' -n -o '.$dirofmoduledoc.'/'.$FILENAMEDOC; $command=$conf->global->MODULEBUILDER_ASCIIDOCTOR.' '.$destfile.' -n -o '.$dirofmoduledoc.'/'.$FILENAMEDOC;

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* \file htdocs/core/class/WorkboardResponse.class.php * \file htdocs/core/class/workboardresponse.class.php
* \brief Class that represents response of load_board functions * \brief Class that represents response of load_board functions
*/ */

View File

@ -21,7 +21,7 @@
*/ */
/** /**
* \file htdocs/core/db/sqlite.class.php * \file htdocs/core/db/sqlite3.class.php
* \brief Class file to manage Dolibarr database access for a SQLite database * \brief Class file to manage Dolibarr database access for a SQLite database
*/ */

View File

@ -960,7 +960,7 @@ function dol_unescapefile($filename)
*/ */
function dolCheckVirus($src_file) function dolCheckVirus($src_file)
{ {
global $conf; global $conf, $db;
if (!empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) if (!empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
{ {
@ -995,7 +995,7 @@ function dolCheckVirus($src_file)
* @param integer $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error']) * @param integer $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error'])
* @param int $nohook Disable all hooks * @param int $nohook Disable all hooks
* @param string $varfiles _FILES var name * @param string $varfiles _FILES var name
* @return int >0 if OK, <0 or string if KO * @return int|string >0 if OK, <0 or string if KO
* @see dol_move() * @see dol_move()
*/ */
function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan = 0, $uploaderrorcode = 0, $nohook = 0, $varfiles = 'addedfile') function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan = 0, $uploaderrorcode = 0, $nohook = 0, $varfiles = 'addedfile')

View File

@ -17,7 +17,7 @@
* or see https://www.gnu.org/ * or see https://www.gnu.org/
*/ */
/** /**
* \file htdocs/core/lib/functionsnumbertoword.lib.php * \file htdocs/core/lib/functionsnumtoword.lib.php
* \brief A set of functions for Dolibarr * \brief A set of functions for Dolibarr
* This file contains all frequently used functions. * This file contains all frequently used functions.
*/ */

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file htdocs/core/modules/cheque/mod_chequereceipts_mint.php * \file htdocs/core/modules/cheque/mod_chequereceipt_mint.php
* \ingroup cheque * \ingroup cheque
* \brief File containing class for numbering module Mint * \brief File containing class for numbering module Mint
*/ */

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* \file htdocs/core/modules/cheque/mod_chequereceipts_thyme.php * \file htdocs/core/modules/cheque/mod_chequereceipt_thyme.php
* \ingroup cheque * \ingroup cheque
* \brief File containing class for numbering module Thyme * \brief File containing class for numbering module Thyme
*/ */

View File

@ -261,7 +261,10 @@ class ExportExcel2007new extends ModeleExports
$this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true); $this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true);
$this->workbook->getActiveSheet()->getStyle('1')->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT); $this->workbook->getActiveSheet()->getStyle('1')->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT);
$this->col=0; $this->col=1;
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) {
$this->col=0;
}
foreach($array_selected_sorted as $code => $value) foreach($array_selected_sorted as $code => $value)
{ {
$alias=$array_export_fields_label[$code]; $alias=$array_export_fields_label[$code];
@ -301,7 +304,10 @@ class ExportExcel2007new extends ModeleExports
global $conf; global $conf;
// Define first row // Define first row
$this->col=0; $this->col=1;
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) {
$this->col=0;
}
$reg=array(); $reg=array();

View File

@ -63,11 +63,11 @@ class mod_arctic extends ModeleNumRefFicheinter
*/ */
public function info() public function info()
{ {
global $conf, $langs; global $db, $conf, $langs;
$langs->load("bills"); $langs->load("bills");
$form = new Form($this->db); $form = new Form($db);
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n"; $texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; $texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';

View File

@ -16,18 +16,18 @@
*/ */
/** /**
* \defgroup dav Module dav * \defgroup emailcollector Module emailcollector
* \brief dav module descriptor. * \brief emailcollector module descriptor.
* *
* \file htdocs/dav/core/modules/modDav.class.php * \file htdocs/emailcollector/core/modules/modEmailCollector.class.php
* \ingroup dav * \ingroup emailcollector
* \brief Description and activation file for module dav * \brief Description and activation file for module emailcollector
*/ */
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/** /**
* Description and activation class for module dav * Description and activation class for module emailcollector
*/ */
class modEmailCollector extends DolibarrModules class modEmailCollector extends DolibarrModules
{ {
@ -108,10 +108,10 @@ class modEmailCollector extends DolibarrModules
); );
if (! isset($conf->dav) || ! isset($conf->dav->enabled)) if (! isset($conf->emailcollector) || ! isset($conf->emailcollector->enabled))
{ {
$conf->dav=new stdClass(); $conf->emailcollector=new stdClass();
$conf->dav->enabled=0; $conf->emailcollector->enabled=0;
} }

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -42,8 +43,16 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
*/ */
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
/**
* Prefix customer accountancy code
* @var string
*/
public $prefixcustomeraccountancycode; public $prefixcustomeraccountancycode;
/**
* Prefix supplier accountancy code
* @var string
*/
public $prefixsupplieraccountancycode; public $prefixsupplieraccountancycode;
public $position = 30; public $position = 30;
@ -117,7 +126,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
*/ */
public function getExample($langs, $objsoc = 0, $type = -1) public function getExample($langs, $objsoc = 0, $type = -1)
{ {
global $mysoc; global $conf, $mysoc;
$s = $langs->trans("ThirdPartyName").": ".$mysoc->name; $s = $langs->trans("ThirdPartyName").": ".$mysoc->name;
$s .= "<br>\n"; $s .= "<br>\n";
@ -142,6 +151,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
public function get_code($db, $societe, $type = '') public function get_code($db, $societe, $type = '')
{ {
// phpcs:enable // phpcs:enable
global $conf;
$i = 0; $i = 0;
$this->code = ''; $this->code = '';

View File

@ -44,7 +44,7 @@ class InterfaceNotification extends DolibarrTriggers
*/ */
public $picto = 'email'; public $picto = 'email';
// @TODO Defined also into notify.class.php) // @todo Defined also into notify.class.php)
public $listofmanagedevents=array( public $listofmanagedevents=array(
'BILL_VALIDATE', 'BILL_VALIDATE',
'BILL_PAYED', 'BILL_PAYED',

View File

@ -21,9 +21,9 @@
*/ */
/** /**
* \file htdocs/don/admin/dons.php * \file htdocs/don/admin/donation.php
* \ingroup donations * \ingroup donations
* \brief Page to setup the donation module * \brief Page to setup the donation module
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';

View File

@ -693,7 +693,7 @@ if (empty($reshook))
if ($lines[$i]->entrepot_id > 0) if ($lines[$i]->entrepot_id > 0)
{ {
// single warehouse shipment line // single warehouse shipment line
if ($lines[i]->entrepot_id == $lotStock->warehouseid) if ($lines[$i]->entrepot_id == $lotStock->warehouseid)
{ {
$lineIdToAddLot = $line_id; $lineIdToAddLot = $line_id;
} }

View File

@ -2712,8 +2712,8 @@ class ExpenseReportLine
if (!empty($this->id)) $sql.= ' AND d.rowid <> '.$this->id; if (!empty($this->id)) $sql.= ' AND d.rowid <> '.$this->id;
$sql .= ' AND d.fk_c_type_fees = '.$rule->fk_c_type_fees; $sql .= ' AND d.fk_c_type_fees = '.$rule->fk_c_type_fees;
if ($mode == 'day' || $mode == 'EX_DAY') $sql .= ' AND d.date = \''.dol_print_date($this->date, '%Y-%m-%d').'\''; if ($mode == 'day' || $mode == 'EX_DAY') $sql .= ' AND d.date = \''.dol_print_date($this->date, '%Y-%m-%d').'\'';
elseif ($mode == 'mon' || $mode == 'EX_MON') $sql .= ' AND DATE_FORMAT(d.date, \'%Y-%m\') = \''.dol_print_date($this->date, '%Y-%m').'\''; // @TODO DATE_FORMAT is forbidden elseif ($mode == 'mon' || $mode == 'EX_MON') $sql .= ' AND DATE_FORMAT(d.date, \'%Y-%m\') = \''.dol_print_date($this->date, '%Y-%m').'\''; // @todo DATE_FORMAT is forbidden
elseif ($mode == 'year' || $mode == 'EX_YEA') $sql .= ' AND DATE_FORMAT(d.date, \'%Y\') = \''.dol_print_date($this->date, '%Y').'\''; // @TODO DATE_FORMAT is forbidden elseif ($mode == 'year' || $mode == 'EX_YEA') $sql .= ' AND DATE_FORMAT(d.date, \'%Y\') = \''.dol_print_date($this->date, '%Y').'\''; // @todo DATE_FORMAT is forbidden
dol_syslog('ExpenseReportLine::getExpAmount'); dol_syslog('ExpenseReportLine::getExpAmount');

View File

@ -6,7 +6,7 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com> * Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -197,6 +197,8 @@ class Fichinter extends CommonObject
{ {
global $conf, $langs; global $conf, $langs;
$error = 0;
dol_syslog(get_class($this)."::create ref=".$this->ref); dol_syslog(get_class($this)."::create ref=".$this->ref);
// Check parameters // Check parameters
@ -329,6 +331,8 @@ class Fichinter extends CommonObject
*/ */
public function update($user, $notrigger = 0) public function update($user, $notrigger = 0)
{ {
global $conf;
if (! is_numeric($this->duration)) { if (! is_numeric($this->duration)) {
$this->duration = 0; $this->duration = 0;
} }
@ -1474,6 +1478,8 @@ class FichinterLigne extends CommonObjectLine
{ {
global $langs,$conf; global $langs,$conf;
$error = 0;
dol_syslog("FichinterLigne::insert rang=".$this->rang); dol_syslog("FichinterLigne::insert rang=".$this->rang);
$this->db->begin(); $this->db->begin();
@ -1570,7 +1576,9 @@ class FichinterLigne extends CommonObjectLine
{ {
global $langs,$conf; global $langs,$conf;
$this->db->begin(); $error = 0;
$this->db->begin();
// Mise a jour ligne en base // Mise a jour ligne en base
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinterdet SET"; $sql = "UPDATE ".MAIN_DB_PREFIX."fichinterdet SET";

View File

@ -23,9 +23,9 @@
*/ */
/** /**
* \file fichinterrec/class/fichinter-rec.class.php * \file htdocs/fichinter/class/fichinterrec.class.php
* \ingroup facture * \ingroup facture
* \brief Fichier de la classe des factures recurentes * \brief Fichier de la classe des factures recurentes
*/ */
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';

View File

@ -2892,9 +2892,9 @@ class CommandeFournisseur extends CommonOrder
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
if ($db->num_rows($query)) if ($db->num_rows($resql))
{ {
$obj = $db->fetch_object($query); $obj = $db->fetch_object($resql);
$string = $langs->trans($obj->code); $string = $langs->trans($obj->code);
if ($string == $obj->code) if ($string == $obj->code)
@ -3590,7 +3590,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
if (!$error) if (!$error)
{ {
$this->db->commit(); $this->db->commit();
return $result; return 1;
} }
else else
{ {

View File

@ -4474,7 +4474,10 @@ function migrate_delete_old_files($db, $langs, $conf)
'/core/modules/facture/pdf_crabe.modules.php', '/core/modules/facture/pdf_crabe.modules.php',
'/core/modules/facture/pdf_oursin.modules.php', '/core/modules/facture/pdf_oursin.modules.php',
'/compta/facture/class/api_invoice.class.php', '/api/class/api_generic.class.php',
'/categories/class/api_category.class.php',
'/categories/class/api_deprecated_category.class.php',
'/compta/facture/class/api_invoice.class.php',
'/commande/class/api_commande.class.php', '/commande/class/api_commande.class.php',
'/user/class/api_user.class.php', '/user/class/api_user.class.php',
'/product/class/api_product.class.php', '/product/class/api_product.class.php',

View File

@ -436,7 +436,7 @@ else
/* /*
if (($object->origin == 'shipment' || $object->origin == 'expedition') && $object->origin_id > 0) if (($object->origin == 'shipment' || $object->origin == 'expedition') && $object->origin_id > 0)
{ {
$linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
// Ref // Ref
print '<tr><td width="20%">'.$langs->trans("RefSending").'</td>'; print '<tr><td width="20%">'.$langs->trans("RefSending").'</td>';

View File

@ -18,8 +18,9 @@
*/ */
/** /**
* \file tvi/ajax/list.php * \file htdocs/loan/calcmens.php
* \brief File to return datables output * \ingroup loan
* \brief File to calculate loan monthly payments
*/ */
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal

View File

@ -439,7 +439,7 @@ if ($id > 0)
// Loan card // Loan card
$linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<div class="refidno">'; $morehtmlref = '<div class="refidno">';
// Ref loan // Ref loan

View File

@ -124,7 +124,7 @@ if ($object->id)
} }
$morehtmlref .= '</div>'; $morehtmlref .= '</div>';
$linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status $object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status

View File

@ -96,7 +96,7 @@ if (!empty($conf->projet->enabled)) {
} }
$morehtmlref .= '</div>'; $morehtmlref .= '</div>';
$linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status $object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status

View File

@ -113,7 +113,7 @@ if ($id > 0)
} }
$morehtmlref .= '</div>'; $morehtmlref .= '</div>';
$linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status $object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status

View File

@ -44,7 +44,7 @@ llxHeader("", $title, $help_url);
$head = loan_prepare_head($object); $head = loan_prepare_head($object);
dol_fiche_head($head, 'FinancialCommitment', $langs->trans("Loan"), -1, 'bill'); dol_fiche_head($head, 'FinancialCommitment', $langs->trans("Loan"), -1, 'bill');
$linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<div class="refidno">'; $morehtmlref = '<div class="refidno">';
// Ref loan // Ref loan

View File

@ -22,7 +22,7 @@
*/ */
/** /**
* \file htdocs/core/modules/commande/doc/doc_generic_myobject_odt.modules.php * \file htdocs/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php
* \ingroup mymodule * \ingroup mymodule
* \brief File of class to build ODT documents for myobjects * \brief File of class to build ODT documents for myobjects
*/ */

View File

@ -16,7 +16,7 @@
*/ */
/** /**
* \file htdocs/mrp/ajax/ajax.php * \file htdocs/mrp/ajax/ajax_bom.php
* \brief Ajax search component for Mrp. It get BOM content. * \brief Ajax search component for Mrp. It get BOM content.
*/ */

View File

@ -252,7 +252,7 @@ class Product extends CommonObject
/** /**
* Customs code * Customs code
* *
* @var * @var string
*/ */
public $customcode; public $customcode;

View File

@ -371,7 +371,7 @@ else
print $formconfirm; print $formconfirm;
// Warehouse card // Warehouse card
$linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';
$morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu; $morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu;

View File

@ -53,7 +53,7 @@ $head = stock_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans("Warehouse"), -1, 'stock'); dol_fiche_head($head, 'info', $langs->trans("Warehouse"), -1, 'stock');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';
$morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu; $morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu;

View File

@ -110,7 +110,7 @@ function dispatchedOrders()
* ordered * ordered
* *
* @param int $product_id Product id * @param int $product_id Product id
* @return void * @return string|null
*/ */
function ordered($product_id) function ordered($product_id)
{ {
@ -155,7 +155,7 @@ function ordered($product_id)
* getProducts * getProducts
* *
* @param int $order_id Order id * @param int $order_id Order id
* @return void * @return array|array[integer]
*/ */
function getProducts($order_id) function getProducts($order_id)
{ {

View File

@ -560,7 +560,7 @@ if ($resql)
dol_fiche_head($head, 'movements', $langs->trans("Warehouse"), -1, 'stock'); dol_fiche_head($head, 'movements', $langs->trans("Warehouse"), -1, 'stock');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<div class="refidno">'; $morehtmlref = '<div class="refidno">';
$morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu; $morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu;

View File

@ -542,7 +542,7 @@ if ($resql)
dol_fiche_head($head, 'movements', $langs->trans("Warehouse"), -1, 'stock'); dol_fiche_head($head, 'movements', $langs->trans("Warehouse"), -1, 'stock');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';
$morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu; $morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu;

View File

@ -22,7 +22,7 @@
*/ */
/** /**
* \file htdocs/admin/project.php * \file htdocs/projet/admin/project.php
* \ingroup project * \ingroup project
* \brief Page to setup project module * \brief Page to setup project module
*/ */

View File

@ -1106,7 +1106,7 @@ class Reception extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $option = 0, $max = 0, $short = 0, $notooltip = 0) public function getNomUrl($withpicto = 0, $option = 0, $max = 0, $short = 0, $notooltip = 0)
{ {
global $langs; global $conf, $langs;
$result = ''; $result = '';
$label = '<u>'.$langs->trans("ShowReception").'</u>'; $label = '<u>'.$langs->trans("ShowReception").'</u>';
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; $label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;

View File

@ -162,7 +162,7 @@ if ($id > 0 || !empty($ref))
// Reception card // Reception card
$linkback = '<a href="'.DOL_URL_ROOT.'/reception/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/reception/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<div class="refidno">'; $morehtmlref = '<div class="refidno">';
// Ref customer reception // Ref customer reception

View File

@ -19,7 +19,7 @@
*/ */
/** /**
* \file htdocs/reception/nosendingte.php * \file htdocs/reception/note.php
* \ingroup receptionsending * \ingroup receptionsending
* \brief Note card reception * \brief Note card reception
*/ */
@ -102,7 +102,7 @@ if ($id > 0 || ! empty($ref))
// Reception card // Reception card
$linkback = '<a href="'.DOL_URL_ROOT.'/reception/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/reception/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';
// Ref customer reception // Ref customer reception

View File

@ -16,7 +16,7 @@
*/ */
/** /**
* \file resource/class/resource.class.php * \file htdocs/resource/class/dolresource.class.php
* \ingroup resource * \ingroup resource
* \brief Class file for resource object * \brief Class file for resource object
*/ */

View File

@ -673,6 +673,7 @@ class Societe extends CommonObject
if (empty($this->status)) $this->status = 0; if (empty($this->status)) $this->status = 0;
$this->name = $this->name ?trim($this->name) : trim($this->nom); $this->name = $this->name ?trim($this->name) : trim($this->nom);
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->name = ucwords($this->name); if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->name = ucwords($this->name);
if (!empty($conf->global->MAIN_ALL_TO_UPPER)) $this->name=strtoupper($this->name);
$this->nom = $this->name; // For backward compatibility $this->nom = $this->name; // For backward compatibility
if (empty($this->client)) $this->client = 0; if (empty($this->client)) $this->client = 0;
if (empty($this->fournisseur)) $this->fournisseur = 0; if (empty($this->fournisseur)) $this->fournisseur = 0;
@ -988,6 +989,8 @@ class Societe extends CommonObject
$now = dol_now(); $now = dol_now();
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->name = ucwords($this->name);
if (! empty($conf->global->MAIN_ALL_TO_UPPER)) $this->name=strtoupper($this->name);
// Clean parameters // Clean parameters
$this->id = $id; $this->id = $id;
$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity); $this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);

View File

@ -1618,7 +1618,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
{ {
dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"), -1, 'company'); dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"), -1, 'company');
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom');
@ -1724,7 +1724,7 @@ if ($socid && $action == 'editcard' && $user->rights->societe->creer)
{ {
dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"), -1, 'company'); dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"), -1, 'company');
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom');
@ -1772,7 +1772,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
{ {
dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"), -1, 'company'); dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"), -1, 'company');
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom');
@ -1872,7 +1872,7 @@ if ($socid && $action == 'createcard' && $user->rights->societe->creer)
{ {
dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"), -1, 'company'); dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"), -1, 'company');
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom');

View File

@ -185,7 +185,7 @@ $head = societe_prepare_head($object);
dol_fiche_head($head, 'price', $langs->trans("ThirdParty"), -1, 'company'); dol_fiche_head($head, 'price', $langs->trans("ThirdParty"), -1, 'company');
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom');

View File

@ -28,7 +28,7 @@
/** /**
* \file htdocs/stripe/payment.php * \file htdocs/stripe/payment.php
* \ingroup stripe * \ingroup stripe
* \brief Payment page for customers invoices. @TODO Seems deprecated and bugged and not used (no link to this page) ! * \brief Payment page for customers invoices. @todo Seems deprecated and bugged and not used (no link to this page) !
*/ */
// Load Dolibarr environment // Load Dolibarr environment

View File

@ -16,7 +16,7 @@
*/ */
/** /**
* \file htdocs/takepos/printsend.php * \file htdocs/takepos/send.php
* \ingroup takepos * \ingroup takepos
* \brief Page with the content of the popup to enter payments * \brief Page with the content of the popup to enter payments
*/ */

View File

@ -765,7 +765,7 @@ $menus[$r++]=array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"><
print '<!-- Show the search input text -->'."\n"; print '<!-- Show the search input text -->'."\n";
print '<div class="margintoponly">'; print '<div class="margintoponly">';
print '<input type="text" id="search" name="search" onkeyup="Search2();" style="width:80%;font-size: 150%;" placeholder="'.$langs->trans("Search").'" autofocus> '; print '<input type="text" id="search" name="search" onkeyup="Search2();" style="width:80%;width:calc(100% - 41px);font-size: 150%;" placeholder="'.$langs->trans("Search").'" autofocus> ';
print '<a class="marginleftonly hideonsmartphone" onclick="ClearSearch();">'.img_picto('', 'searchclear').'</a>'; print '<a class="marginleftonly hideonsmartphone" onclick="ClearSearch();">'.img_picto('', 'searchclear').'</a>';
print '</div>'; print '</div>';
?> ?>

View File

@ -692,7 +692,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
*/ */
print '<table class="border centpercent">'; print '<table class="border centpercent">';
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
// Ref // Ref
print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">'; print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">';
@ -820,7 +820,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
$morehtmlref .= '</div>'; $morehtmlref .= '</div>';
$linkback = '<a href="'.DOL_URL_ROOT.'/ticket/list.php"><strong>'.$langs->trans("BackToList").'</strong></a> '; $linkback = '<a href="'.DOL_URL_ROOT.'/ticket/list.php?restore_lastsearch_values=1"><strong>'.$langs->trans("BackToList").'</strong></a> ';
dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', 'ref', $morehtmlref); dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', 'ref', $morehtmlref);

View File

@ -20,9 +20,9 @@
*/ */
/** /**
* \file htdocs/adherents/admin/adherent_extrafields.php * \file htdocs/user/admin/group_extrafields.php
* \ingroup member * \ingroup user
* \brief Page to setup extra fields of members * \brief Page to setup extra fields of users
*/ */
require '../../main.inc.php'; require '../../main.inc.php';

View File

@ -19,9 +19,9 @@
*/ */
/** /**
* \file htdocs/adherents/admin/adherent_extrafields.php * \file htdocs/user/admin/user_extrafields.php
* \ingroup member * \ingroup user
* \brief Page to setup extra fields of members * \brief Page to setup extra fields of users
*/ */
require '../../main.inc.php'; require '../../main.inc.php';

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