mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix some bugs related to cash accounts.
This commit is contained in:
@@ -119,6 +119,20 @@ class Account extends Model
|
||||
return $this->belongsTo('FireflyIII\Models\AccountType');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEditNameAttribute(): string
|
||||
{
|
||||
$name = $this->name;
|
||||
|
||||
if ($this->accountType->type === AccountType::CASH) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* FIxxME can return null
|
||||
*
|
||||
@@ -229,20 +243,6 @@ class Account extends Model
|
||||
return $journal->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function nameForEdit(): string
|
||||
{
|
||||
$name = $this->name;
|
||||
|
||||
if ($this->accountType->type === AccountType::CASH) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany
|
||||
*/
|
||||
|
Reference in New Issue
Block a user