mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code cleanup should trigger scan.
This commit is contained in:
parent
333c348117
commit
742c84269b
@ -107,17 +107,16 @@ class RecurrenceController extends Controller
|
||||
$repetition->weekend = (int)$request->get('weekend');
|
||||
$actualEnd = clone $end;
|
||||
|
||||
if('until_date' === $endsAt) {
|
||||
if ('until_date' === $endsAt) {
|
||||
$actualEnd = $endDate ?? clone $end;
|
||||
$occurrences = $this->recurring->getOccurrencesInRange($repetition, $actualStart, $actualEnd);
|
||||
}
|
||||
if('times' === $endsAt) {
|
||||
if ('times' === $endsAt) {
|
||||
$occurrences = $this->recurring->getXOccurrences($repetition, $actualStart, $repetitions);
|
||||
}
|
||||
if('times' !== $endsAt && 'until_date' !== $endsAt) {
|
||||
if ('times' !== $endsAt && 'until_date' !== $endsAt) {
|
||||
// 'forever'
|
||||
$occurrences = $this->recurring->getOccurrencesInRange($repetition, $actualStart, $actualEnd);
|
||||
|
||||
}
|
||||
|
||||
/** @var Carbon $current */
|
||||
|
@ -315,22 +315,22 @@ class RecurrenceFormRequest extends FormRequest
|
||||
// TODO either use 'withdrawal' or the strtolower() variant, not both.
|
||||
$type = $this->convertString('transaction_type');
|
||||
$throwError = true;
|
||||
if('withdrawal' === $type) {
|
||||
if ('withdrawal' === $type) {
|
||||
$throwError = false;
|
||||
$sourceId = (int)$data['source_id'];
|
||||
$destinationId = (int)$data['withdrawal_destination_id'];
|
||||
}
|
||||
if('deposit' === $type) {
|
||||
if ('deposit' === $type) {
|
||||
$throwError = false;
|
||||
$sourceId = (int)$data['deposit_source_id'];
|
||||
$destinationId = (int)$data['destination_id'];
|
||||
}
|
||||
if('transfer' === $type) {
|
||||
if ('transfer' === $type) {
|
||||
$throwError = false;
|
||||
$sourceId = (int)$data['source_id'];
|
||||
$destinationId = (int)$data['destination_id'];
|
||||
}
|
||||
if(true === $throwError) {
|
||||
if (true === $throwError) {
|
||||
throw new FireflyException(sprintf('Cannot handle transaction type "%s"', $this->convertString('transaction_type')));
|
||||
}
|
||||
|
||||
|
@ -374,7 +374,6 @@ trait RecurringTransactionTrait
|
||||
$transaction->recurrenceTransactionMeta()->delete();
|
||||
|
||||
$transaction->delete();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -153,9 +153,7 @@ class CategoryUpdateService
|
||||
if ('' === $note) {
|
||||
$dbNote = $category->notes()->first();
|
||||
if (null !== $dbNote) {
|
||||
|
||||
$dbNote->delete();
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user