Small cleaning up.

This commit is contained in:
James Cole
2016-10-07 11:40:03 +02:00
parent 4d91f7d23a
commit c0fdf44ad2
2 changed files with 5 additions and 5 deletions

View File

@@ -33,11 +33,11 @@ class FireflyConfig
*/ */
public function delete($name): bool public function delete($name): bool
{ {
$fullName = 'preference' . auth()->user()->id . $name; $fullName = 'ff-config-' . $name;
if (Cache::has($fullName)) { if (Cache::has($fullName)) {
Cache::forget($fullName); Cache::forget($fullName);
} }
Preference::where('user_id', auth()->user()->id)->where('name', $name)->delete(); Configuration::where('name', $name)->delete();
return true; return true;
} }

View File

@@ -33,9 +33,9 @@ class TagSupport extends Model
public static function tagAllowAdvance(Tag $tag): bool public static function tagAllowAdvance(Tag $tag): bool
{ {
/* /*
* If this tag is a balancing act, and it contains transfers, it cannot be * If this tag is a balancing act, and it contains transfers, it cannot be
* changes to an advancePayment. * changes to an advancePayment.
*/ */
if ($tag->tagMode == 'balancingAct' || $tag->tagMode == 'nothing') { if ($tag->tagMode == 'balancingAct' || $tag->tagMode == 'nothing') {
foreach ($tag->transactionjournals as $journal) { foreach ($tag->transactionjournals as $journal) {