mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
This commit is contained in:
@@ -281,6 +281,7 @@ trait RecurringTransactionTrait
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RecurrenceTransaction $transaction
|
* @param RecurrenceTransaction $transaction
|
||||||
* @param array $tags
|
* @param array $tags
|
||||||
|
@@ -73,6 +73,9 @@ trait GetRecurrenceData
|
|||||||
if (array_key_exists('piggy_bank_id', $transaction)) {
|
if (array_key_exists('piggy_bank_id', $transaction)) {
|
||||||
$return['piggy_bank_id'] = (int)$transaction['piggy_bank_id'];
|
$return['piggy_bank_id'] = (int)$transaction['piggy_bank_id'];
|
||||||
}
|
}
|
||||||
|
if (array_key_exists('bill_id', $transaction)) {
|
||||||
|
$return['bill_id'] = (int)$transaction['bill_id'];
|
||||||
|
}
|
||||||
|
|
||||||
if (array_key_exists('tags', $transaction)) {
|
if (array_key_exists('tags', $transaction)) {
|
||||||
$return['tags'] = $transaction['tags'];
|
$return['tags'] = $transaction['tags'];
|
||||||
|
@@ -203,12 +203,13 @@ trait RecurrenceValidation
|
|||||||
*/
|
*/
|
||||||
foreach ($repetitions as $index => $repetition) {
|
foreach ($repetitions as $index => $repetition) {
|
||||||
if (!array_key_exists('moment', $repetition)) {
|
if (!array_key_exists('moment', $repetition)) {
|
||||||
continue;
|
$repetition['moment'] = '';
|
||||||
}
|
}
|
||||||
if (null === $repetition['moment']) {
|
if (null === $repetition['moment']) {
|
||||||
$repetition['moment'] = '';
|
$repetition['moment'] = '';
|
||||||
}
|
}
|
||||||
$repetition['moment'] = $repetition['moment'] ?? 'invalid';
|
$repetition['moment'] = $repetition['moment'] ?? 'invalid';
|
||||||
|
|
||||||
switch ($repetition['type'] ?? 'empty') {
|
switch ($repetition['type'] ?? 'empty') {
|
||||||
default:
|
default:
|
||||||
$validator->errors()->add(sprintf('repetitions.%d.type', $index), (string)trans('validation.valid_recurrence_rep_type'));
|
$validator->errors()->add(sprintf('repetitions.%d.type', $index), (string)trans('validation.valid_recurrence_rep_type'));
|
||||||
|
@@ -59,37 +59,39 @@
|
|||||||
{{ trans('firefly.repeat_until_in_past', {date: array.repeat_until.isoFormat(monthAndDayFormat) }) }}
|
{{ trans('firefly.repeat_until_in_past', {date: array.repeat_until.isoFormat(monthAndDayFormat) }) }}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for rep in array.repetitions %}
|
{% for rep in array.repetitions %}
|
||||||
<p>
|
<p>
|
||||||
<strong>{{ rep.description }}
|
<strong>{{ rep.description }}
|
||||||
{% if rep.repetition_skip == 1 %}
|
{% if rep.repetition_skip == 1 %}
|
||||||
({{ trans('firefly.recurring_skips_one')|lower }})
|
({{ trans('firefly.recurring_skips_one')|lower }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if rep.repetition_skip > 1 %}
|
{% if rep.repetition_skip > 1 %}
|
||||||
({{ trans('firefly.recurring_skips_more', {count: rep.repetition_skip})|lower }})
|
({{ trans('firefly.recurring_skips_more', {count: rep.repetition_skip})|lower }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</strong>
|
</strong>
|
||||||
</p>
|
</p>
|
||||||
<table class="table" aria-label="Table">
|
<table class="table" aria-label="Table">
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for occ in rep.occurrences %}
|
{% for occ in rep.occurrences %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{{ occ.date.isoFormat(trans('config.month_and_date_day_js')) }}</th>
|
<th scope="row">{{ occ.date.isoFormat(trans('config.month_and_date_day_js')) }}</th>
|
||||||
<td>
|
<td>
|
||||||
{% if not occ.fired %}
|
{% if not occ.fired %}
|
||||||
<form action="{{ route('recurring.trigger', [recurrence.id]) }}" method="post" style="display: inline;">
|
<form action="{{ route('recurring.trigger', [recurrence.id]) }}" method="post"
|
||||||
|
style="display: inline;">
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" name="date" value="{{ occ.date.isoFormat('YYYY-MM-DD') }}">
|
<input type="hidden" name="date"
|
||||||
<input type="submit" name="submit" value="{{ 'create_right_now'|_ }}"
|
value="{{ occ.date.isoFormat('YYYY-MM-DD') }}">
|
||||||
class="btn btn-sm btn-default">
|
<input type="submit" name="submit" value="{{ 'create_right_now'|_ }}"
|
||||||
|
class="btn btn-sm btn-default">
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="box-footer">
|
<div class="box-footer">
|
||||||
<small>
|
<small>
|
||||||
@@ -161,8 +163,15 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if 0 != transaction.piggy_bank_id and array.type == 'Transfer' %}
|
{% if 0 != transaction.piggy_bank_id %}
|
||||||
<a href="{{ route('piggy-banks.show', [transaction.piggy_bank_id]) }}">{{ transaction.piggy_bank_name }}</a>
|
<p>
|
||||||
|
<a href="{{ route('piggy-banks.show', [transaction.piggy_bank_id]) }}">{{ transaction.piggy_bank_name }}</a>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
{% if 0 != transaction.bill_id %}
|
||||||
|
<p>
|
||||||
|
<a href="{{ route('bills.show', [transaction.bill_id]) }}">{{ transaction.bill_name }}</a>
|
||||||
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Reference in New Issue
Block a user