mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Bug fixes
This commit is contained in:
parent
ccaabe2926
commit
391d721180
@ -98,7 +98,9 @@ class PaymentApiController extends BaseAPIController
|
|||||||
$payment = Payment::scope($publicId)->withTrashed()->firstOrFail();
|
$payment = Payment::scope($publicId)->withTrashed()->firstOrFail();
|
||||||
$this->paymentRepo->archive($payment);
|
$this->paymentRepo->archive($payment);
|
||||||
|
|
||||||
$invoice = Invoice::scope($data['invoice_id'])->with('client','payments')->withTrashed()->first();
|
$invoice = Invoice::scope($data['invoice_id'])->with('client')->with(['payments' => function($query) {
|
||||||
|
$query->withTrashed();
|
||||||
|
}])->first();
|
||||||
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
||||||
$data = $this->createItem($invoice, $transformer, 'invoice');
|
$data = $this->createItem($invoice, $transformer, 'invoice');
|
||||||
|
|
||||||
@ -111,7 +113,9 @@ class PaymentApiController extends BaseAPIController
|
|||||||
return $error;
|
return $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice = Invoice::scope($data['invoice_id'])->with('client', 'invoice_items', 'invitations','payments')->withTrashed()->first();
|
$invoice = Invoice::scope($data['invoice_id'])->with('client', 'invoice_items', 'invitations')->with(['payments' => function($query) {
|
||||||
|
$query->withTrashed();
|
||||||
|
}])->withTrashed()->first();
|
||||||
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
||||||
$data = $this->createItem($invoice, $transformer, 'invoice');
|
$data = $this->createItem($invoice, $transformer, 'invoice');
|
||||||
return $this->response($data);
|
return $this->response($data);
|
||||||
@ -171,13 +175,9 @@ class PaymentApiController extends BaseAPIController
|
|||||||
$this->contactMailer->sendPaymentConfirmation($payment);
|
$this->contactMailer->sendPaymentConfirmation($payment);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
$invoice = Invoice::scope($invoice->public_id)->with('client', 'invoice_items', 'invitations')->with(['payments' => function($query) {
|
||||||
$payment = Payment::scope($payment->public_id)->with('client', 'contact', 'user', 'invoice')->first();
|
$query->withTrashed();
|
||||||
$transformer = new PaymentTransformer(Auth::user()->account, Input::get('serializer'));
|
}])->first();
|
||||||
$data = $this->createItem($payment, $transformer, 'payment');
|
|
||||||
*/
|
|
||||||
$invoice = Invoice::scope($invoice->public_id)->with('client', 'invoice_items', 'invitations')->first();
|
|
||||||
|
|
||||||
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
||||||
$data = $this->createItem($invoice, $transformer, 'invoice');
|
$data = $this->createItem($invoice, $transformer, 'invoice');
|
||||||
|
|
||||||
@ -214,7 +214,9 @@ class PaymentApiController extends BaseAPIController
|
|||||||
|
|
||||||
$this->paymentRepo->delete($payment);
|
$this->paymentRepo->delete($payment);
|
||||||
|
|
||||||
$invoice = Invoice::scope($invoiceId)->with('payments')->withTrashed()->first();
|
$invoice = Invoice::scope($invoiceId)->with('client', 'invoice_items', 'invitations')->with(['payments' => function($query) {
|
||||||
|
$query->withTrashed();
|
||||||
|
}])->first();
|
||||||
|
|
||||||
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
||||||
$data = $this->createItem($invoice, $transformer, 'invoice');
|
$data = $this->createItem($invoice, $transformer, 'invoice');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user