Penambahan Menu Pagu Fakultas

This commit is contained in:
Ariyutta
2026-10-21 08:41:10 +07:00
parent 62c55f3f0f
commit 452dc4269d
6 changed files with 113 additions and 6 deletions
+4 -1
View File
@@ -17,7 +17,7 @@ class PaguExport implements FromCollection, WithHeadings, WithMapping, WithColum
{
protected $periode;
public function __construct($periode = null)
public function __construct($periode = null, protected ?int $facultyId = null)
{
$this->periode = $periode;
}
@@ -30,6 +30,9 @@ class PaguExport implements FromCollection, WithHeadings, WithMapping, WithColum
public function collection()
{
$query = Pagu::with('unitKerja');
if ($this->facultyId !== null) {
$query->where('unit_pembayaran_id', $this->facultyId);
}
if ($this->periode) {
$query->where('tahun', $this->periode);