Restore Invoice from API
This commit is contained in:
parent
165a382637
commit
cae3b48cd4
1 changed files with 2 additions and 2 deletions
|
|
@ -317,8 +317,8 @@ class InvoiceApiController extends BaseAPIController
|
|||
return $this->response($data);
|
||||
}
|
||||
else if ($request->action == ACTION_RESTORE) {
|
||||
$invoice = Invoice::scope($publicId)->firstOrFail();
|
||||
$invoice = $this->invoiceRepo->restore($invoice);
|
||||
$invoice = Invoice::scope($publicId)->withTrashed()->firstOrFail();
|
||||
$this->invoiceRepo->restore($invoice);
|
||||
|
||||
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
||||
$data = $this->createItem($invoice, $transformer, 'invoice');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue