Update card.php

This commit is contained in:
Laurent Destailleur 2018-07-24 17:49:10 +02:00 committed by GitHub
parent 0c01f6e139
commit 869a97c8d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4730,7 +4730,7 @@ else if ($id > 0 || ! empty($ref))
}
// For situation invoice with excess received
if ($object->statut > 0
if ($object->statut > Facture::STATUS_DRAFT
&& ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) > 0
&& $user->rights->facture->creer
&& !$objectidnext
@ -4748,7 +4748,7 @@ else if ($id > 0 || ! empty($ref))
}
// remove situation from cycle
if ($object->statut > 0
if ($object->statut > Facture::STATUS_DRAFT
&& $object->type == Facture::TYPE_SITUATION
&& $user->rights->facture->creer
&& !$objectidnext