mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 07:54:30 -04:00
Minor fixes
This commit is contained in:
parent
9c5944e2c4
commit
eb6cd45913
@ -132,7 +132,7 @@ class ClientController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function create()
|
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"]);
|
return View::make('error', ['hideHeader' => true, 'error' => "Sorry, you've exceeded the limit of ".Auth::user()->getMaxNumClients()." clients"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
@ -93,6 +93,11 @@ class SubscriptionListener
|
|||||||
$resource = new Item($entity, $transformer, $entity->getEntityType());
|
$resource = new Item($entity, $transformer, $entity->getEntityType());
|
||||||
$data = $manager->createData($resource)->toArray();
|
$data = $manager->createData($resource)->toArray();
|
||||||
|
|
||||||
|
// For legacy Zapier support
|
||||||
|
if (isset($data['client_id'])) {
|
||||||
|
$data['client_name'] = $entity->client->getDisplayName();
|
||||||
|
}
|
||||||
|
|
||||||
Utils::notifyZapier($subscription, $data);
|
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' => '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' => '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' => '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) {
|
foreach ($currencies as $currency) {
|
||||||
|
@ -14,7 +14,21 @@
|
|||||||
// Disable the submit button to prevent repeated clicks
|
// Disable the submit button to prevent repeated clicks
|
||||||
$form.find('button').prop('disabled', true);
|
$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
|
// Prevent the form from submitting with the default action
|
||||||
return false;
|
return false;
|
||||||
@ -204,7 +218,6 @@
|
|||||||
->id('card_number')
|
->id('card_number')
|
||||||
->placeholder(trans('texts.card_number'))
|
->placeholder(trans('texts.card_number'))
|
||||||
->autocomplete('cc-number')
|
->autocomplete('cc-number')
|
||||||
->data_stripe('number')
|
|
||||||
->label('') !!}
|
->label('') !!}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -212,7 +225,6 @@
|
|||||||
->id('cvv')
|
->id('cvv')
|
||||||
->placeholder(trans('texts.cvv'))
|
->placeholder(trans('texts.cvv'))
|
||||||
->autocomplete('off')
|
->autocomplete('off')
|
||||||
->data_stripe('cvc')
|
|
||||||
->label('') !!}
|
->label('') !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -221,7 +233,6 @@
|
|||||||
{!! Former::select($accountGateway->getPublishableStripeKey() ? '' : 'expiration_month')
|
{!! Former::select($accountGateway->getPublishableStripeKey() ? '' : 'expiration_month')
|
||||||
->id('expiration_month')
|
->id('expiration_month')
|
||||||
->autocomplete('cc-exp-month')
|
->autocomplete('cc-exp-month')
|
||||||
->data_stripe('exp-month')
|
|
||||||
->placeholder(trans('texts.expiration_month'))
|
->placeholder(trans('texts.expiration_month'))
|
||||||
->addOption('01 - January', '1')
|
->addOption('01 - January', '1')
|
||||||
->addOption('02 - February', '2')
|
->addOption('02 - February', '2')
|
||||||
@ -241,7 +252,6 @@
|
|||||||
{!! Former::select($accountGateway->getPublishableStripeKey() ? '' : 'expiration_year')
|
{!! Former::select($accountGateway->getPublishableStripeKey() ? '' : 'expiration_year')
|
||||||
->id('expiration_year')
|
->id('expiration_year')
|
||||||
->autocomplete('cc-exp-year')
|
->autocomplete('cc-exp-year')
|
||||||
->data_stripe('exp-year')
|
|
||||||
->placeholder(trans('texts.expiration_year'))
|
->placeholder(trans('texts.expiration_year'))
|
||||||
->addOption('2016', '2016')
|
->addOption('2016', '2016')
|
||||||
->addOption('2017', '2017')
|
->addOption('2017', '2017')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user