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:
parent
3dcd3c5fb1
commit
6ba323667f
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user