Merge: Removing document from cloned invoice removes it from original invoice too #1933
This commit is contained in:
parent
9159bf6fc3
commit
86d05ba14a
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue