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:
@@ -35,27 +35,10 @@ class BalanceLine
|
||||
|
||||
/** @var BudgetModel */
|
||||
protected $budget;
|
||||
/** @var int */
|
||||
protected $role = self::ROLE_DEFAULTROLE;
|
||||
|
||||
/** @var BudgetLimit */
|
||||
protected $budgetLimit;
|
||||
|
||||
/**
|
||||
* @return BudgetLimit
|
||||
*/
|
||||
public function getBudgetLimit(): BudgetLimit
|
||||
{
|
||||
return $this->budgetLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*/
|
||||
public function setBudgetLimit(BudgetLimit $budgetLimit)
|
||||
{
|
||||
$this->budgetLimit = $budgetLimit;
|
||||
}
|
||||
/** @var int */
|
||||
protected $role = self::ROLE_DEFAULTROLE;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -106,6 +89,22 @@ class BalanceLine
|
||||
$this->budget = $budget;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BudgetLimit
|
||||
*/
|
||||
public function getBudgetLimit(): BudgetLimit
|
||||
{
|
||||
return $this->budgetLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*/
|
||||
public function setBudgetLimit(BudgetLimit $budgetLimit)
|
||||
{
|
||||
$this->budgetLimit = $budgetLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Carbon
|
||||
*/
|
||||
|
@@ -60,7 +60,6 @@ class Budget
|
||||
*/
|
||||
public function addBudgeted(string $add): Budget
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->budgeted = bcadd($this->budgeted, $add);
|
||||
|
||||
return $this;
|
||||
@@ -73,7 +72,6 @@ class Budget
|
||||
*/
|
||||
public function addLeft(string $add): Budget
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->left = bcadd($this->left, $add);
|
||||
|
||||
return $this;
|
||||
@@ -86,7 +84,6 @@ class Budget
|
||||
*/
|
||||
public function addOverspent(string $add): Budget
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->overspent = bcadd($this->overspent, $add);
|
||||
|
||||
return $this;
|
||||
@@ -99,7 +96,6 @@ class Budget
|
||||
*/
|
||||
public function addSpent(string $add): Budget
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->spent = bcadd($this->spent, $add);
|
||||
|
||||
return $this;
|
||||
@@ -168,7 +164,7 @@ class Budget
|
||||
*/
|
||||
public function setOverspent(string $overspent): Budget
|
||||
{
|
||||
$this->overspent = strval(round($overspent, 2));
|
||||
$this->overspent = $overspent;
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -188,7 +184,7 @@ class Budget
|
||||
*/
|
||||
public function setSpent(string $spent): Budget
|
||||
{
|
||||
$this->spent = strval(round($spent, 2));
|
||||
$this->spent = $spent;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@@ -55,7 +55,6 @@ class Category
|
||||
*/
|
||||
public function addTotal(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->total = bcadd($this->total, $add);
|
||||
}
|
||||
|
||||
@@ -79,7 +78,7 @@ class Category
|
||||
*/
|
||||
public function getTotal(): string
|
||||
{
|
||||
return strval(round($this->total, 2));
|
||||
return $this->total;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user