diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 8a3096ef72a..59a39416b28 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -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=''; diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index a6343596632..cc840f754bc 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -114,7 +114,7 @@ if ($id > 0) print '
'; print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) diff --git a/htdocs/adherents/subscription/info.php b/htdocs/adherents/subscription/info.php index b2f903c1ade..f3d9fc5790c 100644 --- a/htdocs/adherents/subscription/info.php +++ b/htdocs/adherents/subscription/info.php @@ -53,7 +53,7 @@ $head = subscription_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("Subscription"), -1, 'payment'); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'rowid', $linkback, 1); diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 7f2ae92851b..9bae083ea0d 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2016 Laurent Destailleur * Copyright (C) 2007 Rodolphe Quiedeville * Copyright (C) 2007-2012 Regis Houssin - * Copyright (C) 2015 Frederic France + * Copyright (C) 2015-2019 Frederic France * Copyright (C) 2017 Nicolas ZABOURI * * 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 diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index a92a372cc99..553c30e0ec8 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -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 diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 200b8898ed9..64f8c829072 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -222,7 +222,7 @@ if ($id > 0 && ! preg_match('/^add/i', $action)) dol_fiche_head($head, $hselected, $langs->trans("Bookmark"), -1, 'bookmark'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', '', 0); diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 010a3c6785a..4e0cfa2f2dc 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -238,7 +238,7 @@ if ($object->id > 0) dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"), -1, 'company'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 9375767a172..e2985677514 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -1189,7 +1189,7 @@ else dol_fiche_head($head, 'card', $langs->trans("Mailing"), -1, 'email'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlright = ''; if ($object->statut == 2) $morehtmlright .= ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.') '; diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 9e820a6d608..460c691329e 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -221,7 +221,7 @@ if ($object->fetch($id) >= 0) dol_fiche_head($head, 'targets', $langs->trans("Mailing"), -1, 'email'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlright = ''; $nbtry = $nbok = 0; diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index c0b01050d8f..2291f04d0fb 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -54,7 +54,7 @@ if ($object->fetch($id) >= 0) dol_fiche_head($head, 'info', $langs->trans("Mailing"), -1, 'email'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlright=''; $nbtry = $nbok = 0; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index b4ad3a1e1ab..92e0f0a7543 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -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 { diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 7b14146edf8..ffdb2bb90ea 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -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 = '' . $langs->trans("BackToList") . ''; +$linkback = '' . $langs->trans("BackToList") . ''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', ''); diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php index e19ef3d09e6..691707cf188 100644 --- a/htdocs/compta/paiement/info.php +++ b/htdocs/compta/paiement/info.php @@ -58,7 +58,7 @@ $head = payment_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("PaymentCustomerInvoice"), -1, 'payment'); -$linkback = '' . $langs->trans("BackToList") . ''; +$linkback = '' . $langs->trans("BackToList") . ''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', ''); diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 33609f98997..88faf188d17 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -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)) diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index df9ac7d3a7e..fe0668aa9b2 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -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 } diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index f379cd0c82f..37f2dd62fa3 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -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'); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index a4259b2bd41..6680c81fa20 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -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'; diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index aea79fdea29..cab3b4b4336 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -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; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index dc3581eaf20..587b8ab8434 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -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') diff --git a/htdocs/core/modules/export/export_excel2007new.modules.php b/htdocs/core/modules/export/export_excel2007new.modules.php index 7d745eac6d9..09a93f3d60f 100644 --- a/htdocs/core/modules/export/export_excel2007new.modules.php +++ b/htdocs/core/modules/export/export_excel2007new.modules.php @@ -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(); diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 40445b522da..b5848cd562b 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -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; } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 977545bdeb9..54aa70469e2 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3590,7 +3590,7 @@ class CommandeFournisseurLigne extends CommonOrderLine if (!$error) { $this->db->commit(); - return $result; + return 1; } else { diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index d4fd5a20caf..2ef48bc9f0b 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -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', diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index e72dcb08fae..01dcf7388a3 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -436,7 +436,7 @@ else /* if (($object->origin == 'shipment' || $object->origin == 'expedition') && $object->origin_id > 0) { - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 85b797804c9..27e6f4da7a0 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -439,7 +439,7 @@ if ($id > 0) // Loan card - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; // Ref loan diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index a4328bec863..00efe316732 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -124,7 +124,7 @@ if ($object->id) } $morehtmlref .= '
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status diff --git a/htdocs/loan/info.php b/htdocs/loan/info.php index 1a26a8a12da..cc2d71a9d65 100644 --- a/htdocs/loan/info.php +++ b/htdocs/loan/info.php @@ -96,7 +96,7 @@ if (!empty($conf->projet->enabled)) { } $morehtmlref .= ''; -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''.$langs->trans("BackToList").''; $object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index ebe0b9d876c..a9e15385e34 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -113,7 +113,7 @@ if ($id > 0) } $morehtmlref .= ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index bffa95172d9..8b4d7937d52 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -44,7 +44,7 @@ llxHeader("", $title, $help_url); $head = loan_prepare_head($object); dol_fiche_head($head, 'FinancialCommitment', $langs->trans("Loan"), -1, 'bill'); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; // Ref loan diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index c169c22f0a9..ea5b6d45bc1 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -371,7 +371,7 @@ else print $formconfirm; // Warehouse card - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref='
'; $morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu; diff --git a/htdocs/product/stock/info.php b/htdocs/product/stock/info.php index 692fe17a83d..463e39a49d1 100644 --- a/htdocs/product/stock/info.php +++ b/htdocs/product/stock/info.php @@ -53,7 +53,7 @@ $head = stock_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("Warehouse"), -1, 'stock'); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''.$langs->trans("BackToList").''; $morehtmlref='
'; $morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu; diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php index 9d10e08be9a..d577cf56b22 100644 --- a/htdocs/product/stock/movement_card.php +++ b/htdocs/product/stock/movement_card.php @@ -560,7 +560,7 @@ if ($resql) dol_fiche_head($head, 'movements', $langs->trans("Warehouse"), -1, 'stock'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; $morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu; diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 09273ee947d..e6742cdc78b 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -542,7 +542,7 @@ if ($resql) dol_fiche_head($head, 'movements', $langs->trans("Warehouse"), -1, 'stock'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref='
'; $morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu; diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php index 45e3345e51c..d59f9b55996 100644 --- a/htdocs/reception/contact.php +++ b/htdocs/reception/contact.php @@ -162,7 +162,7 @@ if ($id > 0 || !empty($ref)) // Reception card - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; // Ref customer reception diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php index 472b0255f5b..838128b871e 100644 --- a/htdocs/reception/note.php +++ b/htdocs/reception/note.php @@ -102,7 +102,7 @@ if ($id > 0 || ! empty($ref)) // Reception card - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref='
'; // Ref customer reception diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 23a7c30f77e..79255f268e3 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1613,7 +1613,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) { dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"), -1, 'company'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; 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 = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; 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 = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; 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 = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 3d91fac7c29..5b383f30e28 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -185,7 +185,7 @@ $head = societe_prepare_head($object); dol_fiche_head($head, 'price', $langs->trans("ThirdParty"), -1, 'company'); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index ef987c84d86..0ea892eca8e 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -765,7 +765,7 @@ $menus[$r++]=array('title'=>'< print ''."\n"; print '
'; - print ' '; + print ' '; print ''.img_picto('', 'searchclear').''; print '
'; ?> diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 9b24a8b68c6..24423f85d46 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -692,7 +692,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd */ print '
'.$langs->trans("RefSending").'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print '
'.$langs->trans('Ref').''; @@ -820,7 +820,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd $morehtmlref .= ''; - $linkback = ''.$langs->trans("BackToList").' '; + $linkback = ''.$langs->trans("BackToList").' '; dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', 'ref', $morehtmlref); diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 3c0b8423096..188a6b59d31 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -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 = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index bbf3674ed18..387d227d6b4 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -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"; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 22a06e352c8..dba57f3954b 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -329,7 +329,7 @@ else { dol_fiche_head($head, 'guisetup', $title, -1, 'user'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);