mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Updated various files for #506
This commit is contained in:
@@ -318,7 +318,7 @@ class Account extends Model
|
||||
*/
|
||||
public function setVirtualBalanceAttribute($value)
|
||||
{
|
||||
$this->attributes['virtual_balance'] = strval(round($value, 2));
|
||||
$this->attributes['virtual_balance'] = strval(round($value, 12));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -29,9 +29,6 @@ class Bill extends Model
|
||||
{
|
||||
|
||||
use ValidatingTrait;
|
||||
/** @var array */
|
||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||
|
||||
/**
|
||||
* The attributes that should be casted to native types.
|
||||
*
|
||||
@@ -49,6 +46,8 @@ class Bill extends Model
|
||||
'name_encrypted' => 'boolean',
|
||||
'match_encrypted' => 'boolean',
|
||||
];
|
||||
/** @var array */
|
||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||
protected $fillable
|
||||
= ['name', 'match', 'amount_min', 'match_encrypted', 'name_encrypted', 'user_id', 'amount_max', 'date', 'repeat_freq', 'skip',
|
||||
'automatch', 'active',];
|
||||
@@ -105,7 +104,7 @@ class Bill extends Model
|
||||
*/
|
||||
public function setAmountMaxAttribute($value)
|
||||
{
|
||||
$this->attributes['amount_max'] = strval(round($value, 2));
|
||||
$this->attributes['amount_max'] = strval(round($value, 12));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,7 +112,7 @@ class Bill extends Model
|
||||
*/
|
||||
public function setAmountMinAttribute($value)
|
||||
{
|
||||
$this->attributes['amount_min'] = strval(round($value, 2));
|
||||
$this->attributes['amount_min'] = strval(round($value, 12));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -81,7 +81,7 @@ class BudgetLimit extends Model
|
||||
*/
|
||||
public function setAmountAttribute($value)
|
||||
{
|
||||
$this->attributes['amount'] = strval(round($value, 2));
|
||||
$this->attributes['amount'] = strval(round($value, 12));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ class PiggyBank extends Model
|
||||
* @var array
|
||||
*/
|
||||
protected $casts
|
||||
= [
|
||||
= [
|
||||
'created_at' => 'date',
|
||||
'updated_at' => 'date',
|
||||
'deleted_at' => 'date',
|
||||
@@ -168,6 +168,6 @@ class PiggyBank extends Model
|
||||
*/
|
||||
public function setTargetamountAttribute($value)
|
||||
{
|
||||
$this->attributes['targetamount'] = strval(round($value, 2));
|
||||
$this->attributes['targetamount'] = strval(round($value, 12));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user