Merge remote-tracking branch 'Dolibarr/11.0' into 11
This commit is contained in:
commit
a05ea83c5c
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Oscss-Shop <support@oscss-shop.fr>.
|
||||
* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modifyion 2.0 (the "License");
|
||||
* it under the terms of the GNU General Public License as published bypliance with the License.
|
||||
@ -17,6 +18,9 @@
|
||||
*/
|
||||
|
||||
if (!defined('REQUIRE_JQUERY_BLOCKUI')) define('REQUIRE_JQUERY_BLOCKUI', 1);
|
||||
if (!defined('NOTOKENRENEWAL')) {
|
||||
define('NOTOKENRENEWAL', 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2015-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
@ -581,7 +581,7 @@ if ($object->id > 0)
|
||||
$boxstat .= '<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="border boxtable boxtablenobottom boxtablenotop" width="100%">';
|
||||
$boxstat .= '<tr class="impair"><td colspan="2" class="tdboxstats nohover">';
|
||||
|
||||
if (!empty($conf->propal->enabled))
|
||||
if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
// Box proposals
|
||||
$tmp = $object->getOutstandingProposals();
|
||||
@ -599,7 +599,7 @@ if ($object->id > 0)
|
||||
if ($link) $boxstat .= '</a>';
|
||||
}
|
||||
|
||||
if (!empty($conf->commande->enabled))
|
||||
if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
// Box commandes
|
||||
$tmp = $object->getOutstandingOrders();
|
||||
@ -617,7 +617,7 @@ if ($object->id > 0)
|
||||
if ($link) $boxstat .= '</a>';
|
||||
}
|
||||
|
||||
if (!empty($conf->facture->enabled))
|
||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
// Box factures
|
||||
$tmp = $object->getOutstandingBills();
|
||||
|
||||
@ -157,6 +157,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
$limit = 10;
|
||||
$sql = "SELECT m.rowid, m.titre, m.nbemail, m.statut, m.date_creat";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."mailing as m";
|
||||
$sql .= " WHERE m.entity = ".$conf->entity;
|
||||
$sql .= " ORDER BY m.date_creat DESC";
|
||||
$sql .= " LIMIT ".$limit;
|
||||
$result = $db->query($sql);
|
||||
|
||||
@ -468,7 +468,7 @@ if ($resql)
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail = "SendPropalRef";
|
||||
$modelmail = "proposal_send";
|
||||
$modelmail = "propal_send";
|
||||
$objecttmp = new Propal($db);
|
||||
$trackid = 'pro'.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
|
||||
@ -5196,7 +5196,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
{
|
||||
if (!$objectidnext)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&fac_avoir='.$object->id.'&action=create&type=2'.($object->fk_project > 0 ? '&projectid='.$object->fk_project : '').''.$object->id.'&action=create&type=2'.($object->entity > 0 ? '&originentity='.$object->entity : '').'">'.$langs->trans("CreateCreditNote").'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&fac_avoir='.$object->id.'&action=create&type=2'.($object->fk_project > 0 ? '&projectid='.$object->fk_project : '').''.($object->entity > 0 ? '&originentity='.$object->entity : '').'">'.$langs->trans("CreateCreditNote").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2759,7 +2759,7 @@ class Form
|
||||
}
|
||||
if (!empty($conf->barcode->enabled)) $sql .= ", pfp.barcode";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON ( p.rowid = pfp.fk_product AND pfp.entity IN (".getEntity('product').") )";
|
||||
if ($socid) $sql .= " AND pfp.fk_soc = ".$socid;
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid";
|
||||
// Units
|
||||
|
||||
@ -3623,10 +3623,9 @@ function migrate_mode_reglement($db, $langs, $conf)
|
||||
* @param DoliDB $db Database handler
|
||||
* @param Translate $langs Object langs
|
||||
* @param Conf $conf Object conf
|
||||
* @param string $versionto Version target
|
||||
* @return void
|
||||
*/
|
||||
function migrate_clean_association($db, $langs, $conf, $versionto)
|
||||
function migrate_clean_association($db, $langs, $conf)
|
||||
{
|
||||
$result = $db->DDLDescTable(MAIN_DB_PREFIX."categorie_association");
|
||||
if ($result) // result defined for version 3.2 or -
|
||||
|
||||
@ -2002,7 +2002,7 @@ function top_menu_search()
|
||||
|
||||
$defaultAction = '';
|
||||
$buttonList = '<div class="dropdown-global-search-button-list" >';
|
||||
// Menu with all bookmarks
|
||||
// Menu with all searchable items
|
||||
foreach ($arrayresult as $keyItem => $item)
|
||||
{
|
||||
if (empty($defaultAction)) {
|
||||
@ -2017,9 +2017,7 @@ function top_menu_search()
|
||||
|
||||
$searchInput = '<input name="sall" id="top-global-search-input" class="dropdown-search-input" placeholder="'.$langs->trans('Search').'" autocomplete="off" >';
|
||||
|
||||
|
||||
$dropDownHtml = '<!-- form with POST method by default, will be replaced with GET for external link by js -->'."\n";
|
||||
$dropDownHtml .= '<form id="top-menu-action-bookmark" name="actionbookmark" method="POST" action="'.$defaultAction.'" >';
|
||||
$dropDownHtml = '<form id="top-menu-action-search" name="actionsearch" method="GET" action="'.$defaultAction.'" >';
|
||||
|
||||
$dropDownHtml .= '
|
||||
<!-- search input -->
|
||||
@ -2068,8 +2066,8 @@ function top_menu_search()
|
||||
|
||||
// submit form action
|
||||
$(".dropdown-global-search-button-list .global-search-item").on("click", function(event) {
|
||||
$("#top-menu-action-bookmark").attr("action", $(this).data("target"));
|
||||
$("#top-menu-action-bookmark").submit();
|
||||
$("#top-menu-action-search").attr("action", $(this).data("target"));
|
||||
$("#top-menu-action-search").submit();
|
||||
});
|
||||
|
||||
// close drop down
|
||||
|
||||
Loading…
Reference in New Issue
Block a user