mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Temp fix for #2701
This commit is contained in:
parent
5e9e749179
commit
24e7260fe7
@ -404,6 +404,7 @@ class RecurringRepository implements RecurringRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function repetitionDescription(RecurrenceRepetition $repetition): string
|
public function repetitionDescription(RecurrenceRepetition $repetition): string
|
||||||
{
|
{
|
||||||
|
Log::debug('Now in repetitionDescription()');
|
||||||
/** @var Preference $pref */
|
/** @var Preference $pref */
|
||||||
$pref = app('preferences')->getForUser($this->user, 'language', config('firefly.default_language', 'en_US'));
|
$pref = app('preferences')->getForUser($this->user, 'language', config('firefly.default_language', 'en_US'));
|
||||||
$language = $pref->data;
|
$language = $pref->data;
|
||||||
@ -514,6 +515,7 @@ class RecurringRepository implements RecurringRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function getXOccurrencesSince(RecurrenceRepetition $repetition, Carbon $date, Carbon $afterDate, int $count): array
|
public function getXOccurrencesSince(RecurrenceRepetition $repetition, Carbon $date, Carbon $afterDate, int $count): array
|
||||||
{
|
{
|
||||||
|
Log::debug('Now in getXOccurrencesSince()');
|
||||||
$skipMod = $repetition->repetition_skip + 1;
|
$skipMod = $repetition->repetition_skip + 1;
|
||||||
$occurrences = [];
|
$occurrences = [];
|
||||||
if ('daily' === $repetition->repetition_type) {
|
if ('daily' === $repetition->repetition_type) {
|
||||||
|
@ -26,7 +26,7 @@ namespace FireflyIII\Support\Repositories\Recurring;
|
|||||||
|
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
use Log;
|
||||||
/**
|
/**
|
||||||
* Class CalculateXOccurrencesSince
|
* Class CalculateXOccurrencesSince
|
||||||
*/
|
*/
|
||||||
@ -46,6 +46,7 @@ trait CalculateXOccurrencesSince
|
|||||||
*/
|
*/
|
||||||
protected function getXDailyOccurrencesSince(Carbon $date, Carbon $afterDate, int $count, int $skipMod): array
|
protected function getXDailyOccurrencesSince(Carbon $date, Carbon $afterDate, int $count, int $skipMod): array
|
||||||
{
|
{
|
||||||
|
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
$return = [];
|
$return = [];
|
||||||
$mutator = clone $date;
|
$mutator = clone $date;
|
||||||
$total = 0;
|
$total = 0;
|
||||||
@ -77,6 +78,7 @@ trait CalculateXOccurrencesSince
|
|||||||
*/
|
*/
|
||||||
protected function getXMonthlyOccurrencesSince(Carbon $date, Carbon $afterDate, int $count, int $skipMod, string $moment): array
|
protected function getXMonthlyOccurrencesSince(Carbon $date, Carbon $afterDate, int $count, int $skipMod, string $moment): array
|
||||||
{
|
{
|
||||||
|
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
$return = [];
|
$return = [];
|
||||||
$mutator = clone $date;
|
$mutator = clone $date;
|
||||||
$total = 0;
|
$total = 0;
|
||||||
@ -116,6 +118,7 @@ trait CalculateXOccurrencesSince
|
|||||||
*/
|
*/
|
||||||
protected function getXNDomOccurrencesSince(Carbon $date, Carbon $afterDate, int $count, int $skipMod, string $moment): array
|
protected function getXNDomOccurrencesSince(Carbon $date, Carbon $afterDate, int $count, int $skipMod, string $moment): array
|
||||||
{
|
{
|
||||||
|
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
$return = [];
|
$return = [];
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$attempts = 0;
|
$attempts = 0;
|
||||||
@ -156,6 +159,7 @@ trait CalculateXOccurrencesSince
|
|||||||
*/
|
*/
|
||||||
protected function getXWeeklyOccurrencesSince(Carbon $date, Carbon $afterDate, int $count, int $skipMod, string $moment): array
|
protected function getXWeeklyOccurrencesSince(Carbon $date, Carbon $afterDate, int $count, int $skipMod, string $moment): array
|
||||||
{
|
{
|
||||||
|
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
$return = [];
|
$return = [];
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$attempts = 0;
|
$attempts = 0;
|
||||||
@ -200,6 +204,7 @@ trait CalculateXOccurrencesSince
|
|||||||
*/
|
*/
|
||||||
protected function getXYearlyOccurrencesSince(Carbon $date, Carbon $afterDate, int $count, int $skipMod, string $moment): array
|
protected function getXYearlyOccurrencesSince(Carbon $date, Carbon $afterDate, int $count, int $skipMod, string $moment): array
|
||||||
{
|
{
|
||||||
|
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
$return = [];
|
$return = [];
|
||||||
$mutator = clone $date;
|
$mutator = clone $date;
|
||||||
$total = 0;
|
$total = 0;
|
||||||
|
@ -46,6 +46,7 @@ trait FiltersWeekends
|
|||||||
*/
|
*/
|
||||||
protected function filterWeekends(RecurrenceRepetition $repetition, array $dates): array
|
protected function filterWeekends(RecurrenceRepetition $repetition, array $dates): array
|
||||||
{
|
{
|
||||||
|
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
if ((int)$repetition->weekend === RecurrenceRepetition::WEEKEND_DO_NOTHING) {
|
if ((int)$repetition->weekend === RecurrenceRepetition::WEEKEND_DO_NOTHING) {
|
||||||
Log::debug('Repetition will not be filtered on weekend days.');
|
Log::debug('Repetition will not be filtered on weekend days.');
|
||||||
|
|
||||||
|
@ -83,10 +83,12 @@ class RecurrenceTransformer extends AbstractTransformer
|
|||||||
$this->piggyRepos->setUser($recurrence->user);
|
$this->piggyRepos->setUser($recurrence->user);
|
||||||
$this->factory->setUser($recurrence->user);
|
$this->factory->setUser($recurrence->user);
|
||||||
$this->budgetRepos->setUser($recurrence->user);
|
$this->budgetRepos->setUser($recurrence->user);
|
||||||
|
Log::debug('Set user.');
|
||||||
|
|
||||||
$shortType = (string)config(sprintf('firefly.transactionTypesToShort.%s', $recurrence->transactionType->type));
|
$shortType = (string)config(sprintf('firefly.transactionTypesToShort.%s', $recurrence->transactionType->type));
|
||||||
$notes = $this->repository->getNoteText($recurrence);
|
$notes = $this->repository->getNoteText($recurrence);
|
||||||
$reps = 0 === (int)$recurrence->repetitions ? null : (int)$recurrence->repetitions;
|
$reps = 0 === (int)$recurrence->repetitions ? null : (int)$recurrence->repetitions;
|
||||||
|
Log::debug('Get basic data.');
|
||||||
// basic data.
|
// basic data.
|
||||||
$return = [
|
$return = [
|
||||||
'id' => (int)$recurrence->id,
|
'id' => (int)$recurrence->id,
|
||||||
@ -124,6 +126,7 @@ class RecurrenceTransformer extends AbstractTransformer
|
|||||||
*/
|
*/
|
||||||
private function getRepetitions(Recurrence $recurrence): array
|
private function getRepetitions(Recurrence $recurrence): array
|
||||||
{
|
{
|
||||||
|
Log::debug('Now in getRepetitions().');
|
||||||
$fromDate = $recurrence->latest_date ?? $recurrence->first_date;
|
$fromDate = $recurrence->latest_date ?? $recurrence->first_date;
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
||||||
@ -163,6 +166,7 @@ class RecurrenceTransformer extends AbstractTransformer
|
|||||||
*/
|
*/
|
||||||
private function getTransactionMeta(RecurrenceTransaction $transaction, array $array): array
|
private function getTransactionMeta(RecurrenceTransaction $transaction, array $array): array
|
||||||
{
|
{
|
||||||
|
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
$array['tags'] = [];
|
$array['tags'] = [];
|
||||||
$array['category_id'] = null;
|
$array['category_id'] = null;
|
||||||
$array['category_name'] = null;
|
$array['category_name'] = null;
|
||||||
@ -216,6 +220,7 @@ class RecurrenceTransformer extends AbstractTransformer
|
|||||||
*/
|
*/
|
||||||
private function getTransactions(Recurrence $recurrence): array
|
private function getTransactions(Recurrence $recurrence): array
|
||||||
{
|
{
|
||||||
|
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
$return = [];
|
$return = [];
|
||||||
// get all transactions:
|
// get all transactions:
|
||||||
/** @var RecurrenceTransaction $transaction */
|
/** @var RecurrenceTransaction $transaction */
|
||||||
|
Loading…
Reference in New Issue
Block a user