Build the stuff for incoming invoices.
This commit is contained in:
@@ -19,6 +19,9 @@ class InvoiceController extends Controller
|
||||
return response()->json(Invoice::whereBetween('created_at', [$from, $end])->with(['address', 'customer'])->orderBy('created_at', 'desc')->get());
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource that have a status "sent".
|
||||
*/
|
||||
public function open(): JsonResponse
|
||||
{
|
||||
return response()->json(Invoice::where('status', '=', 'sent')->orderBy('created_at', 'desc')->with(['customer', 'address', 'payments'])->get());
|
||||
@@ -49,14 +52,6 @@ class InvoiceController extends Controller
|
||||
return response()->json($invoice);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Invoice $invoice)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
@@ -76,6 +71,9 @@ class InvoiceController extends Controller
|
||||
return response()->json($invoice);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource's status in storage.
|
||||
*/
|
||||
public function state(Request $request, Invoice $invoice): JsonResponse
|
||||
{
|
||||
$invoiceData = $request->validate([
|
||||
|
||||
Reference in New Issue
Block a user