return archived invoice as success
This commit is contained in:
parent
4e77317767
commit
ca591f4451
1 changed files with 6 additions and 1 deletions
|
|
@ -276,10 +276,15 @@ class InvoiceApiController extends BaseAPIController
|
|||
if ($request->action == ACTION_ARCHIVE) {
|
||||
$invoice = Invoice::scope($publicId)->firstOrFail();
|
||||
$this->invoiceRepo->archive($invoice);
|
||||
|
||||
/*
|
||||
$response = json_encode(RESULT_SUCCESS, JSON_PRETTY_PRINT);
|
||||
$headers = Utils::getApiHeaders();
|
||||
return Response::make($response, 200, $headers);
|
||||
*/
|
||||
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
||||
$data = $this->createItem($invoice, $transformer, 'invoice');
|
||||
|
||||
return $this->response($data);
|
||||
}
|
||||
|
||||
$data = $request->input();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue