mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
uncomment and log to specific file for booking expired command
This commit is contained in:
@@ -62,14 +62,14 @@ class ExpiredBookingCommand extends Command
|
||||
|
||||
foreach ($bookings as $booking) {
|
||||
$this->updatesBookingStatus->execute($booking, ApprovalStatus::EXPIRED);
|
||||
Log::info("Expired Booking without payment & purchase order, booking id: " . $booking->id);
|
||||
$this->info("Expired Booking without payment & purchase order, booking id: " . $booking->id);
|
||||
$transactions = $booking->transactions;
|
||||
|
||||
foreach ($transactions as $transaction) {
|
||||
$prevStatus = $transaction->status;
|
||||
$transaction->status = ApprovalStatus::EXPIRED;
|
||||
$transaction->save();
|
||||
Log::info("Expired Transaction id: {$transaction->id} from Booking id: {$booking->id}. Status before update: {$prevStatus}");
|
||||
$this->info("Expired Transaction id: {$transaction->id} from Booking id: {$booking->id}. Status before update: {$prevStatus}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,14 +86,14 @@ class ExpiredBookingCommand extends Command
|
||||
|
||||
foreach ($bookings as $booking) {
|
||||
$this->updatesBookingStatus->execute($booking, ApprovalStatus::EXPIRED);
|
||||
Log::info("Expired Booking without payment but with purchase order, booking id: " . $booking->id);
|
||||
$this->info("Expired Booking without payment but with purchase order, booking id: " . $booking->id);
|
||||
$transactions = $booking->transactions;
|
||||
|
||||
foreach ($transactions as $transaction) {
|
||||
$prevStatus = $transaction->status;
|
||||
$transaction->status = ApprovalStatus::EXPIRED;
|
||||
$transaction->save();
|
||||
Log::info("Expired Transaction id: {$transaction->id} from Booking id: {$booking->id}. Status before update: {$prevStatus}");
|
||||
$this->info("Expired Transaction id: {$transaction->id} from Booking id: {$booking->id}. Status before update: {$prevStatus}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,9 +44,10 @@ class Kernel extends ConsoleKernel
|
||||
->appendOutputTo(storage_path().'/logs/delete-bulk-download-files.log')
|
||||
->withoutOverlapping();
|
||||
|
||||
// $schedule->command('booking:expired')
|
||||
// ->dailyAt('02:00')
|
||||
// ->withoutOverlapping();
|
||||
$schedule->command('booking:expired')
|
||||
->dailyAt('02:00')
|
||||
->appendOutputTo(storage_path().'/logs/expire-booking.log')
|
||||
->withoutOverlapping();
|
||||
|
||||
// $schedule->command('purchaseOrder:autoFill')
|
||||
// ->dailyAt('03:00')
|
||||
|
||||
Reference in New Issue
Block a user