Fix double display of create credit note button

Before: Display of the "Create credit note" button twice for standard invoices when situation invoices are activated.
After: Displays a single button "Create a credit note"
This commit is contained in:
Pierre Ardoin 2020-01-19 19:10:10 +01:00 committed by GitHub
parent 041d5aeb46
commit e4eb8883fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4829,6 +4829,7 @@ elseif ($id > 0 || ! empty($ref))
// For situation invoice with excess received
if ($object->statut > Facture::STATUS_DRAFT
&& $object->type == Facture::TYPE_SITUATION
&& ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) > 0
&& $usercancreate
&& !$objectidnext