refs #412
This commit is contained in:
parent
9a2adf777c
commit
80901078ea
@ -601,6 +601,16 @@ class Bills extends Controller
|
||||
$total_amount -= $bill->payments()->paid();
|
||||
}
|
||||
|
||||
// For amount cover integer
|
||||
$multiplier = 1;
|
||||
|
||||
for ($i = 0; $i < $currency->precision; $i++) {
|
||||
$multiplier *= 10;
|
||||
}
|
||||
|
||||
$amount *= $multiplier;
|
||||
$total_amount *= $multiplier;
|
||||
|
||||
if ($amount > $total_amount) {
|
||||
$message = trans('messages.error.over_payment');
|
||||
|
||||
|
@ -738,6 +738,16 @@ class Invoices extends Controller
|
||||
$total_amount -= $invoice->payments()->paid();
|
||||
}
|
||||
|
||||
// For amount cover integer
|
||||
$multiplier = 1;
|
||||
|
||||
for ($i = 0; $i < $currency->precision; $i++) {
|
||||
$multiplier *= 10;
|
||||
}
|
||||
|
||||
$amount *= $multiplier;
|
||||
$total_amount *= $multiplier;
|
||||
|
||||
if ($amount > $total_amount) {
|
||||
$message = trans('messages.error.over_payment');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user