mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
Fix transaction delete issue
This commit is contained in:
@ -300,6 +300,10 @@ class Company extends Model implements HasMedia
|
||||
if ($this->invoices()->exists()) {
|
||||
$this->invoices->map(function ($invoice) {
|
||||
$this->checkModelData($invoice);
|
||||
|
||||
if ($invoice->transactions()->exists()) {
|
||||
$invoice->transactions()->delete();
|
||||
}
|
||||
});
|
||||
|
||||
$this->invoices()->delete();
|
||||
|
||||
Reference in New Issue
Block a user