1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Removing document from cloned invoice removes it from original invoice too #1933

This commit is contained in:
Hillel Coren 2018-03-04 23:03:08 +02:00
parent 3dcd3c5fb1
commit 6ba323667f

View File

@ -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 {