mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Bug fixes
This commit is contained in:
parent
dc8bd36e76
commit
d1166d415b
@ -39,7 +39,7 @@ class Mailer
|
||||
|
||||
return true;
|
||||
} catch (Exception $exception) {
|
||||
if (method_exists($exception, 'getResponse')) {
|
||||
if (isset($_ENV['POSTMARK_API_TOKEN'])) {
|
||||
$response = $exception->getResponse()->getBody()->getContents();
|
||||
$response = json_decode($response);
|
||||
return nl2br($response->Message);
|
||||
|
@ -410,17 +410,16 @@ class InvoiceRepository
|
||||
} else if ($item['product_key'] && !$invoice->has_tasks) {
|
||||
$product = Product::findProductByKey(trim($item['product_key']));
|
||||
|
||||
if (!$product) {
|
||||
$product = Product::createNew();
|
||||
$product->product_key = trim($item['product_key']);
|
||||
}
|
||||
|
||||
if (\Auth::user()->account->update_products) {
|
||||
if (!$product) {
|
||||
$product = Product::createNew();
|
||||
$product->product_key = trim($item['product_key']);
|
||||
}
|
||||
|
||||
$product->notes = $item['notes'];
|
||||
$product->cost = $item['cost'];
|
||||
$product->save();
|
||||
}
|
||||
|
||||
$product->save();
|
||||
}
|
||||
|
||||
$invoiceItem = InvoiceItem::createNew();
|
||||
|
Loading…
x
Reference in New Issue
Block a user