diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 690c6086c7..c084851d8b 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -110,6 +110,12 @@ class InvoiceController extends BaseController $invoice->invoice_status_id = 0; $invoice->invoice_date = date_create()->format('Y-m-d'); $invoice->deleted_at = null; + while ($invoice->documents->count()) { + $invoice->documents->pop(); + } + while ($invoice->expenses->count()) { + $invoice->expenses->pop(); + } $method = 'POST'; $url = "{$entityType}s"; } else {