[Scope] Hidden Pembayaran Laporan Kegiatan PPPK 2025
This commit is contained in:
@@ -18,6 +18,17 @@ class Syarat extends Model
|
||||
protected $table = 'public.syarats';
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* Sembunyikan anggota P3K dengan NIP unik 202521 (PPPK 2025).
|
||||
* Hanya dipakai di tampilan Laporan Kegiatan; jangan dipasang di jalur perhitungan.
|
||||
*/
|
||||
public function scopeTanpaPppk2025($query)
|
||||
{
|
||||
$kolom = $query->getQuery()->getGrammar()->wrap($query->qualifyColumn('id_pelaksana'));
|
||||
|
||||
return $query->whereRaw("({$kolom} is null or cast({$kolom} as text) not like ?)", ['%202521%']);
|
||||
}
|
||||
|
||||
function kegiatan()
|
||||
{
|
||||
return $this->belongsTo(Kegiatan::class, 'id_kegiatan', 'id');
|
||||
|
||||
Reference in New Issue
Block a user