add column full pbg task payments
This commit is contained in:
@@ -19,7 +19,7 @@ class SyncPbgTaskPayments extends Command
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Sync PBG task payments from Google Sheets REALISASI PAD';
|
||||
protected $description = 'Sync PBG task payments from Google Sheets Sheet Data';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
@@ -42,36 +42,13 @@ class SyncPbgTaskPayments extends Command
|
||||
$this->newLine();
|
||||
|
||||
$this->table(
|
||||
['Metric', 'Count'],
|
||||
['Metric', 'Value'],
|
||||
[
|
||||
['Total rows processed', $result['total_rows']],
|
||||
['Successful syncs', $result['successful_syncs']],
|
||||
['Failed syncs', $result['failed_syncs']],
|
||||
['Tasks not found', $result['not_found_tasks']],
|
||||
['Inserted rows', $result['inserted'] ?? 0],
|
||||
['Success', ($result['success'] ?? false) ? 'Yes' : 'No'],
|
||||
]
|
||||
);
|
||||
|
||||
// Show success rate
|
||||
$success_rate = $result['total_rows'] > 0
|
||||
? round(($result['successful_syncs'] / $result['total_rows']) * 100, 2)
|
||||
: 0;
|
||||
|
||||
$this->info("📈 Success rate: {$success_rate}%");
|
||||
|
||||
// Show errors if any
|
||||
if (!empty($result['errors'])) {
|
||||
$this->newLine();
|
||||
$this->warn('⚠️ Errors encountered:');
|
||||
foreach (array_slice($result['errors'], 0, 5) as $error) {
|
||||
$this->line(" Row {$error['row']} ({$error['registration_number']}): {$error['error']}");
|
||||
}
|
||||
|
||||
if (count($result['errors']) > 5) {
|
||||
$remaining = count($result['errors']) - 5;
|
||||
$this->line(" ... and {$remaining} more errors (check logs for details)");
|
||||
}
|
||||
}
|
||||
|
||||
$this->newLine();
|
||||
$this->info('📝 Check Laravel logs for detailed information.');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user