mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix bugs.
This commit is contained in:
@@ -47,15 +47,15 @@ use Watson\Validating\ValidatingTrait;
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\TransactionJournal after($date)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\TransactionJournal before($date)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\TransactionJournal transactionTypes($types)
|
||||
* @property-read string $transaction_type_type
|
||||
* @property string $transaction_type_type
|
||||
* @property-read string $transaction_currency_code
|
||||
* @property-read string $destination_amount
|
||||
* @property-read string $destination_account_id
|
||||
* @property-read string $destination_account_name
|
||||
* @property string $destination_account_id
|
||||
* @property string $destination_account_name
|
||||
* @property-read string $destination_account_type
|
||||
* @property-read string $source_amount
|
||||
* @property-read string $source_account_id
|
||||
* @property-read string $source_account_name
|
||||
* @property string $source_account_id
|
||||
* @property string $source_account_name
|
||||
* @property-read string $source_account_type
|
||||
* @property \Carbon\Carbon $process_date
|
||||
* @property int $account_id
|
||||
@@ -178,20 +178,6 @@ class TransactionJournal extends TransactionJournalSupport
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDestinationAccountNameAttribute($value)
|
||||
{
|
||||
if (!is_null($value) && strlen(strval($value)) > 0) {
|
||||
return Crypt::decrypt($value);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $fieldName
|
||||
@@ -209,21 +195,6 @@ class TransactionJournal extends TransactionJournalSupport
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSourceAccountNameAttribute($value)
|
||||
{
|
||||
if (!is_null($value) && strlen(strval($value)) > 0) {
|
||||
return Crypt::decrypt($value);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
@@ -322,17 +293,6 @@ class TransactionJournal extends TransactionJournalSupport
|
||||
return $query->where('transaction_journals.date', '<=', $date->format('Y-m-d 00:00:00'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EloquentBuilder $query
|
||||
*/
|
||||
public function scopeSortCorrectly(EloquentBuilder $query)
|
||||
{
|
||||
$query->orderBy('transaction_journals.date', 'DESC');
|
||||
$query->orderBy('transaction_journals.order', 'ASC');
|
||||
$query->orderBy('transaction_journals.id', 'DESC');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EloquentBuilder $query
|
||||
*/
|
||||
@@ -351,6 +311,17 @@ class TransactionJournal extends TransactionJournalSupport
|
||||
$query->with(['categories', 'budgets', 'attachments', 'bill', 'transactions']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EloquentBuilder $query
|
||||
*/
|
||||
public function scopeSortCorrectly(EloquentBuilder $query)
|
||||
{
|
||||
$query->orderBy('transaction_journals.date', 'DESC');
|
||||
$query->orderBy('transaction_journals.order', 'ASC');
|
||||
$query->orderBy('transaction_journals.id', 'DESC');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
|
Reference in New Issue
Block a user