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

Conflicts:
	htdocs/fourn/commande/index.php
	htdocs/takepos/takepos.php
This commit is contained in:
Laurent Destailleur 2020-03-23 15:38:10 +01:00
commit 01e60562b9
5 changed files with 86 additions and 79 deletions

View File

@ -2,7 +2,7 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl # \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps) # \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \author (c)2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> # \author (c)2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
# #
# This is list of constant you can set to have generated packages moved into a specific dir: # This is list of constant you can set to have generated packages moved into a specific dir:
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild' #DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
@ -430,12 +430,14 @@ if ($nboftargetok) {
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`; $ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
print 'Run git push -f --tags'."\n"; print 'Run git push -f --tags'."\n";
$ret=`git push -f --tags`; $ret=`git push -f --tags`;
#$ret=`git push -f origin "$MAJOR.$MINOR.$BUILD"`;
} }
} }
else else
{ {
print 'Run git push --tags'."\n"; print 'Run git push --tags'."\n";
$ret=`git push --tags`; $ret=`git push --tags`;
#$ret=`git push origin "$MAJOR.$MINOR.$BUILD"`;
} }
chdir("$olddir"); chdir("$olddir");
} }

View File

@ -992,7 +992,7 @@ else
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=settodraft&amp;id='.$object->id.'">'.$langs->trans("SetToDraft").'</a>'; print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=settodraft&amp;id='.$object->id.'">'.$langs->trans("SetToDraft").'</a>';
} }
if (($object->statut == 0 || $object->statut == 1) && $user->rights->mailing->creer) if (($object->statut == 0 || $object->statut == 1 || $object->statut == 2) && $user->rights->mailing->creer)
{ {
if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_MAILING)) if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_MAILING))
{ {

View File

@ -1318,6 +1318,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
} }
$sortfield_new = implode(',', $sortfield_new_list); $sortfield_new = implode(',', $sortfield_new_list);
$sql = '';
if (!empty($conf->agenda->enabled)) if (!empty($conf->agenda->enabled))
{ {
// Recherche histo sur actioncomm // Recherche histo sur actioncomm
@ -1469,6 +1471,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
} }
//TODO Add limit in nb of results //TODO Add limit in nb of results
if ($sql)
{
$sql .= $db->order($sortfield_new, $sortorder); $sql .= $db->order($sortfield_new, $sortorder);
dol_syslog("company.lib::show_actions_done", LOG_DEBUG); dol_syslog("company.lib::show_actions_done", LOG_DEBUG);
$resql = $db->query($sql); $resql = $db->query($sql);
@ -1549,6 +1553,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
{ {
dol_print_error($db); dol_print_error($db);
} }
}
if (!empty($conf->agenda->enabled) || (!empty($conf->mailing->enabled) && !empty($objcon->email))) if (!empty($conf->agenda->enabled) || (!empty($conf->mailing->enabled) && !empty($objcon->email)))
{ {
@ -1782,9 +1787,9 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
} }
$out .= "</table>\n"; $out .= "</table>\n";
$out .= "</div>\n"; $out .= "</div>\n";
}
$out .= '</form>'; $out .= '</form>';
}
if ($noprint) return $out; if ($noprint) return $out;
else print $out; else print $out;

View File

@ -81,7 +81,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE cf.fk_soc = s.rowid"; $sql .= " WHERE cf.fk_soc = s.rowid";
$sql .= " AND cf.entity = ".$conf->entity; $sql .= " AND cf.entity IN (".getEntity('supplier_order').")";
if ($user->socid) $sql .= ' AND cf.fk_soc = '.$user->socid; if ($user->socid) $sql .= ' AND cf.fk_soc = '.$user->socid;
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
$sql .= " GROUP BY cf.fk_statut"; $sql .= " GROUP BY cf.fk_statut";
@ -267,7 +267,7 @@ if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_T
} }
else else
{ {
$sql .= " WHERE (u.entity IN (".getEntity('user').")"; $sql .= " WHERE (u.entity IN (".getEntity('user')."))";
} }
$sql .= " AND u.fk_soc IS NULL"; // An external user can not approved $sql .= " AND u.fk_soc IS NULL"; // An external user can not approved

View File

@ -5115,7 +5115,7 @@ function migrate_members_socialnetworks()
$obj->socialnetworks = '[]'; $obj->socialnetworks = '[]';
} }
$socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true)); $socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true));
$sqlupd = 'UPDATE '.MAIN_DB_PREFIX.'adherent SET socialnetworks="'.$db->escape(json_encode($socialnetworks, true)).'"'; $sqlupd = 'UPDATE '.MAIN_DB_PREFIX."adherent SET socialnetworks='".$db->escape(json_encode($socialnetworks, true))."'";
$sqlupd.= ', skype=null'; $sqlupd.= ', skype=null';
$sqlupd.= ', twitter=null'; $sqlupd.= ', twitter=null';
$sqlupd.= ', facebook=null'; $sqlupd.= ', facebook=null';
@ -5209,7 +5209,7 @@ function migrate_contacts_socialnetworks()
$obj->socialnetworks = '[]'; $obj->socialnetworks = '[]';
} }
$socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true)); $socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true));
$sqlupd = 'UPDATE '.MAIN_DB_PREFIX.'socpeople SET socialnetworks="'.$db->escape(json_encode($socialnetworks, true)).'"'; $sqlupd = 'UPDATE '.MAIN_DB_PREFIX."socpeople SET socialnetworks='".$db->escape(json_encode($socialnetworks, true))."'";
$sqlupd.= ', jabberid=null'; $sqlupd.= ', jabberid=null';
$sqlupd.= ', skype=null'; $sqlupd.= ', skype=null';
$sqlupd.= ', twitter=null'; $sqlupd.= ', twitter=null';
@ -5300,7 +5300,7 @@ function migrate_thirdparties_socialnetworks()
$obj->socialnetworks = '[]'; $obj->socialnetworks = '[]';
} }
$socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true)); $socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true));
$sqlupd = 'UPDATE '.MAIN_DB_PREFIX.'societe SET socialnetworks="'.$db->escape(json_encode($socialnetworks, true)).'"'; $sqlupd = 'UPDATE '.MAIN_DB_PREFIX."societe SET socialnetworks='".$db->escape(json_encode($socialnetworks, true))."'";
$sqlupd.= ', skype=null'; $sqlupd.= ', skype=null';
$sqlupd.= ', twitter=null'; $sqlupd.= ', twitter=null';
$sqlupd.= ', facebook=null'; $sqlupd.= ', facebook=null';