Updated various files for #506

This commit is contained in:
James Cole
2016-12-30 13:45:02 +01:00
parent 9ec3febbfa
commit ac86e75233
22 changed files with 63 additions and 70 deletions

View File

@@ -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));
}
/**

View File

@@ -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));
}
/**

View File

@@ -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));
}
}

View File

@@ -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));
}
}