Fix validate invoice_items on PHP v7.1
This commit is contained in:
parent
bb9fc4dfa4
commit
2c54bbfdf0
1 changed files with 2 additions and 2 deletions
|
|
@ -204,8 +204,8 @@ class AppServiceProvider extends ServiceProvider
|
|||
Validator::extend('valid_invoice_items', function ($attribute, $value, $parameters) {
|
||||
$total = 0;
|
||||
foreach ($value as $item) {
|
||||
$qty = ! empty($item['qty']) ? $item['qty'] : 1;
|
||||
$cost = ! empty($item['cost']) ? $item['cost'] : 1;
|
||||
$qty = ! empty($item['qty']) ? Utils::parseFloat($item['qty']) : 1;
|
||||
$cost = ! empty($item['cost']) ? Utils::parseFloat($item['cost']) : 1;
|
||||
$total += $qty * $cost;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue