diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 469cbf44ca9..76f796f78b6 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -905,8 +905,8 @@ else */ print '
'; - if ($object->statut == Facture::STATUS_DRAFT) - { + //if ($object->statut == Facture::STATUS_DRAFT) // there is no draft status on templates. + //{ if ($user->rights->facture->creer) { if (empty($object->frequency) || $object->date_when <= $today) @@ -922,9 +922,10 @@ else { print '
'.$langs->trans("CreateBill").'
'; } - } + //} - if ($object->statut == Facture::STATUS_DRAFT && $user->rights->facture->supprimer) + //if ($object->statut == Facture::STATUS_DRAFT && $user->rights->facture->supprimer) + if ($user->rights->facture->supprimer) { print '
'.$langs->trans('Delete').'
'; } @@ -1014,7 +1015,7 @@ else print ''; if ($user->rights->facture->creer) { - if (empty($objp->frequency) || $objp->date_when <= $today) + if (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today) { print ''; print $langs->trans("CreateBill").'';