mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #2567
This commit is contained in:
parent
a1ae85660d
commit
3c8935c0a8
@ -264,6 +264,9 @@ class BillController extends Controller
|
||||
return redirect(route('bills.show', [$bill->id]));
|
||||
}
|
||||
|
||||
// unlink all journals:
|
||||
$this->billRepository->unlinkAll($bill);
|
||||
|
||||
foreach ($set as $rule) {
|
||||
// simply fire off all rules?
|
||||
/** @var TransactionMatcher $matcher */
|
||||
|
@ -686,4 +686,12 @@ class BillRepository implements BillRepositoryInterface
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Bill $bill
|
||||
*/
|
||||
public function unlinkAll(Bill $bill): void;
|
||||
|
||||
/**
|
||||
* @param Bill $bill
|
||||
*
|
||||
|
@ -723,6 +723,7 @@ return [
|
||||
|
||||
// bills:
|
||||
'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',
|
||||
'repeats' => 'Repeats',
|
||||
'connected_journals' => 'Connected transactions',
|
||||
|
@ -88,7 +88,12 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<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>
|
||||
{% if object.data.notes %}
|
||||
|
Loading…
Reference in New Issue
Block a user