Merge pull request #9128 from atm-john/fix_situation_invoice_status

Fix situation invoice status
This commit is contained in:
Laurent Destailleur 2018-07-24 17:49:53 +02:00 committed by GitHub
commit ece655a84a
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 == Facture::STATUS_VALIDATED
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 == Facture::STATUS_VALIDATED
if ($object->statut > Facture::STATUS_DRAFT
&& $object->type == Facture::TYPE_SITUATION
&& $user->rights->facture->creer
&& !$objectidnext