diff --git a/app/Nova/Actions/MakePaymentNovaVisaMaster.php b/app/Nova/Actions/MakePaymentNovaVisaMaster.php index 60309ad..bb5ebcb 100644 --- a/app/Nova/Actions/MakePaymentNovaVisaMaster.php +++ b/app/Nova/Actions/MakePaymentNovaVisaMaster.php @@ -70,7 +70,7 @@ class MakePaymentNovaVisaMaster extends Action ]); } - if ($this->canAcceptPayment($today)) { + if (! $this->canAcceptPayment($today)) { return Action::modal('modal-response', [ 'title' => 'Bu gun aýyn sonky guni!', 'body' => 'Ayyn sonky guni toleg alynmayar.', @@ -264,6 +264,7 @@ class MakePaymentNovaVisaMaster extends Action // Condition 1: Check if today is the last day of the month if ($today->format('Y-m-d') === $lastDay->format('Y-m-d')) { + info('check 1'); return false; } @@ -274,12 +275,14 @@ class MakePaymentNovaVisaMaster extends Action if ($lastDayOfWeek === 'Sunday') { $forbiddenDays = ['Friday', 'Saturday', 'Sunday']; if (in_array($today->format('l'), $forbiddenDays)) { + info('check 2'); return false; } } // Condition 3: If the last day is Saturday, disallow Friday if ($lastDayOfWeek === 'Saturday' && $today->format('l') === 'Friday') { + info('check 3'); return false; }