mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Merge branch 'master' of github.com:hillelcoren/invoice-ninja
This commit is contained in:
commit
9d3d58def1
@ -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…
Reference in New Issue
Block a user