���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
repositories
/
npln
/
app
/
Livewire
/
Admin
/
Pages
/
Reports
/
Payment
/
Viewing: Table.php
<?php namespace App\Livewire\Admin\Pages\Reports\Payment; use Livewire\Component; use Livewire\WithPagination; use Masmerise\Toaster\Toaster; use App\Models\User; use App\Models\Document; use App\Models\Detailed; use Illuminate\Http\Request; use function App\Helpers\saveUser; use Illuminate\Support\Facades\Auth; use App\Exports\DocumentsExport; use Maatwebsite\Excel\Facades\Excel; class Table extends Component { use WithPagination; protected $listeners = ['refreshPayment' => '$refresh','refreshTable' => '$refresh','filterSearch' => 'filterDate','outfilter' => 'outfilter']; public $user_id; public $order_id; public $type; public $start; public $end; public $employe_id; public $to_id; public $order_number; public $from_name; public $to_name; public $out_filter; public $all_sum_bes; public $all_sum_bed; public $report='true'; public $queryString = []; public $detailes = []; public $designers = []; public function outfilter($val,$type){ if(isset($val)){ if($type == 'from'){ $this->from_name=$val; }else{ $this->to_name=$val; } } $this->dispatch('refreshPayment'); } public function filterDate($date,Request $request){ if(isset($date[0])){ $this->start=$date[0]; } if(isset($date[1])){ $this->end=$date[1]; } $this->dispatch('refreshPayment'); } public function export() { $headings=[]; $cols=[]; return Excel::download(new DocumentsExport($this->start,$this->end,$this->to_id,$this->order_number,$this->employe_id,$this->order_id,$this->from_name,$this->to_name), 'document.xlsx'); } public function mount() { $this->detailes=Detailed::get(); $this->designers=User::where('roll','manager_designer')->get(); } public function render() { $documents=Document:: when($this->start,function($q){ $q->where('documents.created_at', '>=', $this->start); }) ->when($this->end,function($q){ $q->where('documents.created_at', '<=', $this->end); }) ->when($this->order_id,function($q){ $q->where('documents.order_id',$this->order_id); }) ->when($this->from_name,function($q){ $q->whereHas('from',function($q){ $q->where('name', 'like', '%'.$this->from_name.'%'); }); }) ->when($this->to_name,function($q){ $q->whereHas('to',function($q){ $q->where('name', 'like', '%'.$this->to_name.'%'); }); }) ->when($this->employe_id,function($q){ $q->whereHas('order',function($q){ $q->where('employe_id', $this->employe_id); }); }) ->when($this->order_number,function($q){ $q->where('order_id', 'like', '%'.$this->order_number.'%'); }) ->when($this->to_id,function($q){ $q->where('documents.to_id', $this->to_id); }); $this->all_sum_bes=$documents->sum('sum_bes'); $this->all_sum_bed=$documents->sum('sum_bed'); $result=$documents->paginate(10); return view('livewire.admin.pages.reports.payment.table',['result'=>$result]); } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa