mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 04:19:12 +00:00
Change the precision. Should not influence anything.
This commit is contained in:
@@ -124,7 +124,6 @@ class BalanceLine
|
||||
*/
|
||||
public function leftOfRepetition(): string
|
||||
{
|
||||
bcscale(2);
|
||||
$start = $this->budget->amount ?? '0';
|
||||
/** @var BalanceEntry $balanceEntry */
|
||||
foreach ($this->getBalanceEntries() as $balanceEntry) {
|
||||
|
||||
@@ -46,7 +46,6 @@ class Budget
|
||||
public function addBudgeted(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
bcscale(2);
|
||||
$this->budgeted = bcadd($this->budgeted, $add);
|
||||
}
|
||||
|
||||
@@ -56,7 +55,6 @@ class Budget
|
||||
public function addLeft(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
bcscale(2);
|
||||
$this->left = bcadd($this->left, $add);
|
||||
}
|
||||
|
||||
@@ -66,7 +64,6 @@ class Budget
|
||||
public function addOverspent(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
bcscale(2);
|
||||
$this->overspent = bcadd($this->overspent, $add);
|
||||
}
|
||||
|
||||
@@ -76,7 +73,6 @@ class Budget
|
||||
public function addSpent(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
bcscale(2);
|
||||
$this->spent = bcadd($this->spent, $add);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ class Category
|
||||
public function addTotal(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
bcscale(2);
|
||||
$this->total = bcadd($this->total, $add);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ class Expense
|
||||
*/
|
||||
public function addOrCreateExpense(TransactionJournal $entry)
|
||||
{
|
||||
bcscale(2);
|
||||
|
||||
$accountId = $entry->account_id;
|
||||
$amount = strval(round($entry->journalAmount, 2));
|
||||
@@ -62,7 +61,6 @@ class Expense
|
||||
*/
|
||||
public function addToTotal(string $add)
|
||||
{
|
||||
bcscale(2);
|
||||
|
||||
|
||||
$add = strval(round($add, 2));
|
||||
|
||||
@@ -45,7 +45,6 @@ class Income
|
||||
$newObject->id = $accountId;
|
||||
$this->incomes->put($accountId, $newObject);
|
||||
} else {
|
||||
bcscale(2);
|
||||
$existing = $this->incomes->get($accountId);
|
||||
$existing->amount = bcadd($existing->amount, $entry->journalAmount);
|
||||
$existing->count++;
|
||||
@@ -59,7 +58,6 @@ class Income
|
||||
public function addToTotal(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
bcscale(2);
|
||||
$this->total = bcadd($this->total, $add);
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,6 @@ class Importer
|
||||
*/
|
||||
protected function createTransactionJournal()
|
||||
{
|
||||
bcscale(2);
|
||||
$date = $this->importData['date'];
|
||||
if (is_null($this->importData['date'])) {
|
||||
$date = $this->importData['date-rent'];
|
||||
|
||||
@@ -19,7 +19,6 @@ class Amount implements PostProcessorInterface
|
||||
*/
|
||||
public function process()
|
||||
{
|
||||
bcscale(2);
|
||||
$amount = $this->data['amount'] ?? '0';
|
||||
$modifier = strval($this->data['amount-modifier']);
|
||||
$this->data['amount'] = bcmul($amount, $modifier);
|
||||
|
||||
@@ -44,7 +44,6 @@ class AccountReportHelper implements AccountReportHelperInterface
|
||||
$yesterday = clone $start;
|
||||
$yesterday->subDay();
|
||||
|
||||
bcscale(2);
|
||||
|
||||
// get balances for start.
|
||||
$startSet = Account::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id')
|
||||
|
||||
@@ -155,7 +155,6 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
if (!is_null($leftEntry->first())) {
|
||||
$left = $leftEntry->first()->sum;
|
||||
}
|
||||
bcscale(2);
|
||||
$diffValue = bcadd($spent, $left);
|
||||
|
||||
// difference:
|
||||
@@ -225,7 +224,6 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
if (!is_null($leftEntry->first())) {
|
||||
$left = $leftEntry->first()->sum;
|
||||
}
|
||||
bcscale(2);
|
||||
|
||||
// balanced by tags
|
||||
$tagEntry = new BalanceEntry;
|
||||
|
||||
@@ -40,7 +40,6 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
$set = $repository->getBudgets();
|
||||
$allRepetitions = $repository->getAllBudgetLimitRepetitions($start, $end);
|
||||
$allTotalSpent = $repository->spentAllPerDayForAccounts($accounts, $start, $end);
|
||||
bcscale(2);
|
||||
|
||||
foreach ($set as $budget) {
|
||||
|
||||
@@ -119,7 +118,6 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
*/
|
||||
protected function getSumOfRange(Carbon $start, Carbon $end, array $array)
|
||||
{
|
||||
bcscale(2);
|
||||
$sum = '0';
|
||||
$currentStart = clone $start; // to not mess with the original one
|
||||
$currentEnd = clone $end; // to not mess with the original one
|
||||
|
||||
@@ -77,7 +77,6 @@ class ReportHelper implements ReportHelperInterface
|
||||
$billLine->setMax($bill->amount_max);
|
||||
|
||||
// is hit in period?
|
||||
bcscale(2);
|
||||
|
||||
$entry = $journals->filter(
|
||||
function (TransactionJournal $journal) use ($bill) {
|
||||
@@ -229,7 +228,6 @@ class ReportHelper implements ReportHelperInterface
|
||||
*/
|
||||
public function tagReport(Carbon $start, Carbon $end, Collection $accounts): array
|
||||
{
|
||||
bcscale(2);
|
||||
$ids = $accounts->pluck('id')->toArray();
|
||||
$set = Tag::
|
||||
distinct()
|
||||
@@ -289,7 +287,6 @@ class ReportHelper implements ReportHelperInterface
|
||||
*/
|
||||
protected function getSumOfRange(Carbon $start, Carbon $end, array $array)
|
||||
{
|
||||
bcscale(2);
|
||||
$sum = '0';
|
||||
$currentStart = clone $start; // to not mess with the original one
|
||||
$currentEnd = clone $end; // to not mess with the original one
|
||||
|
||||
Reference in New Issue
Block a user