mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 20:24:30 -04:00
Fix for tests
This commit is contained in:
parent
d2cf9b2fbe
commit
7beb6a7f34
@ -191,8 +191,8 @@ class AppServiceProvider extends ServiceProvider
|
||||
Validator::extend('valid_invoice_items', function($attribute, $value, $parameters) {
|
||||
$total = 0;
|
||||
foreach ($value as $item) {
|
||||
$qty = isset($item['qty']) ? $item['qty'] : 1;
|
||||
$cost = isset($item['cost']) ? $item['cost'] : 1;
|
||||
$qty = !empty($item['qty']) ? $item['qty'] : 1;
|
||||
$cost = !empty($item['cost']) ? $item['cost'] : 1;
|
||||
$total += $qty * $cost;
|
||||
}
|
||||
return $total <= MAX_INVOICE_AMOUNT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user