This commit is contained in:
James Cole 2018-06-24 13:46:34 +02:00
parent 72cca5ccbf
commit e05664f34f
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
5 changed files with 9 additions and 4 deletions

View File

@ -157,7 +157,7 @@ class SplitController extends Controller
$type = strtolower($this->repository->getTransactionType($journal));
session()->flash('success', (string)trans('firefly.updated_' . $type, ['description' => $journal->description]));
Preferences::mark();
app('preferences')->mark();
// @codeCoverageIgnoreStart
if (1 === (int)$request->get('return_to_edit')) {

View File

@ -41,6 +41,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
*
* @property User $user
* @property int $bill_id
* @property Collection $categories
*/
class TransactionJournal extends Model
{

View File

@ -163,14 +163,17 @@ class Preferences
{
$lastActivity = microtime();
$preference = $this->get('lastActivity', microtime());
if (null !== $preference && null !== $preference->data) {
$lastActivity = $preference->data;
}
if (\is_array($lastActivity)) {
$lastActivity = implode(',', $lastActivity);
}
$hash = md5($lastActivity);
Log::debug(sprintf('Value of last activity is %s, hash is %s', $lastActivity, $hash));
return md5($lastActivity);
return $hash;
}
/**

View File

@ -198,6 +198,7 @@ class Journal extends Twig_Extension
->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('categories.user_id', $journal->user_id)
->where('transaction_journals.id', $journal->id)
->whereNull('transactions.deleted_at')
->get(['categories.*']);
/** @var Category $category */
foreach ($set as $category) {

View File

@ -188,12 +188,12 @@ function resetDivSplits() {
// ends with ][destination_account_name]
$.each($('input[name$="][destination_name]"]'), function (i, v) {
var input = $(v);
input.attr('name', 'transactions[' + i + '][destination_account_name]');
input.attr('name', 'transactions[' + i + '][destination_name]');
});
// ends with ][source_account_name]
$.each($('input[name$="][source_name]"]'), function (i, v) {
var input = $(v);
input.attr('name', 'transactions[' + i + '][source_account_name]');
input.attr('name', 'transactions[' + i + '][source_name]');
});
// ends with ][amount]
$.each($('input[name$="][amount]"]'), function (i, v) {