Bug correction in Invoices class
There was an error in Invoices class, leading to an undefined result if the user was not in the invoice.
This commit is contained in:
parent
9535c47810
commit
38e8bcc766
@ -97,7 +97,7 @@
|
||||
}
|
||||
|
||||
// Amount is stored in cents
|
||||
return round($this->amount / 100 / (count($users_in) + $guests) * (1 + $users_in[(int) $id]), 2); // Note : $users_in[(int) $id] is the number of guests for user $id
|
||||
return (isset($users_in[(int) $id])) ? round($this->amount / 100 / (count($users_in) + $guests) * (1 + $users_in[(int) $id]), 2) : 0; // Note : $users_in[(int) $id] is the number of guests for user $id
|
||||
}
|
||||
|
||||
// Maps htmlspecialchars on the class before display
|
||||
|
Loading…
Reference in New Issue
Block a user