Merge branch 'master' of github.com:hillelcoren/invoice-ninja
This commit is contained in:
commit
9d3d58def1
2 changed files with 10 additions and 0 deletions
|
|
@ -316,6 +316,15 @@ class InvoiceApiController extends BaseAPIController
|
|||
|
||||
return $this->response($data);
|
||||
}
|
||||
else if ($request->action == ACTION_RESTORE) {
|
||||
$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');
|
||||
|
||||
return $this->response($data);
|
||||
}
|
||||
|
||||
$data = $request->input();
|
||||
$data['public_id'] = $publicId;
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ class InvoiceTransformer extends EntityTransformer
|
|||
'custom_taxes1' => (bool) $invoice->custom_taxes1,
|
||||
'custom_taxes2' => (bool) $invoice->custom_taxes2,
|
||||
'has_expenses' => (bool) $invoice->has_expenses,
|
||||
'quote_invoice_id' => (int) $invoice->quote_invoice_id,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue