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

Add recurring invoices button to the client portal dashboard

This commit is contained in:
Hillel Coren 2017-12-03 15:16:09 +02:00
parent f34f3e18b1
commit f773a5df13
5 changed files with 26 additions and 14 deletions

View File

@ -494,6 +494,7 @@ class AccountController extends BaseController
'account' => Auth::user()->account,
'title' => trans('texts.tax_rates'),
'taxRates' => TaxRate::scope()->whereIsInclusive(false)->get(),
'countInvoices' => Invoice::scope()->withTrashed()->count(),
];
return View::make('accounts.tax_rates', $data);

View File

@ -35,11 +35,12 @@
->label(' ')
->value(1) !!}
{!! Former::checkbox('inclusive_taxes')
->text(trans('texts.inclusive_taxes_help'))
->label(' ')
->value(1) !!}
@if ($account->inclusive_taxes || $countInvoices <= 10)
{!! Former::checkbox('inclusive_taxes')
->text(trans('texts.inclusive_taxes_help'))
->label('&nbsp;')
->value(1) !!}
@endif
{!! Former::checkbox('include_item_taxes_inline')
->text(trans('texts.include_item_taxes_inline'))
@ -84,7 +85,7 @@
<script type="text/javascript">
$(function() {
@if (App\Models\Invoice::scope()->withTrashed()->count())
@if ($countInvoices > 0)
$('#inclusive_taxes').change(function() {
swal("{{ trans('texts.inclusive_taxes_warning') }}");
})

View File

@ -341,13 +341,20 @@
</div>
</div>
@if (!empty($account->getTokenGatewayId()))
<div class="row">
<div class="col-xs-12">
@include('payments.paymentmethods_list')
</div>
<div class="row">
<div class="col-xs-12">
@if (!empty($account->getTokenGatewayId()))
<div class="pull-left">
@include('payments.paymentmethods_list')
</div>
@endif
@if ($client->hasRecurringInvoices())
<div class="pull-right">
{!! Button::primary(trans("texts.recurring_invoices"))->asLinkTo(URL::to('/client/invoices/recurring')) !!}
</div>
@endif
</div>
</div>
@endif
<div class="row" id="account-row">
<div class="col-md-2 invoices-from">

View File

@ -78,8 +78,10 @@
@endif
@if ($invitationKey = $client->firstInvitationKey())
<h3>
{{ trans('texts.payment_methods') }}
<h3 style="margin-top:0px;">
<span style="padding-top:4px">
{{ trans('texts.payment_methods') }}
</span>
@if ($account->getGatewayByType(GATEWAY_TYPE_CREDIT_CARD)
&& $account->getGatewayByType(GATEWAY_TYPE_TOKEN)
&& $account->token_billing_type_id != TOKEN_BILLING_DISABLED)

View File

@ -48,6 +48,7 @@
{!! Button::primary(trans("texts.recurring_invoices"))->asLinkTo(URL::to('/client/invoices/recurring')) !!}
</div>
@endif
<h3>{{ $title }}</h3>
{!! Datatable::table()