pelaporan 2026) * - tempoh pelaporan: 1 Jan - 31 Dis tahun pelaporan * - tarikh tutup lalai: hari/bulan yang dikonfigur JPP, tahun (renewal_year - 1) */ public function buildAttributes(int $renewalYear, ?string $cutOffDate = null): array { $reportingYear = ReportingCycle::reportingYearFor($renewalYear); $cutOffDay = (int) AppSetting::get('default_cut_off_day', 1); $cutOffMonth = (int) AppSetting::get('default_cut_off_month', 12); // Pembaharuan dibuat sebelum/pada 1 Disember tahun sebelum pembaharuan. $defaultCutOff = Carbon::create($renewalYear - 1, $cutOffMonth, $cutOffDay); return [ 'reporting_year' => $reportingYear, 'period_start' => Carbon::create($reportingYear, 1, 1), 'period_end' => Carbon::create($reportingYear, 12, 31), 'cut_off_date' => $cutOffDate ? Carbon::parse($cutOffDate) : $defaultCutOff, 'checklist_template_id' => ChecklistTemplate::activeTemplate()?->id, ]; } }