| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?php
- namespace App\Http\Controllers;
- use App\Owner;
- use App\OwnerLogisticFeeDetail;
- use App\Services\OwnerLogisticFeeDetailService;
- use Illuminate\Http\Request;
- class OwnerLogisticFeeDetailController extends Controller
- {
- /** @var $service OwnerLogisticFeeDetailService */
- private $service;
- /**
- * Display a listing of the resource.
- *
- */
- public function index(Request $request)
- {
- $paginateParams = $request->input();
- $this->service = app('OwnerLogisticFeeDetailService');
- $this->userService = app('UserService');
- $permittingOwnerIds = $this->userService->getPermittingOwnerIds(auth()->user());
- if (is_null($request->owner_id)) {
- $owner_id = $permittingOwnerIds[0];
- } else {
- $owner_id = $request->owner_id;
- }
- if (is_null($request->start)) {
- $start = now()->subMonth()->startOfMonth()->toDateString();
- } else {
- $start = $request->start;
- }
- if (is_null($request->end)) {
- $end = now()->subMonth()->endOfMonth()->toDateString();
- } else {
- $end = $request->end;
- }
- $details = $this->service->getDetails($owner_id, $start, $end, $paginateParams);
- $owners = Owner::query()->selectRaw("id,name")->whereIn('id', $permittingOwnerIds)->get();
- $owner = Owner::query()->selectRaw("name")->find($owner_id);
- return view('finance.settlementBills.logisticFee.detail.index', compact('details', 'paginateParams', 'owners','owner'));
- }
- /**
- * Show the form for creating a new resource.
- *
- * @return \Illuminate\Http\Response
- */
- public function create()
- {
- //
- }
- /**
- * Store a newly created resource in storage.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
- */
- public function store(Request $request)
- {
- //
- }
- /**
- * Display the specified resource.
- *
- * @param \App\OwnerLogisticFeeDetail $ownerLogisticFeeDetail
- * @return \Illuminate\Http\Response
- */
- public function show(OwnerLogisticFeeDetail $ownerLogisticFeeDetail)
- {
- //
- }
- /**
- * Show the form for editing the specified resource.
- *
- * @param \App\OwnerLogisticFeeDetail $ownerLogisticFeeDetail
- * @return \Illuminate\Http\Response
- */
- public function edit(OwnerLogisticFeeDetail $ownerLogisticFeeDetail)
- {
- //
- }
- /**
- * Update the specified resource in storage.
- *
- * @param \Illuminate\Http\Request $request
- * @param \App\OwnerLogisticFeeDetail $ownerLogisticFeeDetail
- * @return \Illuminate\Http\Response
- */
- public function update(Request $request, OwnerLogisticFeeDetail $ownerLogisticFeeDetail)
- {
- //
- }
- /**
- * Remove the specified resource from storage.
- *
- * @param \App\OwnerLogisticFeeDetail $ownerLogisticFeeDetail
- * @return \Illuminate\Http\Response
- */
- public function destroy(OwnerLogisticFeeDetail $ownerLogisticFeeDetail)
- {
- //
- }
- }
|