mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 18:41:08 +00:00
Fix #2567
This commit is contained in:
@@ -264,6 +264,9 @@ class BillController extends Controller
|
|||||||
return redirect(route('bills.show', [$bill->id]));
|
return redirect(route('bills.show', [$bill->id]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// unlink all journals:
|
||||||
|
$this->billRepository->unlinkAll($bill);
|
||||||
|
|
||||||
foreach ($set as $rule) {
|
foreach ($set as $rule) {
|
||||||
// simply fire off all rules?
|
// simply fire off all rules?
|
||||||
/** @var TransactionMatcher $matcher */
|
/** @var TransactionMatcher $matcher */
|
||||||
|
@@ -686,4 +686,12 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
|
|
||||||
return $service->update($bill, $data);
|
return $service->update($bill, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Bill $bill
|
||||||
|
*/
|
||||||
|
public function unlinkAll(Bill $bill): void
|
||||||
|
{
|
||||||
|
$this->user->transactionJournals()->where('bill_id', $bill->id)->update(['bill_id' => null]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,12 @@ use Illuminate\Support\Collection;
|
|||||||
*/
|
*/
|
||||||
interface BillRepositoryInterface
|
interface BillRepositoryInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Bill $bill
|
||||||
|
*/
|
||||||
|
public function unlinkAll(Bill $bill): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Bill $bill
|
* @param Bill $bill
|
||||||
*
|
*
|
||||||
|
@@ -723,6 +723,7 @@ return [
|
|||||||
|
|
||||||
// bills:
|
// bills:
|
||||||
'match_between_amounts' => 'Bill matches transactions between :low and :high.',
|
'match_between_amounts' => 'Bill matches transactions between :low and :high.',
|
||||||
|
'running_again_loss' => 'Previously linked transactions to this bill may lose their connection, if they (no longer) match the rule(s).',
|
||||||
'bill_related_rules' => 'Rules related to this bill',
|
'bill_related_rules' => 'Rules related to this bill',
|
||||||
'repeats' => 'Repeats',
|
'repeats' => 'Repeats',
|
||||||
'connected_journals' => 'Connected transactions',
|
'connected_journals' => 'Connected transactions',
|
||||||
|
@@ -88,7 +88,12 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="box-footer">
|
<div class="box-footer">
|
||||||
<a id="billButtons" href="{{ route('bills.rescan',object.data.id) }}" class="btn btn-default">{{ 'rescan_old'|_ }}</a>
|
<p><a id="billButtons" href="{{ route('bills.rescan',object.data.id) }}" class="btn btn-default">{{ 'rescan_old'|_ }}</a></p>
|
||||||
|
<p><small class="text-muted">
|
||||||
|
{{ 'running_again_loss'|_ }}
|
||||||
|
</small>
|
||||||
|
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if object.data.notes %}
|
{% if object.data.notes %}
|
||||||
|
Reference in New Issue
Block a user