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

This commit is contained in:
Laurent Destailleur 2021-05-11 20:18:43 +02:00
commit c0689b3884
3 changed files with 5 additions and 1 deletions

View File

@ -197,7 +197,7 @@ $sql .= " AND f.fk_statut > 0";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
} else {
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_STANDARD.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
}
// Add search filter like
if ($search_societe) {

View File

@ -374,6 +374,9 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
} elseif ($feature == 'salaries')
{
if (!$user->rights->salaries->delete) $deleteok = 0;
} elseif ($feature == 'payment_supplier')
{
if (!$user->rights->fournisseur->facture->creer) { $deleteok = 0; }
} elseif (!empty($feature2)) // This is for permissions on 2 levels
{
foreach ($feature2 as $subfeature)

View File

@ -335,6 +335,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
if ($type == 1) $sql .= " WHERE code_fournisseur = '".$db->escape($code)."'";
else $sql .= " WHERE code_client = '".$db->escape($code)."'";
if ($soc->id > 0) $sql .= " AND rowid <> ".$soc->id;
$sql .= " AND entity IN (".getEntity('societe').")";
$resql = $db->query($sql);
if ($resql)