Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/admin/system/filecheck.php htdocs/api/class/api_setup.class.php htdocs/compta/facture/card.php htdocs/compta/stats/index.php htdocs/core/actions_massactions.inc.php htdocs/install/upgrade2.php htdocs/loan/card.php htdocs/loan/document.php htdocs/loan/info.php htdocs/loan/note.php htdocs/loan/schedule.php htdocs/product/list.php htdocs/ticket/card.php htdocs/user/class/user.class.php
This commit is contained in:
commit
838633d0de
@ -145,7 +145,7 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||
// 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');
|
||||
*/
|
||||
$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
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
$dir='';
|
||||
|
||||
@ -114,7 +114,7 @@ if ($id > 0)
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
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
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
|
||||
@ -53,7 +53,7 @@ $head = subscription_prepare_head($object);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* 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>
|
||||
*
|
||||
* 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']);
|
||||
|
||||
// Defined qualified files (must be same than into generate_filelist_xml.php)
|
||||
$regextoinclude = '\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$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
|
||||
$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
|
||||
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
|
||||
|
||||
// Fill file_list with files in signature, new files, modified files
|
||||
|
||||
@ -1473,8 +1473,8 @@ class Setup extends DolibarrApi
|
||||
$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)
|
||||
$regextoinclude = '\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$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
|
||||
$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
|
||||
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
|
||||
|
||||
// Fill file_list with files in signature, new files, modified files
|
||||
|
||||
@ -222,7 +222,7 @@ if ($id > 0 && ! preg_match('/^add/i', $action))
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@ -238,7 +238,7 @@ if ($object->id > 0)
|
||||
|
||||
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');
|
||||
|
||||
|
||||
@ -1189,7 +1189,7 @@ else
|
||||
|
||||
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 = '';
|
||||
if ($object->statut == 2) $morehtmlright .= ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.') ';
|
||||
|
||||
@ -221,7 +221,7 @@ if ($object->fetch($id) >= 0)
|
||||
|
||||
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 = '';
|
||||
$nbtry = $nbok = 0;
|
||||
|
||||
@ -54,7 +54,7 @@ if ($object->fetch($id) >= 0)
|
||||
|
||||
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='';
|
||||
$nbtry = $nbok = 0;
|
||||
|
||||
@ -1976,7 +1976,14 @@ if (empty($reshook))
|
||||
if ($tva_npr)
|
||||
$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));
|
||||
setEventMessages($mesg, null, 'errors');
|
||||
} else {
|
||||
|
||||
@ -204,7 +204,7 @@ if ($action == 'valide')
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&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', '');
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ $head = payment_prepare_head($object);
|
||||
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', '');
|
||||
|
||||
|
||||
@ -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.= " 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 fk_pcg_version = '".$db->escape($charofaccountstring)."'";
|
||||
if (! empty($date_start) && ! empty($date_end))
|
||||
|
||||
@ -194,6 +194,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
||||
$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.= " WHERE b.entity = ".$conf->entity;
|
||||
$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
|
||||
}
|
||||
|
||||
|
||||
@ -1117,7 +1117,7 @@ if (!$error && $massaction == 'validate' && $permissiontoadd)
|
||||
{
|
||||
$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");
|
||||
setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors');
|
||||
|
||||
@ -577,7 +577,7 @@ abstract class CommonObject
|
||||
$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';
|
||||
$tmparray = getState($this->state_id, 'all', 0, 1);
|
||||
@ -1986,7 +1986,7 @@ abstract class CommonObject
|
||||
*/
|
||||
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')
|
||||
{
|
||||
$fieldname = 'multicurrency_code';
|
||||
@ -2028,7 +2028,7 @@ abstract class CommonObject
|
||||
*/
|
||||
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')
|
||||
{
|
||||
$fieldname = 'multicurrency_tx';
|
||||
|
||||
@ -732,7 +732,7 @@ class Utils
|
||||
chdir($dirofmodule);
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
|
||||
$utils = new Utils($db);
|
||||
$utils = new Utils($this->db);
|
||||
|
||||
// Build HTML doc
|
||||
$command=$conf->global->MODULEBUILDER_ASCIIDOCTOR.' '.$destfile.' -n -o '.$dirofmoduledoc.'/'.$FILENAMEDOC;
|
||||
|
||||
@ -960,7 +960,7 @@ function dol_unescapefile($filename)
|
||||
*/
|
||||
function dolCheckVirus($src_file)
|
||||
{
|
||||
global $conf;
|
||||
global $conf, $db;
|
||||
|
||||
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 int $nohook Disable all hooks
|
||||
* @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()
|
||||
*/
|
||||
function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan = 0, $uploaderrorcode = 0, $nohook = 0, $varfiles = 'addedfile')
|
||||
|
||||
@ -261,7 +261,10 @@ class ExportExcel2007new extends ModeleExports
|
||||
$this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true);
|
||||
$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)
|
||||
{
|
||||
$alias=$array_export_fields_label[$code];
|
||||
@ -301,7 +304,10 @@ class ExportExcel2007new extends ModeleExports
|
||||
global $conf;
|
||||
|
||||
// Define first row
|
||||
$this->col=0;
|
||||
$this->col=1;
|
||||
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) {
|
||||
$this->col=0;
|
||||
}
|
||||
|
||||
$reg=array();
|
||||
|
||||
|
||||
@ -693,7 +693,7 @@ if (empty($reshook))
|
||||
if ($lines[$i]->entrepot_id > 0)
|
||||
{
|
||||
// single warehouse shipment line
|
||||
if ($lines[i]->entrepot_id == $lotStock->warehouseid)
|
||||
if ($lines[$i]->entrepot_id == $lotStock->warehouseid)
|
||||
{
|
||||
$lineIdToAddLot = $line_id;
|
||||
}
|
||||
|
||||
@ -3590,7 +3590,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
||||
if (!$error)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $result;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -4474,7 +4474,10 @@ function migrate_delete_old_files($db, $langs, $conf)
|
||||
'/core/modules/facture/pdf_crabe.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',
|
||||
'/user/class/api_user.class.php',
|
||||
'/product/class/api_product.class.php',
|
||||
|
||||
@ -436,7 +436,7 @@ else
|
||||
/*
|
||||
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
|
||||
print '<tr><td width="20%">'.$langs->trans("RefSending").'</td>';
|
||||
|
||||
@ -439,7 +439,7 @@ if ($id > 0)
|
||||
|
||||
// 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">';
|
||||
// Ref loan
|
||||
|
||||
@ -124,7 +124,7 @@ if ($object->id)
|
||||
}
|
||||
$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
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ if (!empty($conf->projet->enabled)) {
|
||||
}
|
||||
$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
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ if ($id > 0)
|
||||
}
|
||||
$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
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ llxHeader("", $title, $help_url);
|
||||
$head = loan_prepare_head($object);
|
||||
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">';
|
||||
// Ref loan
|
||||
|
||||
@ -371,7 +371,7 @@ else
|
||||
print $formconfirm;
|
||||
|
||||
// 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.=$langs->trans("LocationSummary").' : '.$object->lieu;
|
||||
|
||||
@ -53,7 +53,7 @@ $head = stock_prepare_head($object);
|
||||
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.=$langs->trans("LocationSummary").' : '.$object->lieu;
|
||||
|
||||
@ -560,7 +560,7 @@ if ($resql)
|
||||
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 .= $langs->trans("LocationSummary").' : '.$object->lieu;
|
||||
|
||||
@ -542,7 +542,7 @@ if ($resql)
|
||||
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.=$langs->trans("LocationSummary").' : '.$object->lieu;
|
||||
|
||||
@ -162,7 +162,7 @@ if ($id > 0 || !empty($ref))
|
||||
|
||||
|
||||
// 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">';
|
||||
// Ref customer reception
|
||||
|
||||
@ -102,7 +102,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
|
||||
// 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">';
|
||||
// Ref customer reception
|
||||
|
||||
@ -1613,7 +1613,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
|
||||
{
|
||||
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');
|
||||
|
||||
@ -1719,7 +1719,7 @@ if ($socid && $action == 'editcard' && $user->rights->societe->creer)
|
||||
{
|
||||
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');
|
||||
|
||||
@ -1767,7 +1767,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
|
||||
{
|
||||
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');
|
||||
|
||||
@ -1867,7 +1867,7 @@ if ($socid && $action == 'createcard' && $user->rights->societe->creer)
|
||||
{
|
||||
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');
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ $head = societe_prepare_head($object);
|
||||
|
||||
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');
|
||||
|
||||
|
||||
@ -765,7 +765,7 @@ $menus[$r++]=array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"><
|
||||
|
||||
print '<!-- Show the search input text -->'."\n";
|
||||
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 '</div>';
|
||||
?>
|
||||
|
||||
@ -692,7 +692,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
||||
*/
|
||||
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
|
||||
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>';
|
||||
|
||||
$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);
|
||||
|
||||
|
||||
@ -477,7 +477,7 @@ if ($id && ($action == 'edit' || $action == 'create') && $user->rights->user->us
|
||||
$title = $langs->trans("User");
|
||||
dol_fiche_head($head, 'bank', $title, 0, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
@ -918,6 +918,7 @@ class User extends CommonObject
|
||||
else
|
||||
{
|
||||
$sql .= " AND gr.entity = ".$conf->entity;
|
||||
$sql .= " AND gu.entity = ".$conf->entity;
|
||||
$sql .= " AND r.entity = ".$conf->entity;
|
||||
}
|
||||
$sql .= " AND gr.fk_usergroup = gu.fk_usergroup";
|
||||
|
||||
@ -329,7 +329,7 @@ else
|
||||
{
|
||||
dol_fiche_head($head, 'guisetup', $title, -1, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user