fix get current year

This commit is contained in:
arifal
2025-08-20 00:34:26 +07:00
parent 0a9d9071e4
commit e18c0cb3b6
5 changed files with 7 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ class SyncDashboardPbg extends Command
]);
try {
BigdataResume::generateResumeData($import_datasource->id, now()->year(), "simbg");
BigdataResume::generateResumeData($import_datasource->id, date('Y'), "simbg");
$import_datasource->update([
'status' => 'success',

View File

@@ -46,7 +46,7 @@ class RetrySyncronizeJob implements ShouldQueue
throw $e;
}
BigdataResume::generateResumeData($failed_import->id, now()->year(), "simbg");
BigdataResume::generateResumeData($failed_import->id, date('Y'), "simbg");
$failed_import->update([
'status' => ImportDatasourceStatus::Success->value,

View File

@@ -144,7 +144,7 @@ class ScrapingDataJob implements ShouldQueue
Log::info("=== STEP 4: GENERATING BIGDATA RESUME ===");
$import_datasource->update(['message' => 'Generating BigData resume...']);
BigdataResume::generateResumeData($import_datasource->id, now()->year(), "simbg");
BigdataResume::generateResumeData($import_datasource->id, date('Y'), "simbg");
Log::info("BigData resume generated successfully");

View File

@@ -263,7 +263,7 @@ class ServiceGoogleSheet
$result = [];
foreach ($sections as $key => $identifier) {
$values = $this->get_values_from_section($identifier, [10, 11], 8);
$values = $this->get_values_from_section($identifier, [10, 11], 9);
if (!empty($values)) {
$result[$key] = [
@@ -276,7 +276,7 @@ class ServiceGoogleSheet
BigdataResume::create([
'import_datasource_id' => $import_datasource->id,
'year' => now()->year(),
'year' => date('Y'),
'resume_type' => 'leader',
// USAHA
'business_count' => $this->convertToInteger($result['USAHA']['total'] ?? null) ?? 0,
@@ -378,7 +378,7 @@ class ServiceGoogleSheet
$result = [];
foreach ($sections as $key => $identifier) {
$values = $this->get_values_from_section($identifier, [10, 11], 8);
$values = $this->get_values_from_section($identifier, [10, 11], 9);
if (!empty($values)) {
$result[$key] = [

View File

@@ -421,7 +421,7 @@ class ServiceSIMBG
}
}
BigdataResume::generateResumeData($importDatasource->id, now()->year(), "simbg");
BigdataResume::generateResumeData($importDatasource->id, date('Y'), "simbg");
// Final update after processing all pages
$importDatasource->update([