mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-13 16:00:13 +00:00
This commit is contained in:
12
.ci/php-cs-fixer/composer.lock
generated
12
.ci/php-cs-fixer/composer.lock
generated
@@ -226,16 +226,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "friendsofphp/php-cs-fixer",
|
"name": "friendsofphp/php-cs-fixer",
|
||||||
"version": "v3.37.1",
|
"version": "v3.38.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
|
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
|
||||||
"reference": "c3fe76976081ab871aa654e872da588077e19679"
|
"reference": "7e6070026e76aa09d77a47519625c86593fb8e31"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/c3fe76976081ab871aa654e872da588077e19679",
|
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7e6070026e76aa09d77a47519625c86593fb8e31",
|
||||||
"reference": "c3fe76976081ab871aa654e872da588077e19679",
|
"reference": "7e6070026e76aa09d77a47519625c86593fb8e31",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -307,7 +307,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
|
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
|
||||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.37.1"
|
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.38.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -315,7 +315,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-10-29T20:51:23+00:00"
|
"time": "2023-11-07T08:44:54+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/container",
|
"name": "psr/container",
|
||||||
|
@@ -108,10 +108,10 @@ class Controller extends BaseController
|
|||||||
}
|
}
|
||||||
if (null !== $date) {
|
if (null !== $date) {
|
||||||
try {
|
try {
|
||||||
$obj = Carbon::parse($date, config('app.timezone'));
|
$obj = Carbon::parse((string) $date, config('app.timezone'));
|
||||||
} catch (InvalidDateException | InvalidFormatException $e) {
|
} catch (InvalidDateException | InvalidFormatException $e) {
|
||||||
// don't care
|
// don't care
|
||||||
app('log')->warning(sprintf('Ignored invalid date "%s" in API v2 controller parameter check: %s', substr($date, 0, 20), $e->getMessage()));
|
app('log')->warning(sprintf('Ignored invalid date "%s" in API v2 controller parameter check: %s', substr((string) $date, 0, 20), $e->getMessage()));
|
||||||
}
|
}
|
||||||
// out of range? set to null.
|
// out of range? set to null.
|
||||||
if (null !== $obj && ($obj->year <= 1900 || $obj->year > 2099)) {
|
if (null !== $obj && ($obj->year <= 1900 || $obj->year > 2099)) {
|
||||||
|
@@ -28,7 +28,9 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
|||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
use ValueError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class FixUnevenAmount
|
* Class FixUnevenAmount
|
||||||
@@ -69,7 +71,15 @@ class FixUnevenAmount extends Command
|
|||||||
$count++;
|
$count++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (0 !== bccomp((string)$entry->the_sum, '0')) {
|
$res = -1;
|
||||||
|
try {
|
||||||
|
$res = bccomp($sum, '0');
|
||||||
|
} catch (ValueError $e) {
|
||||||
|
$this->friendlyError(sprintf('Could not bccomp("%s", "0").', $sum));
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
Log::error($e->getTraceAsString());
|
||||||
|
}
|
||||||
|
if (0 !== $res) {
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
'Sum of journal #%d is %s instead of zero.',
|
'Sum of journal #%d is %s instead of zero.',
|
||||||
$entry->transaction_journal_id,
|
$entry->transaction_journal_id,
|
||||||
|
@@ -378,11 +378,11 @@ class Navigation
|
|||||||
// then correct for quarterly or half-year
|
// then correct for quarterly or half-year
|
||||||
if ('quarterly' === $period) {
|
if ('quarterly' === $period) {
|
||||||
Log::debug(sprintf('Q: Corrected %f to %f', $floatDiff, $floatDiff / 3));
|
Log::debug(sprintf('Q: Corrected %f to %f', $floatDiff, $floatDiff / 3));
|
||||||
$floatDiff = $floatDiff / 3;
|
$floatDiff /= 3;
|
||||||
}
|
}
|
||||||
if ('half-year' === $period) {
|
if ('half-year' === $period) {
|
||||||
Log::debug(sprintf('H: Corrected %f to %f', $floatDiff, $floatDiff / 6));
|
Log::debug(sprintf('H: Corrected %f to %f', $floatDiff, $floatDiff / 6));
|
||||||
$floatDiff = $floatDiff / 6;
|
$floatDiff /= 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
// then do ceil()
|
// then do ceil()
|
||||||
|
@@ -356,7 +356,7 @@ class BillTransformer extends AbstractTransformer
|
|||||||
$steps = app('navigation')->diffInPeriods($bill->repeat_freq, $bill->skip, $start, $date);
|
$steps = app('navigation')->diffInPeriods($bill->repeat_freq, $bill->skip, $start, $date);
|
||||||
$result = clone $start;
|
$result = clone $start;
|
||||||
if ($steps > 0) {
|
if ($steps > 0) {
|
||||||
$steps = $steps - 1;
|
$steps -= 1;
|
||||||
app('log')->debug(sprintf('Steps is %d, because addPeriod already adds 1.', $steps));
|
app('log')->debug(sprintf('Steps is %d, because addPeriod already adds 1.', $steps));
|
||||||
$result = app('navigation')->addPeriod($start, $bill->repeat_freq, $steps);
|
$result = app('navigation')->addPeriod($start, $bill->repeat_freq, $steps);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user