mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 06:14:31 -04:00
Fix for product import
This commit is contained in:
parent
5ceb2d9ab6
commit
bb38aaccb5
@ -3,6 +3,7 @@
|
|||||||
namespace App\Ninja\Repositories;
|
namespace App\Ninja\Repositories;
|
||||||
|
|
||||||
use App\Models\Product;
|
use App\Models\Product;
|
||||||
|
use Utils;
|
||||||
use DB;
|
use DB;
|
||||||
|
|
||||||
class ProductRepository extends BaseRepository
|
class ProductRepository extends BaseRepository
|
||||||
@ -64,6 +65,10 @@ class ProductRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
$product->fill($data);
|
$product->fill($data);
|
||||||
|
$product->product_key = isset($data['product_key']) ? trim($data['product_key']) : '';
|
||||||
|
$product->notes = isset($data['notes']) ? trim($data['notes']) : '';
|
||||||
|
$product->cost = isset($data['cost']) ? Utils::parseFloat($data['cost']) : 0;
|
||||||
|
$product->qty = isset($data['qty']) ? Utils::parseFloat($data['qty']) : 1;
|
||||||
$product->save();
|
$product->save();
|
||||||
|
|
||||||
return $product;
|
return $product;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user