mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for tests
This commit is contained in:
parent
edd0a57b29
commit
1ec4773ad3
@ -100,7 +100,7 @@ class ProductTest extends TestCase
|
||||
|
||||
foreach ($line_items as $key => $item) {
|
||||
|
||||
if($item?->product_cost == 0 && $product = Product::where('company_id', $invoice->company_id)->where('product_key', $item->product_key)->where('cost', '>', 0)->first()) {
|
||||
if(property_exists($item, 'product_cost') && $item->product_cost == 0 && $product = Product::where('company_id', $invoice->company_id)->where('product_key', $item->product_key)->where('cost', '>', 0)->first()) {
|
||||
$line_items[$key]->product_cost = $product->cost;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user