Initial refactoring work

This commit is contained in:
Deon George
2018-05-20 22:53:14 +10:00
parent d6cb505e1c
commit feda44db8a
121 changed files with 6601 additions and 602 deletions

View File

@@ -6,13 +6,26 @@ use Illuminate\Database\Eloquent\Model;
class Currency extends Model
{
// @todo - temp Until Implemented
protected $fillable = ['rounding'];
protected $table = 'ab_currency';
public $timestamps = FALSE;
const ROUND_HALF_UP = 1;
const ROUND_HALF_DOWN = 2;
const ROUND_HALF_EVEN = 3;
const ROUND_HALF_ODD = 4;
/**
* The accounts in this country
*/
public function countries()
{
return $this->hasMany('App\Models\Country');
return $this->hasMany(Country::class);
}
public function round($value,$mode=self::ROUND_HALF_UP)
{
return round($value,$this->rounding,$mode);
}
}