mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-07 01:23:00 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -142,6 +142,10 @@ $usercancreateinvoice = ($user->hasRight('facture', 'creer') == 1);
|
||||
$usercancreatecontract = ($user->hasRight('contrat', 'creer') == 1);
|
||||
$usercancreateintervention = ($user->hasRight('ficheinter', 'creer') == 1);
|
||||
$usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer'));
|
||||
$usercanreopen = ((!getDolGlobalBool('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalBool('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('propal', 'propal_advance', 'reopen')));
|
||||
if (getDolGlobalBool('PROPAL_DISALLOW_REOPEN')) {
|
||||
$usercanreopen = false;
|
||||
}
|
||||
|
||||
$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
|
||||
@@ -830,7 +834,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'confirm_reopen' && $usercanclose && !GETPOST('cancel', 'alpha')) {
|
||||
} elseif ($action == 'confirm_reopen' && ((!getDolGlobalBool('MAIN_USE_ADVANCED_PERMS') && $usercanclose) || $usercanreopen) && !GETPOST('cancel', 'alpha')) {
|
||||
// Reopen proposal
|
||||
// prevent browser refresh from reopening proposal several times
|
||||
if ($object->status == Propal::STATUS_SIGNED || $object->status == Propal::STATUS_NOTSIGNED || $object->status == Propal::STATUS_BILLED || $object->status == Propal::STATUS_CANCELED) {
|
||||
@@ -3140,7 +3144,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// ReOpen
|
||||
if (((getDolGlobalString('PROPAL_REOPEN_UNSIGNED_ONLY') && $object->status == Propal::STATUS_NOTSIGNED) || (!getDolGlobalString('PROPAL_REOPEN_UNSIGNED_ONLY') && ($object->status == Propal::STATUS_SIGNED || $object->status == Propal::STATUS_NOTSIGNED || $object->status == Propal::STATUS_BILLED || $object->status == Propal::STATUS_CANCELED))) && $usercanclose) {
|
||||
if (((getDolGlobalString('PROPAL_REOPEN_UNSIGNED_ONLY') && $object->status == Propal::STATUS_NOTSIGNED) || (!getDolGlobalString('PROPAL_REOPEN_UNSIGNED_ONLY') && ($object->status == Propal::STATUS_SIGNED || $object->status == Propal::STATUS_NOTSIGNED || $object->status == Propal::STATUS_BILLED || $object->status == Propal::STATUS_CANCELED))) && ((!getDolGlobalBool('MAIN_USE_ADVANCED_PERMS') && $usercanclose) || $usercanreopen)) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#reopen').'"';
|
||||
print '>'.$langs->trans('ReOpen').'</a>';
|
||||
}
|
||||
|
||||
@@ -181,6 +181,13 @@ class modPropale extends DolibarrModules
|
||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par default
|
||||
$this->rights[$r][4] = 'export';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 29; // id de la permission
|
||||
$this->rights[$r][1] = 'Reopen commercial proposals'; // Set proposal to signed or refused
|
||||
$this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour)
|
||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par default
|
||||
$this->rights[$r][4] = 'propal_advance';
|
||||
$this->rights[$r][5] = 'reopen';
|
||||
|
||||
// Menus
|
||||
//-------
|
||||
|
||||
Reference in New Issue
Block a user