mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
bug fixes
This commit is contained in:
parent
703d61a22b
commit
1e5634c305
@ -24,11 +24,13 @@ class SendRecurringInvoices extends Command {
|
||||
|
||||
$today = new DateTime();
|
||||
|
||||
$invoices = Invoice::with('account', 'invoice_items')->whereRaw('is_recurring is true AND start_date <= ? AND (end_date IS NULL OR end_date >= ?)', array($today, $today))->get();
|
||||
$invoices = Invoice::with('account.timezone', 'invoice_items')->whereRaw('is_recurring is true AND start_date <= ? AND (end_date IS NULL OR end_date >= ?)', array($today, $today))->get();
|
||||
$this->info(count($invoices) . ' recurring invoice(s) found');
|
||||
|
||||
foreach ($invoices as $recurInvoice)
|
||||
{
|
||||
date_default_timezone_set($recurInvoice->account->getTimezone());
|
||||
|
||||
$this->info('Processing Invoice ' . $recurInvoice->id . ' - Should send ' . ($recurInvoice->shouldSendToday() ? 'YES' : 'NO'));
|
||||
|
||||
if (!$recurInvoice->shouldSendToday())
|
||||
|
@ -50,7 +50,7 @@ return array(
|
||||
'login_form' => 'users.login',
|
||||
'signup_form' => 'confide::signup',
|
||||
'forgot_password_form' => 'users.forgot_password',
|
||||
'reset_password_form' => 'confide::reset_password',
|
||||
'reset_password_form' => 'users.reset_password',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -37,7 +37,7 @@ class ClientController extends \BaseController {
|
||||
->addColumn('first_name', function($model) { return link_to('clients/' . $model->public_id, $model->first_name . ' ' . $model->last_name); })
|
||||
->addColumn('email', function($model) { return link_to('clients/' . $model->public_id, $model->email); })
|
||||
->addColumn('created_at', function($model) { return Utils::timestampToDateString(strtotime($model->created_at)); })
|
||||
->addColumn('last_login', function($model) { return Utils::timestampToDateString($model->last_login); })
|
||||
->addColumn('last_login', function($model) { return Utils::timestampToDateString(strtotime($model->last_login)); })
|
||||
->addColumn('balance', function($model) { return Utils::formatMoney($model->balance, $model->currency_id); })
|
||||
->addColumn('dropdown', function($model)
|
||||
{
|
||||
@ -214,11 +214,13 @@ class ClientController extends \BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
Activity::createClient($client);
|
||||
|
||||
if ($publicId) {
|
||||
if ($publicId)
|
||||
{
|
||||
Session::flash('message', 'Successfully updated client');
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
Activity::createClient($client);
|
||||
Session::flash('message', 'Successfully created client');
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,18 @@ class Account extends Eloquent
|
||||
}
|
||||
}
|
||||
|
||||
public function getTimezone()
|
||||
{
|
||||
if ($this->timezone)
|
||||
{
|
||||
return $this->timezone->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 'US/Eastern';
|
||||
}
|
||||
}
|
||||
|
||||
public function getGatewayConfig($gatewayId)
|
||||
{
|
||||
foreach ($this->account_gateways as $gateway)
|
||||
|
@ -96,7 +96,10 @@ class ClientRepository
|
||||
|
||||
$client->save();
|
||||
|
||||
if ($publicId == "-1")
|
||||
{
|
||||
\Activity::createClient($client);
|
||||
}
|
||||
|
||||
return $client;
|
||||
}
|
||||
|
@ -59,11 +59,12 @@ Route::get('/test', function() {
|
||||
});
|
||||
*/
|
||||
|
||||
/*
|
||||
// TODO_FIX replace with cron
|
||||
Route::get('/send_emails', function() {
|
||||
Artisan::call('ninja:send-invoices');
|
||||
});
|
||||
|
||||
*/
|
||||
|
||||
//Route::get('/', 'HomeController@showComingSoon');
|
||||
Route::get('/', 'HomeController@showWelcome');
|
||||
@ -86,8 +87,8 @@ Route::post('login', 'UserController@do_login');
|
||||
Route::get('user/confirm/{code}', 'UserController@confirm');
|
||||
Route::get('forgot_password', 'UserController@forgot_password');
|
||||
Route::post('forgot_password', 'UserController@do_forgot_password');
|
||||
//Route::get('user/reset_password/{token}', 'UserController@reset_password');
|
||||
//Route::post('user/reset_password', 'UserController@do_reset_password');
|
||||
Route::get('user/reset/{token}', 'UserController@reset_password');
|
||||
Route::post('user/reset', 'UserController@do_reset_password');
|
||||
Route::get('logout', 'UserController@logout');
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
<div class="col-lg-8 col-lg-offset-4">
|
||||
<label for="test" class="checkbox" data-bind="attr: {for: $index() + '_check'}">
|
||||
<input type="checkbox" value="1" data-bind="checked: send_invoice, attr: {id: $index() + '_check'}">
|
||||
<span data-bind="text: first_name() + ' ' + last_name() + ' - ' + email()"/>
|
||||
<span data-bind="text: email.display"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -1156,11 +1156,14 @@
|
||||
self.phone = ko.observable('');
|
||||
self.send_invoice = ko.observable(false);
|
||||
|
||||
/*
|
||||
self.displayName = ko.computed(function() {
|
||||
return self.first_name() + ' ' + self.last_name() + ' - ' + self.email();
|
||||
self.email.display = ko.computed(function() {
|
||||
var str = '';
|
||||
if (self.first_name() || self.last_name()) {
|
||||
str += self.first_name() + ' ' + self.last_name() + ' - ';
|
||||
}
|
||||
return str + self.email();
|
||||
});
|
||||
*/
|
||||
|
||||
|
||||
if (data) {
|
||||
ko.mapping.fromJS(data, {}, this);
|
||||
|
79
app/views/users/reset_password.blade.php
Executable file
79
app/views/users/reset_password.blade.php
Executable file
@ -0,0 +1,79 @@
|
||||
@extends('master')
|
||||
|
||||
@section('head')
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
.form-signin {
|
||||
max-width: 450px;
|
||||
padding: 15px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.form-signin .form-signin-heading,
|
||||
.form-signin .checkbox {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.form-signin .checkbox {
|
||||
font-weight: normal;
|
||||
}
|
||||
.form-signin .form-control {
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
height: auto;
|
||||
padding: 10px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.form-signin .form-control:focus {
|
||||
z-index: 2;
|
||||
}
|
||||
.form-signin input[type="text"] {
|
||||
margin-bottom: -1px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.form-signin input[type="password"] {
|
||||
margin-bottom: 10px;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
<div class="container">
|
||||
|
||||
{{ Former::open('user/reset')->addClass('form-signin') }}
|
||||
<h2 class="form-signin-heading">Passord Reset</h2>
|
||||
<input type="hidden" name="token" value="{{{ $token }}}">
|
||||
|
||||
<p>
|
||||
{{ Former::password('password') }}
|
||||
{{ Former::password('password_confirmation')->label('Confirm') }}
|
||||
|
||||
</p>
|
||||
|
||||
<p>{{ Button::primary_submit('Save', array('class' => 'btn-lg'))->block() }}</p>
|
||||
|
||||
<!-- if there are login errors, show them here -->
|
||||
@if ( Session::get('error') )
|
||||
<div class="alert alert-error">{{{ Session::get('error') }}}</div>
|
||||
@endif
|
||||
|
||||
@if ( Session::get('notice') )
|
||||
<div class="alert">{{{ Session::get('notice') }}}</div>
|
||||
@endif
|
||||
|
||||
|
||||
{{ Former::close() }}
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
55
app/views/users/reset_password.php
Executable file
55
app/views/users/reset_password.php
Executable file
@ -0,0 +1,55 @@
|
||||
@extends('master')
|
||||
|
||||
@section('head')
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
.form-signin {
|
||||
max-width: 330px;
|
||||
padding: 15px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.form-signin .form-signin-heading,
|
||||
.form-signin .checkbox {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.form-signin .checkbox {
|
||||
font-weight: normal;
|
||||
}
|
||||
.form-signin .form-control {
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
height: auto;
|
||||
padding: 10px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.form-signin .form-control:focus {
|
||||
z-index: 2;
|
||||
}
|
||||
.form-signin input[type="text"] {
|
||||
margin-bottom: -1px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.form-signin input[type="password"] {
|
||||
margin-bottom: 10px;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
<div class="container">
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
Loading…
x
Reference in New Issue
Block a user