diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 188670b619e630b47de49aee4494cc63472a3fa3..05c8866bab0d974e33a8df655fc7e09f6954b48e 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1099,7 +1099,7 @@ else if ($commande->statut == 1 || $commande->statut == 2) { - if ($user->rights->commande->creer) + if ($user->rights->commande->cloturer) { print '<a class="butAction" href="fiche.php?id='.$id.'&action=cloture">'.$langs->trans('Close').'</a>'; } @@ -1108,7 +1108,7 @@ else if ($commande->statut == 1) { $nb_expedition = $commande->nb_expedition(); - if ($user->rights->commande->valider && $nb_expedition == 0) + if ($user->rights->commande->annuler && $nb_expedition == 0) { print '<a class="butActionDelete" href="fiche.php?id='.$id.'&action=annuler">'.$langs->trans('CancelOrder').'</a>'; } diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php index 11ebc66f9bc684a4410eb33699091f831425a22d..8f2a0b158d0d345651e19027fd7fa57c5e13db68 100644 --- a/htdocs/includes/modules/modCommande.class.php +++ b/htdocs/includes/modules/modCommande.class.php @@ -101,28 +101,46 @@ class modCommande extends DolibarrModules $this->rights_class = 'commande'; $this->rights[1][0] = 81; - $this->rights[1][1] = 'Lire les commandes'; + $this->rights[1][1] = 'Lire les commandes clients'; $this->rights[1][2] = 'r'; $this->rights[1][3] = 1; $this->rights[1][4] = 'lire'; $this->rights[2][0] = 82; - $this->rights[2][1] = 'Cr�er modifier les commandes'; + $this->rights[2][1] = 'Cr�er modifier les commandes clients'; $this->rights[2][2] = 'w'; $this->rights[2][3] = 0; $this->rights[2][4] = 'creer'; $this->rights[3][0] = 84; - $this->rights[3][1] = 'Valider les commandes'; + $this->rights[3][1] = 'Valider les commandes clients'; $this->rights[3][2] = 'd'; $this->rights[3][3] = 0; $this->rights[3][4] = 'valider'; - - $this->rights[4][0] = 89; - $this->rights[4][1] = 'Supprimer les commandes'; + + $this->rights[4][0] = 86; + $this->rights[4][1] = 'Envoyer les commandes clients'; $this->rights[4][2] = 'd'; $this->rights[4][3] = 0; - $this->rights[4][4] = 'supprimer'; + $this->rights[4][4] = 'envoyer'; + + $this->rights[5][0] = 87; + $this->rights[5][1] = 'Cl�turer les commandes clients'; + $this->rights[5][2] = 'd'; + $this->rights[5][3] = 0; + $this->rights[5][4] = 'cloturer'; + + $this->rights[6][0] = 88; + $this->rights[6][1] = 'Annuler les commandes clients'; + $this->rights[6][2] = 'd'; + $this->rights[6][3] = 0; + $this->rights[6][4] = 'annuler'; + + $this->rights[7][0] = 89; + $this->rights[7][1] = 'Supprimer les commandes clients'; + $this->rights[7][2] = 'd'; + $this->rights[7][3] = 0; + $this->rights[7][4] = 'supprimer'; } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 350256958f80187c097365744540fe2746b14584..6e048909f244eb54d0d2fe8ae2f33a8ed3f3a0f2 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -168,7 +168,10 @@ Permission79=Create/modify subscriptions Permission81=Read customers orders Permission82=Create/modify customers orders Permission84=Validate customers orders -Permission89=Cancel customers orders +Permission86=Send customers orders +Permission87=Close customers orders +Permission88=Cancel customers orders +Permission89=Delete customers orders Permission91=Read charges and vat Permission92=Create/modify charges and vat Permission93=Delete charges and vat diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 431d104818f12731695fa7cb87b504f69a8e56fa..7118ca396f4883efc356804a0a8b232066bbb0ab 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -168,7 +168,10 @@ Permission79=Cr Permission81=Consulter les commandes clients Permission82=Cr�er/modifier les commandes clients Permission84=Valider les commandes clients -Permission89=Annuler les commandes clients +Permission86=Envoyer les commandes clients +Permission87=Cl�turer les commandes clients +Permission88=Annuler les commandes clients +Permission89=Supprimer les commandes clients Permission91=Consulter les charges et la TVA Permission92=Cr�er/modifier les charges et la TVA Permission93=Supprimer les charges et la TVA