Perbaikan Menu Laporan per pintu pos
This commit is contained in:
@@ -81,12 +81,14 @@ public function gateData(Request $request)
|
|||||||
)
|
)
|
||||||
|
|
||||||
// 🔹 Status Transaksi
|
// 🔹 Status Transaksi
|
||||||
->when($request->status_transaksi, function ($q) use ($request) {
|
// ->when($request->status_transaksi, function ($q) use ($request) {
|
||||||
|
->when(isset($request->status_transaksi), function ($q) use ($request) {
|
||||||
|
|
||||||
return match ($request->status_transaksi) {
|
return match ($request->status_transaksi) {
|
||||||
'3' => $q->where('tp.status_transaksi', '3'),
|
'0' => $q->whereNotIn('tp.status_transaksi', ['3','-1'])->whereNotNull('alasan'),
|
||||||
'0' => $q->where('tp.status_transaksi', '0'),
|
// '0' => $q->whereNotIn('tp.status_transaksi', '5')->whereNotNull('alasan'),
|
||||||
'-1' => $q->whereNotNull('alasan'),
|
'3' => $q->where('tp.status_transaksi', '3')->whereNull('alasan'),
|
||||||
|
'-1' => $q->where('tp.status_transaksi', '-1')->whereNotNull('alasan'),
|
||||||
'null' => $q->whereNull('alasan')
|
'null' => $q->whereNull('alasan')
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -72,8 +72,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-2">
|
<div class="col-sm-12 col-md-2">
|
||||||
<label class="label" for="status_trans">Status Transaksi</label>
|
<label class="label" for="status_trans">Status Transaksi</label>
|
||||||
<select id="status_transaksi" name="status_transaksi" class="form-control select2" data-placeholder="Semua">
|
<select id="status_transaksi" name="status_transaksi" class="form-control select2">
|
||||||
<option value="">Semua</option>
|
<option value="" selected>Semua</option>
|
||||||
<option value="0">Casual</option>
|
<option value="0">Casual</option>
|
||||||
<option value="3">Member</option>
|
<option value="3">Member</option>
|
||||||
<option value="-1">Batal</option>
|
<option value="-1">Batal</option>
|
||||||
|
|||||||
Reference in New Issue
Block a user