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

Minor fixes

This commit is contained in:
Hillel Coren 2016-03-03 21:39:15 +02:00
parent 9c5944e2c4
commit eb6cd45913
5 changed files with 45 additions and 28 deletions

View File

@ -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"]);
}

View File

@ -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);
}
*/

View File

@ -93,6 +93,11 @@ class SubscriptionListener
$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);
}
}

View File

@ -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) {

View File

@ -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;
@ -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')