mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Fix #2567
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user