1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Hide fee on custom gateway

This commit is contained in:
Hillel Coren 2017-03-24 16:28:31 +03:00
parent d208e54a24
commit 7bb6a7945a
3 changed files with 17 additions and 6 deletions

View File

@ -192,9 +192,6 @@ class AccountGatewayDatatable extends EntityDatatable
$actions[] = [
trans('texts.set_limits_fees', ['gateway_type' => $gatewayType->name]),
function () use ($gatewayType) {
//$accountGatewaySettings = $this->getAccountGatewaySetting($gatewayType->id);
//$min = $accountGatewaySettings && $accountGatewaySettings->min_limit !== null ? $accountGatewaySettings->min_limit : 'null';
//$max = $accountGatewaySettings && $accountGatewaySettings->max_limit !== null ? $accountGatewaySettings->max_limit : 'null';
return "javascript:showLimitsModal('{$gatewayType->name}', {$gatewayType->id})";
},
function ($model) use ($gatewayType) {

View File

@ -2436,6 +2436,7 @@ $LANG = array(
'auto_bill_failed' => 'Auto-billing for invoice :invoice_number failed',
'online_payment_discount' => 'Online Payment Discount',
'created_new_company' => 'Successfully created new company',
'fees_disabled_for_gateway' => 'Fees are disabled for this gateway.',
);

View File

@ -134,7 +134,12 @@
</div>
</div>
<div role="tabpanel" class="tab-pane" id="fees">
<div class="panel-body">
<div id="feesDisabled" class="panel-body" style="display:none">
<div class="help-block">
{{ trans('texts.fees_disabled_for_gateway') }}
</div>
</div>
<div id="feesEnabled" class="panel-body">
{!! Former::text('fee_amount')
->label('amount')
@ -262,13 +267,21 @@
setTaxRate(2, '', '');
}
$('#paymentLimitsModal').modal('show');
updateFeeSample();
@if ($account->gateway_fee_location == FEE_LOCATION_ITEM)
$('#taxDiv').show();
@endif
if (gateway_type_id == {{ GATEWAY_TYPE_CUSTOM }}) {
$('#feesEnabled').hide();
$('#feesDisabled').show();
} else {
$('#feesDisabled').hide();
$('#feesEnabled').show();
}
$('#paymentLimitsModal').modal('show');
}
var limitsSlider = document.getElementById('payment-limits-slider');