mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
rewind
This commit is contained in:
parent
050b79cc75
commit
2b23a80fda
@ -316,16 +316,7 @@ class InvoiceApiController extends BaseAPIController
|
|||||||
} elseif ($request->action) {
|
} elseif ($request->action) {
|
||||||
return $this->handleAction($request);
|
return $this->handleAction($request);
|
||||||
}
|
}
|
||||||
else if ($request->action == ACTION_CLONE) {
|
|
||||||
|
|
||||||
$invoice = Invoice::scope($publicId)->firstOrFail();
|
|
||||||
$clonedInvoice = $this->invoiceRepo->cloneInvoice($invoice, null);
|
|
||||||
|
|
||||||
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
|
||||||
$data = $this->createItem($clonedInvoice, $transformer, 'invoice');
|
|
||||||
|
|
||||||
return $this->response($data);
|
|
||||||
}
|
|
||||||
$data = $request->input();
|
$data = $request->input();
|
||||||
$data['public_id'] = $publicId;
|
$data['public_id'] = $publicId;
|
||||||
$this->invoiceService->save($data, $request->entity());
|
$this->invoiceService->save($data, $request->entity());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user