1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Working on gateway fees

This commit is contained in:
Hillel Coren 2017-03-15 20:10:40 +02:00
parent d83f5d2633
commit f9b8603d09
3 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,7 @@
namespace App\Models\Traits;
use App\Models\GatewayType;
use App\Models\InvoiceItem;
use App\Models\AccountGatewaySettings;
@ -87,7 +88,7 @@ trait ChargesFees
$item = $item ?: InvoiceItem::createNew($this);
$item->invoice_item_type_id = INVOICE_ITEM_TYPE_GATEWAY_FEE;
$item->product_key = trans('texts.fee');
$item->notes = '';
$item->notes = trans('texts.' . GatewayType::getAliasFromId($gatewayTypeId));
$item->cost = $feePreTax;
$item->qty = 1;
$item->tax_rate1 = $settings->fee_tax_rate1;

View File

@ -2407,6 +2407,7 @@ $LANG = array(
'fees_tax_help' => 'Enable line item taxes to set fee tax rates.',
'fees_sample' => 'The fee for a :amount invoice would be :total.',
'no_fees' => 'No Fees',
'gateway_fees_disclaimer' => 'Warning: not all payment gateways allow adding fees, please review their terms of service.',
);

View File

@ -159,6 +159,8 @@
<br/><div id="feeSample" class="help-block"></div>
<br/><b>{{ trans('texts.gateway_fees_disclaimer') }}</b>
@if (!$account->invoice_item_taxes && $account->invoice_taxes && count($taxRates))
<br/><div class="help-block">{{ trans('texts.fees_tax_help') }}</div>
@endif