mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Minor fixes
This commit is contained in:
parent
9c5944e2c4
commit
eb6cd45913
@ -78,9 +78,9 @@ class ClientController extends BaseController
|
||||
public function store(CreateClientRequest $request)
|
||||
{
|
||||
$client = $this->clientService->save($request->input());
|
||||
|
||||
|
||||
Session::flash('message', trans('texts.created_client'));
|
||||
|
||||
|
||||
return redirect()->to($client->getRoute());
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ class ClientController extends BaseController
|
||||
['label' => trans('texts.enter_credit'), 'url' => '/credits/create/'.$client->public_id],
|
||||
['label' => trans('texts.enter_expense'), 'url' => '/expenses/create/0/'.$client->public_id]
|
||||
);
|
||||
|
||||
|
||||
$data = array(
|
||||
'actionLinks' => $actionLinks,
|
||||
'showBreadcrumbs' => false,
|
||||
@ -132,7 +132,7 @@ class ClientController extends BaseController
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
if (Client::scope()->count() > Auth::user()->getMaxNumClients()) {
|
||||
if (Client::scope()->withTrashed()->count() > Auth::user()->getMaxNumClients()) {
|
||||
return View::make('error', ['hideHeader' => true, 'error' => "Sorry, you've exceeded the limit of ".Auth::user()->getMaxNumClients()." clients"]);
|
||||
}
|
||||
|
||||
@ -200,9 +200,9 @@ class ClientController extends BaseController
|
||||
public function update(UpdateClientRequest $request)
|
||||
{
|
||||
$client = $this->clientService->save($request->input());
|
||||
|
||||
|
||||
Session::flash('message', trans('texts.updated_client'));
|
||||
|
||||
|
||||
return redirect()->to($client->getRoute());
|
||||
}
|
||||
|
||||
|
@ -678,8 +678,9 @@ if (Utils::isNinjaDev()) {
|
||||
*/
|
||||
|
||||
/*
|
||||
if (Utils::isNinjaDev() && Auth::check() && Auth::user()->id === 1)
|
||||
if (Utils::isNinjaDev())
|
||||
{
|
||||
Auth::loginUsingId(1);
|
||||
//ini_set('memory_limit','1024M');
|
||||
//Auth::loginUsingId(1);
|
||||
}
|
||||
*/
|
@ -75,7 +75,7 @@ class SubscriptionListener
|
||||
{
|
||||
//$this->checkSubscriptions(ACTIVITY_TYPE_CREATE_VENDOR, $event->vendor);
|
||||
}
|
||||
|
||||
|
||||
public function createdExpense(ExpenseWasCreated $event)
|
||||
{
|
||||
//$this->checkSubscriptions(ACTIVITY_TYPE_CREATE_EXPENSE, $event->expense);
|
||||
@ -89,10 +89,15 @@ class SubscriptionListener
|
||||
$manager = new Manager();
|
||||
$manager->setSerializer(new ArraySerializer());
|
||||
$manager->parseIncludes($include);
|
||||
|
||||
|
||||
$resource = new Item($entity, $transformer, $entity->getEntityType());
|
||||
$data = $manager->createData($resource)->toArray();
|
||||
|
||||
|
||||
// For legacy Zapier support
|
||||
if (isset($data['client_id'])) {
|
||||
$data['client_name'] = $entity->client->getDisplayName();
|
||||
}
|
||||
|
||||
Utils::notifyZapier($subscription, $data);
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,8 @@ class CurrenciesSeeder extends Seeder
|
||||
['name' => 'Aruban Florin', 'code' => 'AWG', 'symbol' => 'Afl. ', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'],
|
||||
['name' => 'Turkish Lira', 'code' => 'TRY', 'symbol' => 'TL ', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','],
|
||||
['name' => 'Romanian New Leu', 'code' => 'RON', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['name' => 'Croatian', 'code' => 'HKR', 'symbol' => 'kn', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','],
|
||||
['name' => 'Croatian Kuna', 'code' => 'HKR', 'symbol' => 'kn', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','],
|
||||
['name' => 'Saudi Riyal', 'code' => 'SAR', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
];
|
||||
|
||||
foreach ($currencies as $currency) {
|
||||
|
@ -14,7 +14,21 @@
|
||||
// Disable the submit button to prevent repeated clicks
|
||||
$form.find('button').prop('disabled', true);
|
||||
|
||||
Stripe.card.createToken($form, stripeResponseHandler);
|
||||
var data = {
|
||||
name: $('#first_name').val() + ' ' + $('#last_name').val(),
|
||||
address_line1: $('#address1').val(),
|
||||
address_line2: $('#address2').val(),
|
||||
address_city: $('#city').val(),
|
||||
address_state: $('#state').val(),
|
||||
address_zip: $('#postal_code').val(),
|
||||
address_country: $("#country_id option:selected").text(),
|
||||
number: $('#card_number').val(),
|
||||
cvc: $('#cvv').val(),
|
||||
exp_month: $('#expiration_month').val(),
|
||||
exp_year: $('#expiration_year').val()
|
||||
};
|
||||
|
||||
Stripe.card.createToken(data, stripeResponseHandler);
|
||||
|
||||
// Prevent the form from submitting with the default action
|
||||
return false;
|
||||
@ -53,7 +67,7 @@
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@ -65,7 +79,7 @@
|
||||
->addClass('payment-form')
|
||||
->rules(array(
|
||||
'first_name' => 'required',
|
||||
'last_name' => 'required',
|
||||
'last_name' => 'required',
|
||||
'card_number' => 'required',
|
||||
'expiration_month' => 'required',
|
||||
'expiration_year' => 'required',
|
||||
@ -84,7 +98,7 @@
|
||||
{{ Former::populateField('first_name', $contact->first_name) }}
|
||||
{{ Former::populateField('last_name', $contact->last_name) }}
|
||||
@if (!$client->country_id && $client->account->country_id)
|
||||
{{ Former::populateField('country_id', $client->account->country_id) }}
|
||||
{{ Former::populateField('country_id', $client->account->country_id) }}
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@ -103,15 +117,15 @@
|
||||
<h2>{{ $client->getDisplayName() }}</h2>
|
||||
<h3>{{ trans('texts.invoice') . ' ' . $invoiceNumber }}<span>| {{ trans('texts.amount_due') }}: <em>{{ $account->formatMoney($amount, $client, true) }}</em></span></h3>
|
||||
@elseif ($paymentTitle)
|
||||
<h2>{{ $paymentTitle }}<br/><small>{{ $paymentSubtitle }}</small></h2>
|
||||
<h2>{{ $paymentTitle }}<br/><small>{{ $paymentSubtitle }}</small></h2>
|
||||
@endif
|
||||
</header>
|
||||
</header>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
@if (Request::secure() || Utils::isNinjaDev())
|
||||
<div class="secure">
|
||||
<h3>{{ trans('texts.secure_payment') }}</h3>
|
||||
<div>{{ trans('texts.256_encryption') }}</div>
|
||||
<div>{{ trans('texts.256_encryption') }}</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@ -204,7 +218,6 @@
|
||||
->id('card_number')
|
||||
->placeholder(trans('texts.card_number'))
|
||||
->autocomplete('cc-number')
|
||||
->data_stripe('number')
|
||||
->label('') !!}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@ -212,7 +225,6 @@
|
||||
->id('cvv')
|
||||
->placeholder(trans('texts.cvv'))
|
||||
->autocomplete('off')
|
||||
->data_stripe('cvc')
|
||||
->label('') !!}
|
||||
</div>
|
||||
</div>
|
||||
@ -221,7 +233,6 @@
|
||||
{!! Former::select($accountGateway->getPublishableStripeKey() ? '' : 'expiration_month')
|
||||
->id('expiration_month')
|
||||
->autocomplete('cc-exp-month')
|
||||
->data_stripe('exp-month')
|
||||
->placeholder(trans('texts.expiration_month'))
|
||||
->addOption('01 - January', '1')
|
||||
->addOption('02 - February', '2')
|
||||
@ -241,7 +252,6 @@
|
||||
{!! Former::select($accountGateway->getPublishableStripeKey() ? '' : 'expiration_year')
|
||||
->id('expiration_year')
|
||||
->autocomplete('cc-exp-year')
|
||||
->data_stripe('exp-year')
|
||||
->placeholder(trans('texts.expiration_year'))
|
||||
->addOption('2016', '2016')
|
||||
->addOption('2017', '2017')
|
||||
@ -266,7 +276,7 @@
|
||||
<label for="token_billing" class="checkbox" style="display: inline;">{{ trans('texts.token_billing') }}</label>
|
||||
<span class="help-block" style="font-size:15px">{!! trans('texts.token_billing_secure', ['stripe_link' => link_to('https://stripe.com/', 'Stripe.com', ['target' => '_blank'])]) !!}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7">
|
||||
@if (isset($acceptedCreditCardTypes))
|
||||
@ -278,7 +288,7 @@
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p> <br/> </p>
|
||||
|
||||
@ -291,8 +301,8 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
@ -302,7 +312,7 @@
|
||||
{!! Former::close() !!}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(function() {
|
||||
$('select').change(function() {
|
||||
$(this).css({color:'#444444'});
|
||||
|
Loading…
Reference in New Issue
Block a user