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-16 22:58:31 +02:00
parent be6c9035aa
commit fb09a38efa
3 changed files with 4 additions and 11 deletions

View File

@ -855,9 +855,7 @@ class BasePaymentDriver
$label = trans('texts.payment_type_on_file', ['type' => $paymentMethod->payment_type->name]);
}
if ($fee = $this->invoice()->present()->gatewayFee($paymentMethod->payment_type->gateway_type_id)) {
$label .= ' - ' . $fee;
}
$label .= $this->invoice()->present()->gatewayFee($paymentMethod->payment_type->gateway_type_id);
$links[] = [
'url' => $url,
@ -891,9 +889,7 @@ class BasePaymentDriver
$label = trans("texts.{$gatewayTypeAlias}");
}
if ($fee = $this->invoice()->present()->gatewayFee($gatewayTypeId)) {
$label .= ' - ' . $fee;
}
$label .= $this->invoice()->present()->gatewayFee($gatewayTypeId);
$links[] = [
'gatewayTypeId' => $gatewayTypeId,

View File

@ -277,6 +277,6 @@ class InvoicePresenter extends EntityPresenter
$label = trans('texts.fee');
}
return $fee . ' ' . $label;
return ' - ' . $fee . ' ' . $label;
}
}

View File

@ -123,10 +123,7 @@
@if (count($paymentTypes) > 1)
{!! DropdownButton::success(trans('texts.pay_now'))->withContents($paymentTypes)->large() !!}
@elseif (count($paymentTypes) == 1)
<a href='{!! $paymentURL !!}' class="btn btn-success btn-lg">{{ trans('texts.pay_now') }}</a>
@if ($fee = $invoice->present()->gatewayFee($gatewayTypeId))
<div class="help-block">{{ $fee }}</div>
@endif
<a href='{!! $paymentURL !!}' class="btn btn-success btn-lg">{{ trans('texts.pay_now') }} {{ $invoice->present()->gatewayFee($gatewayTypeId) }}</a>
@endif
@else
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}