diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 961d133e88e432d232f55055e812b64dc5a098fe..c421bb7f41a1e3bb4f4a593fd73bdf2058a3fda2 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3925,7 +3925,7 @@ else if ($id > 0 || ! empty($ref)) || ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id)) || ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id))) && ($object->statut == 2 || $object->statut == 3 || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data - && $user->rights->facture->creer) // A paid invoice (partially or completely) + && $user->rights->facture->reopen) // A paid invoice (partially or completely) { if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice { diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index d15215a4f99003c472213e180d669e0648b5a065..fd0832f9c9d1334adeba99ec34570e1c7fcd2dec 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -183,6 +183,13 @@ class modFacture extends DolibarrModules $this->rights[$r][4] = 'facture'; $this->rights[$r][5] = 'export'; + $r++; + $this->rights[$r][0] = 1322; + $this->rights[$r][1] = 'Rouvrir une facture totalement réglée'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'reopen'; + // Exports //-------- diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 0ab14c4218b2d1742598fadcdcc4e39950827387..f06c59852209794c9a0f488aa05f44b7651903e8 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -751,6 +751,7 @@ Permission1236=Export supplier invoices, attributes and payments Permission1237=Export supplier orders and their details Permission1251=Run mass imports of external data into database (data load) Permission1321=Export customer invoices, attributes and payments +Permission1322=Reopen a paid bill Permission1421=Export customer orders and attributes Permission20001=Read leave requests (yours and your subordinates) Permission20002=Create/modify your leave requests