mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-13 07:53:16 +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'));
|
||||||
|
@@ -77,9 +77,11 @@
|
|||||||
<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"
|
||||||
|
value="{{ occ.date.isoFormat('YYYY-MM-DD') }}">
|
||||||
<input type="submit" name="submit" value="{{ 'create_right_now'|_ }}"
|
<input type="submit" name="submit" value="{{ 'create_right_now'|_ }}"
|
||||||
class="btn btn-sm btn-default">
|
class="btn btn-sm btn-default">
|
||||||
</form>
|
</form>
|
||||||
@@ -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 %}
|
||||||
|
<p>
|
||||||
<a href="{{ route('piggy-banks.show', [transaction.piggy_bank_id]) }}">{{ transaction.piggy_bank_name }}</a>
|
<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