mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Fix for gateway fees
This commit is contained in:
parent
b2e8457c3a
commit
0f63ea782f
@ -320,7 +320,7 @@ class InvoiceRepository extends BaseRepository
|
||||
public function save(array $data, Invoice $invoice = null)
|
||||
{
|
||||
/** @var Account $account */
|
||||
$account = \Auth::user()->account;
|
||||
$account = $invoice ? $invoice->account : \Auth::user()->account;
|
||||
$publicId = isset($data['public_id']) ? $data['public_id'] : false;
|
||||
|
||||
$isNew = ! $publicId || $publicId == '-1';
|
||||
@ -623,7 +623,7 @@ class InvoiceRepository extends BaseRepository
|
||||
}
|
||||
|
||||
if ($productKey = trim($item['product_key'])) {
|
||||
if (\Auth::user()->account->update_products
|
||||
if ($account->update_products
|
||||
&& ! $invoice->has_tasks
|
||||
&& ! $invoice->has_expenses
|
||||
&& $productKey != trans('texts.surcharge')
|
||||
|
Loading…
Reference in New Issue
Block a user