done
This commit is contained in:
parent
96af24a1cf
commit
ee1510a420
@ -10,12 +10,15 @@ class transaksi extends Model
|
||||
use HasFactory;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
protected $with = ['register', 'tindakan'];
|
||||
protected $with = ['register', 'tindakan', 'pegawai'];
|
||||
public function register(){
|
||||
return $this->belongsTo(registrasiPasien::class, 'reg_uid', 'uid');
|
||||
}
|
||||
public function tindakan(){
|
||||
return $this->belongsTo(service::class, 'services_uid', 'uid');
|
||||
}
|
||||
public function pegawai(){
|
||||
return $this->belongsTo(User::class, 'pegawai_uid', 'uid');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -64,7 +64,11 @@ dataTable.bootstrapTable({
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
title: "Asuransi",
|
||||
field:"register.asuransi.name",
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
title: "Tindakan",
|
||||
field:"tindakan.name",
|
||||
@ -80,6 +84,11 @@ dataTable.bootstrapTable({
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
title: "Pegawai",
|
||||
field:"pegawai.name",
|
||||
sortable: true,
|
||||
},
|
||||
|
||||
],
|
||||
});
|
||||
|
||||
@ -52,6 +52,7 @@
|
||||
<th>Nama Pasien</th>
|
||||
<th>Tanggal Lahir</th>
|
||||
<th>Tindakan</th>
|
||||
<th>Asuransi</th>
|
||||
<th>Tarif</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -61,6 +62,7 @@
|
||||
<tr>
|
||||
<td>{{ $item->register?->patient->name ?? '-' }}</td>
|
||||
<td>{{ $item->register?->patient->birth ?? '-' }}</td>
|
||||
<td>{{ $item->register?->asuransi->name ?? '-' }}</td>
|
||||
<td class="font-weight-600">{{ $item->tindakan?->name ?? '-' }}</td>
|
||||
<td><div class="badge badge-success">{{ number_format($item->price ?? 0, 0, ',', '.') }}</div></td>
|
||||
</tr>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user