Fix : button convert was still available even if deposit was already converted

This commit is contained in:
Maxime Kohlhaas 2017-06-09 11:09:06 +02:00
parent 02781b41ca
commit 92b7914ef3

View File

@ -3938,6 +3938,9 @@ else if ($id > 0 || ! empty($ref))
}
}
$discount = new DiscountAbsolute($db);
$result = $discount->fetch(0, $object->id);
// Reopen a standard paid invoice
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))