Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
This commit is contained in:
commit
c0689b3884
@ -197,7 +197,7 @@ $sql .= " AND f.fk_statut > 0";
|
|||||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
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.")";
|
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
|
||||||
} else {
|
} 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
|
// Add search filter like
|
||||||
if ($search_societe) {
|
if ($search_societe) {
|
||||||
|
|||||||
@ -374,6 +374,9 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
|||||||
} elseif ($feature == 'salaries')
|
} elseif ($feature == 'salaries')
|
||||||
{
|
{
|
||||||
if (!$user->rights->salaries->delete) $deleteok = 0;
|
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
|
} elseif (!empty($feature2)) // This is for permissions on 2 levels
|
||||||
{
|
{
|
||||||
foreach ($feature2 as $subfeature)
|
foreach ($feature2 as $subfeature)
|
||||||
|
|||||||
@ -335,6 +335,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
|
|||||||
if ($type == 1) $sql .= " WHERE code_fournisseur = '".$db->escape($code)."'";
|
if ($type == 1) $sql .= " WHERE code_fournisseur = '".$db->escape($code)."'";
|
||||||
else $sql .= " WHERE code_client = '".$db->escape($code)."'";
|
else $sql .= " WHERE code_client = '".$db->escape($code)."'";
|
||||||
if ($soc->id > 0) $sql .= " AND rowid <> ".$soc->id;
|
if ($soc->id > 0) $sql .= " AND rowid <> ".$soc->id;
|
||||||
|
$sql .= " AND entity IN (".getEntity('societe').")";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user