mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Merge branch 'master' of https://github.com/JC5/firefly-iii into new-layout
This commit is contained in:
commit
33da8aa987
@ -30,7 +30,15 @@ class MigrateController extends BaseController
|
||||
// so now Firefly pushes something in a queue and does something with it! Yay!
|
||||
\Log::debug('Pushed a job to start the import.');
|
||||
Queue::push('Firefly\Queue\Import@start', ['file' => $fullName, 'user' => \Auth::user()->id]);
|
||||
Session::flash('success', 'The import job has been queued. Please be patient. Data will appear');
|
||||
if (Config::get('queue.default') == 'sync') {
|
||||
Session::flash('success', 'Your data has been imported!');
|
||||
} else {
|
||||
Session::flash(
|
||||
'success',
|
||||
'The import job has been queued. Please be patient. Data will appear slowly. Please be patient.'
|
||||
);
|
||||
}
|
||||
|
||||
return Redirect::route('index');
|
||||
}
|
||||
Session::flash('error', 'Could not save file to storage.');
|
||||
|
@ -25,13 +25,20 @@ class Chart implements ChartInterface
|
||||
{
|
||||
$current = clone $start;
|
||||
$today = new Carbon;
|
||||
$return = ['name' => $account->name, 'id' => $account->id, 'data' => []];
|
||||
$return = [
|
||||
'name' => $account->name,
|
||||
'id' => $account->id,
|
||||
'type' => 'spline',
|
||||
'pointStart' => $start->timestamp * 1000,
|
||||
'pointInterval' => 24 * 3600 * 1000, // one day
|
||||
'data' => []
|
||||
];
|
||||
|
||||
while ($current <= $end) {
|
||||
if ($current > $today) {
|
||||
$return['data'][] = [$current->timestamp * 1000, $account->predict(clone $current)];
|
||||
$return['data'][] = $account->predict(clone $current);
|
||||
} else {
|
||||
$return['data'][] = [$current->timestamp * 1000, $account->balance(clone $current)];
|
||||
$return['data'][] = $account->balance(clone $current);
|
||||
}
|
||||
|
||||
$current->addDay();
|
||||
@ -561,19 +568,21 @@ class Chart implements ChartInterface
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function spentOnLimitRepetitionBetweenDates(\LimitRepetition $repetition, Carbon $start, Carbon $end) {
|
||||
public function spentOnLimitRepetitionBetweenDates(\LimitRepetition $repetition, Carbon $start, Carbon $end)
|
||||
{
|
||||
return floatval(
|
||||
\Transaction::
|
||||
leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||
->leftJoin('component_transaction_journal', 'component_transaction_journal.transaction_journal_id','=',
|
||||
->leftJoin(
|
||||
'component_transaction_journal', 'component_transaction_journal.transaction_journal_id', '=',
|
||||
'transaction_journals.id'
|
||||
)->where('component_transaction_journal.component_id', '=', $repetition->limit->budget->id)->where(
|
||||
'transaction_journals.date', '>=', $start->format('Y-m-d')
|
||||
)->where('transaction_journals.date', '<=', $end->format('Y-m-d'))->where(
|
||||
'amount', '>', 0
|
||||
)->sum('amount')) ;
|
||||
)->sum('amount')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -38,7 +38,7 @@ class EmailHelper implements EmailHelperInterface
|
||||
{
|
||||
|
||||
$password = \Str::random(12);
|
||||
$user->password = \Hash::make($password);
|
||||
$user->password = $password;
|
||||
$user->reset = \Str::random(32); // new one.
|
||||
$user->forceSave();
|
||||
$email = $user->email;
|
||||
|
Loading…
Reference in New Issue
Block a user