Commit 8df02275 authored by Mahmoud Aglan's avatar Mahmoud Aglan

T

parent 147fe31e
...@@ -24,7 +24,7 @@ final class PaymentRequestService ...@@ -24,7 +24,7 @@ final class PaymentRequestService
$notes = $data['notes'] ?? null; $notes = $data['notes'] ?? null;
$currency = $data['currency'] ?? 'EGP'; $currency = $data['currency'] ?? 'EGP';
if ($memberId <= 0 && !in_array($paymentType, ['sports_registration', 'hourly_booking'], true)) { if ($memberId <= 0 && !in_array($paymentType, ['sports_registration', 'hourly_booking', 'sa_form_fee', 'sa_subscription'], true)) {
return ['success' => false, 'error' => 'العضو مطلوب']; return ['success' => false, 'error' => 'العضو مطلوب'];
} }
if ($paymentType === '') { if ($paymentType === '') {
......
...@@ -278,7 +278,7 @@ final class RegistrationWizardService ...@@ -278,7 +278,7 @@ final class RegistrationWizardService
$cardFeeRow = $db->selectOne("SELECT config_value FROM system_config WHERE config_key = ?", ['sa.card_fee']); $cardFeeRow = $db->selectOne("SELECT config_value FROM system_config WHERE config_key = ?", ['sa.card_fee']);
$formFeeRow = $db->selectOne("SELECT config_value FROM system_config WHERE config_key = ?", ['sa.form_fee']); $formFeeRow = $db->selectOne("SELECT config_value FROM system_config WHERE config_key = ?", ['sa.form_fee']);
$registrationFee = (float) ($regFeeRow['config_value'] ?? ($playerType === 'member' ? '100.00' : '50.00')); $registrationFee = (float) ($regFeeRow['config_value'] ?? ($playerType === 'member' ? '50.00' : '100.00'));
$cardFee = (float) ($cardFeeRow['config_value'] ?? '25.00'); $cardFee = (float) ($cardFeeRow['config_value'] ?? '25.00');
$formFee = (float) ($formFeeRow['config_value'] ?? '10.00'); $formFee = (float) ($formFeeRow['config_value'] ?? '10.00');
......
...@@ -3,8 +3,8 @@ declare(strict_types=1); ...@@ -3,8 +3,8 @@ declare(strict_types=1);
return function (\App\Core\Database $db): void { return function (\App\Core\Database $db): void {
$configs = [ $configs = [
['sa.registration_fee_member', '100.00', 'رسوم تسجيل النشاط الرياضي - عضو'], ['sa.registration_fee_member', '50.00', 'رسوم تسجيل النشاط الرياضي - عضو'],
['sa.registration_fee_nonmember', '50.00', 'رسوم تسجيل النشاط الرياضي - غير عضو'], ['sa.registration_fee_nonmember', '100.00', 'رسوم تسجيل النشاط الرياضي - غير عضو'],
['sa.card_fee', '25.00', 'رسوم كارت النشاط الرياضي'], ['sa.card_fee', '25.00', 'رسوم كارت النشاط الرياضي'],
['sa.form_fee', '10.00', 'رسوم استمارة النشاط الرياضي'], ['sa.form_fee', '10.00', 'رسوم استمارة النشاط الرياضي'],
['sa.temp_card_days', '7', 'مدة الكارت المؤقت بالأيام'], ['sa.temp_card_days', '7', 'مدة الكارت المؤقت بالأيام'],
......
<?php
declare(strict_types=1);
return [
'up' => "UPDATE system_config SET config_value = '50.00' WHERE config_key = 'sa.registration_fee_member';\nUPDATE system_config SET config_value = '100.00' WHERE config_key = 'sa.registration_fee_nonmember';\nUPDATE sa_registrations SET registration_fee = 100.00, total_fees = 100.00 + card_fee + form_fee WHERE player_type = 'non_member' AND registration_fee = 50.00;\nUPDATE sa_registrations SET registration_fee = 50.00, total_fees = 50.00 + card_fee + form_fee WHERE player_type = 'member' AND registration_fee = 100.00;",
'down' => "UPDATE system_config SET config_value = '100.00' WHERE config_key = 'sa.registration_fee_member';\nUPDATE system_config SET config_value = '50.00' WHERE config_key = 'sa.registration_fee_nonmember';"
];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment