diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index f3535de1d66..111ae3a6a40 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -676,9 +676,11 @@ if (empty($reshook)) { } if (!$error) { - $newremaintopay = $object->getRemainToPay(0); - if ($newremaintopay == 0) { - $object->setPaid($user); + if ($object->status == Facture::STATUS_VALIDATED) { + $newremaintopay = $object->getRemainToPay(0); + if ($newremaintopay == 0) { + $object->setPaid($user); + } } } }