mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Merge: Removing document from cloned invoice removes it from original invoice too #1933
This commit is contained in:
parent
9159bf6fc3
commit
86d05ba14a
@ -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…
x
Reference in New Issue
Block a user