Skip to content

Commit 1e758c8

Browse files
committed
Add year filter to global scope for 'kerangkaAcuan' count in DaftarSp2d: Enhance data accuracy
1 parent c9f8416 commit 1e758c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Models/DaftarSp2d.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function realisasiAnggaran(): HasMany
2828
protected static function booted(): void
2929
{
3030
static::addGlobalScope('with-kerangka-acuan-count', function (Builder $builder) {
31-
$builder->withCount('kerangkaAcuan');
31+
$builder->whereYear('tanggal_sp2d',session('year'))->withCount('kerangkaAcuan');
3232
});
3333
}
3434
}

0 commit comments

Comments
 (0)