mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 10:10:57 -04:00
Prevent expense or task invoice item from creating a product
This commit is contained in:
parent
986487b4c9
commit
243005b667
@ -539,7 +539,7 @@ class InvoiceRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($productKey = trim($item['product_key'])) {
|
if ($productKey = trim($item['product_key'])) {
|
||||||
if (\Auth::user()->account->update_products && ! strtotime($productKey)) {
|
if (\Auth::user()->account->update_products && ! strtotime($productKey) && ! $task && ! $expense) {
|
||||||
$product = Product::findProductByKey($productKey);
|
$product = Product::findProductByKey($productKey);
|
||||||
if (!$product) {
|
if (!$product) {
|
||||||
if (Auth::user()->can('create', ENTITY_PRODUCT)) {
|
if (Auth::user()->can('create', ENTITY_PRODUCT)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user