wip
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user