Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Clubphp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Clubphp
Commits
6e46794f
Commit
6e46794f
authored
Apr 28, 2026
by
Mahmoud Aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xfjdgthyk
parent
07cfc532
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
77 deletions
+6
-77
ChildController.php
app/Modules/Children/Controllers/ChildController.php
+2
-18
show.php
app/Modules/Members/Views/show.php
+0
-24
SpouseController.php
app/Modules/Spouses/Controllers/SpouseController.php
+2
-17
TemporaryController.php
app/Modules/Temporary/Controllers/TemporaryController.php
+2
-18
No files found.
app/Modules/Children/Controllers/ChildController.php
View file @
6e46794f
...
...
@@ -11,7 +11,7 @@ use App\Core\EventBus;
use
App\Modules\Children\Models\Child
;
use
App\Modules\Children\Services\ChildFeeCalculator
;
use
App\Modules\Members\Services\NationalIdParser
;
use
App\Modules\Cashier\Services\PaymentRequestService
;
class
ChildController
extends
Controller
{
...
...
@@ -159,24 +159,8 @@ class ChildController extends Controller
]);
if
(
$hasFee
)
{
$childLabel
=
$data
[
'gender'
]
===
'male'
?
'ابن'
:
'ابنة'
;
$payResult
=
PaymentRequestService
::
createRequest
([
'member_id'
=>
(
int
)
$memberId
,
'amount'
=>
$totalFee
,
'payment_type'
=>
'addition_fee'
,
'related_entity_type'
=>
'children'
,
'related_entity_id'
=>
(
int
)
$child
->
id
,
'description_ar'
=>
'رسوم إضافة '
.
$childLabel
.
' — '
.
trim
(
$data
[
'full_name_ar'
]),
'notes'
=>
json_encode
([
'fee_breakdown'
=>
$feeCalc
[
'breakdown'
]
??
[]],
JSON_UNESCAPED_UNICODE
),
]);
if
(
$payResult
[
'success'
])
{
return
$this
->
redirect
(
"/members/
{
$memberId
}
"
)
->
withSuccess
(
'تم إضافة الابن/الابنة وإرسال طلب الدفع للخزينة — التصنيف: '
.
$child
->
getClassificationLabel
()
.
' — الرسوم: '
.
money
(
$totalFee
)
.
' — رقم الطلب: '
.
$payResult
[
'request_number'
]);
}
return
$this
->
redirect
(
"/members/
{
$memberId
}
"
)
->
with
Error
(
'تم إضافة الابن/الابنة لكن فشل إنشاء طلب الدفع: '
.
(
$payResult
[
'error'
]
??
''
)
);
->
with
Success
(
'تم إضافة الابن/الابنة — التصنيف: '
.
$child
->
getClassificationLabel
()
.
' — الرسوم: '
.
money
(
$totalFee
)
.
' — سيتم تحصيلها ضمن الفاتورة المجمعة'
);
}
return
$this
->
redirect
(
"/members/
{
$memberId
}
"
)
...
...
app/Modules/Members/Views/show.php
View file @
6e46794f
...
...
@@ -591,14 +591,6 @@ $membershipTypeLabel = $membershipTypeLabels[$member->membership_type ?? 'workin
</td>
<td
style=
"white-space:nowrap;"
>
<a
href=
"/members/
<?=
(
int
)
$member
->
id
?>
/spouses/
<?=
(
int
)
$s
[
'id'
]
?>
"
class=
"btn btn-sm btn-outline"
>
عرض
</a>
<?php
if
(
$s
[
'status'
]
===
'pending_payment'
&&
!
$sInQueue
&&
empty
(
$pendingMembership
)
&&
bccomp
(
$s
[
'addition_fee'
]
??
'0'
,
'0.01'
,
2
)
>=
0
)
:
?>
<form
method=
"POST"
action=
"/members/
<?=
(
int
)
$member
->
id
?>
/pay-addition"
style=
"display:inline;margin:0;"
>
<?=
csrf_field
()
?>
<input
type=
"hidden"
name=
"entity_type"
value=
"spouses"
>
<input
type=
"hidden"
name=
"entity_id"
value=
"
<?=
(
int
)
$s
[
'id'
]
?>
"
>
<button
type=
"submit"
class=
"btn btn-sm"
style=
"background:#D97706;color:#fff;border:none;font-size:11px;"
onclick=
"return confirm('إرسال رسوم
<?=
money
(
$s
[
'addition_fee'
])
?>
للخزينة؟')"
>
📤 خزينة
</button>
</form>
<?php
endif
;
?>
</td>
</tr>
<?php
endforeach
;
?>
...
...
@@ -640,14 +632,6 @@ $membershipTypeLabel = $membershipTypeLabels[$member->membership_type ?? 'workin
</td>
<td
style=
"white-space:nowrap;"
>
<a
href=
"/members/
<?=
(
int
)
$member
->
id
?>
/children/
<?=
(
int
)
$c
[
'id'
]
?>
"
class=
"btn btn-sm btn-outline"
>
عرض
</a>
<?php
if
((
$c
[
'status'
]
??
''
)
===
'pending_payment'
&&
!
$cInQueue
&&
empty
(
$pendingMembership
)
&&
bccomp
(
$c
[
'addition_fee'
]
??
'0'
,
'0.01'
,
2
)
>=
0
)
:
?>
<form
method=
"POST"
action=
"/members/
<?=
(
int
)
$member
->
id
?>
/pay-addition"
style=
"display:inline;margin:0;"
>
<?=
csrf_field
()
?>
<input
type=
"hidden"
name=
"entity_type"
value=
"children"
>
<input
type=
"hidden"
name=
"entity_id"
value=
"
<?=
(
int
)
$c
[
'id'
]
?>
"
>
<button
type=
"submit"
class=
"btn btn-sm"
style=
"background:#D97706;color:#fff;border:none;font-size:11px;"
onclick=
"return confirm('إرسال رسوم
<?=
money
(
$c
[
'addition_fee'
])
?>
للخزينة؟')"
>
📤 خزينة
</button>
</form>
<?php
endif
;
?>
</td>
</tr>
<?php
endforeach
;
?>
...
...
@@ -682,14 +666,6 @@ $membershipTypeLabel = $membershipTypeLabels[$member->membership_type ?? 'workin
</td>
<td
style=
"white-space:nowrap;"
>
<a
href=
"/members/
<?=
(
int
)
$member
->
id
?>
/temporary/
<?=
(
int
)
$t
[
'id'
]
?>
"
class=
"btn btn-sm btn-outline"
>
عرض
</a>
<?php
if
((
$t
[
'status'
]
??
''
)
===
'pending_payment'
&&
!
$tInQueue
&&
empty
(
$pendingMembership
)
&&
bccomp
(
$t
[
'addition_fee'
]
??
'0'
,
'0.01'
,
2
)
>=
0
)
:
?>
<form
method=
"POST"
action=
"/members/
<?=
(
int
)
$member
->
id
?>
/pay-addition"
style=
"display:inline;margin:0;"
>
<?=
csrf_field
()
?>
<input
type=
"hidden"
name=
"entity_type"
value=
"temporary_members"
>
<input
type=
"hidden"
name=
"entity_id"
value=
"
<?=
(
int
)
$t
[
'id'
]
?>
"
>
<button
type=
"submit"
class=
"btn btn-sm"
style=
"background:#D97706;color:#fff;border:none;font-size:11px;"
onclick=
"return confirm('إرسال رسوم
<?=
money
(
$t
[
'addition_fee'
])
?>
للخزينة؟')"
>
📤 خزينة
</button>
</form>
<?php
endif
;
?>
</td>
</tr>
<?php
endforeach
;
?>
...
...
app/Modules/Spouses/Controllers/SpouseController.php
View file @
6e46794f
...
...
@@ -11,7 +11,7 @@ use App\Core\EventBus;
use
App\Modules\Spouses\Models\Spouse
;
use
App\Modules\Spouses\Services\SpouseFeeCalculator
;
use
App\Modules\Members\Services\NationalIdParser
;
use
App\Modules\Cashier\Services\PaymentRequestService
;
class
SpouseController
extends
Controller
{
...
...
@@ -184,23 +184,8 @@ class SpouseController extends Controller
$genderWord
=
$requiredGender
===
'male'
?
'الزوج'
:
'الزوجة'
;
if
(
$hasFee
)
{
$payResult
=
PaymentRequestService
::
createRequest
([
'member_id'
=>
(
int
)
$memberId
,
'amount'
=>
$totalFee
,
'payment_type'
=>
'addition_fee'
,
'related_entity_type'
=>
'spouses'
,
'related_entity_id'
=>
(
int
)
$spouse
->
id
,
'description_ar'
=>
'رسوم إضافة '
.
$genderWord
.
' — '
.
trim
(
$data
[
'full_name_ar'
]),
'notes'
=>
json_encode
([
'fee_breakdown'
=>
$feeCalc
[
'breakdown'
]
??
[]],
JSON_UNESCAPED_UNICODE
),
]);
if
(
$payResult
[
'success'
])
{
return
$this
->
redirect
(
"/members/
{
$memberId
}
"
)
->
withSuccess
(
"تم إضافة
{
$genderWord
}
وإرسال طلب الدفع للخزينة — الرسوم: "
.
money
(
$totalFee
)
.
' — رقم الطلب: '
.
$payResult
[
'request_number'
]);
}
return
$this
->
redirect
(
"/members/
{
$memberId
}
"
)
->
with
Error
(
"تم إضافة
{
$genderWord
}
لكن فشل إنشاء طلب الدفع: "
.
(
$payResult
[
'error'
]
??
''
)
);
->
with
Success
(
"تم إضافة
{
$genderWord
}
— الرسوم: "
.
money
(
$totalFee
)
.
' — سيتم تحصيلها ضمن الفاتورة المجمعة'
);
}
return
$this
->
redirect
(
"/members/
{
$memberId
}
"
)
...
...
app/Modules/Temporary/Controllers/TemporaryController.php
View file @
6e46794f
...
...
@@ -11,7 +11,7 @@ use App\Core\EventBus;
use
App\Modules\Temporary\Models\TemporaryMember
;
use
App\Modules\Temporary\Services\TemporaryFeeCalculator
;
use
App\Modules\Members\Services\NationalIdParser
;
use
App\Modules\Cashier\Services\PaymentRequestService
;
class
TemporaryController
extends
Controller
{
...
...
@@ -163,24 +163,8 @@ class TemporaryController extends Controller
]);
if
(
$hasFee
)
{
$catLabel
=
$temp
->
getCategoryLabel
();
$payResult
=
PaymentRequestService
::
createRequest
([
'member_id'
=>
(
int
)
$memberId
,
'amount'
=>
$totalFee
,
'payment_type'
=>
'addition_fee'
,
'related_entity_type'
=>
'temporary_members'
,
'related_entity_id'
=>
(
int
)
$temp
->
id
,
'description_ar'
=>
'رسوم إضافة عضو مؤقت ('
.
$catLabel
.
') — '
.
trim
(
$data
[
'full_name_ar'
]),
'notes'
=>
json_encode
([
'fee_breakdown'
=>
$feeCalc
[
'breakdown'
]
??
[]],
JSON_UNESCAPED_UNICODE
),
]);
if
(
$payResult
[
'success'
])
{
return
$this
->
redirect
(
"/members/
{
$memberId
}
"
)
->
withSuccess
(
'تم إضافة العضو المؤقت وإرسال طلب الدفع للخزينة — الرسوم: '
.
money
(
$totalFee
)
.
' — رقم الطلب: '
.
$payResult
[
'request_number'
]);
}
return
$this
->
redirect
(
"/members/
{
$memberId
}
"
)
->
with
Error
(
'تم إضافة العضو المؤقت لكن فشل إنشاء طلب الدفع: '
.
(
$payResult
[
'error'
]
??
''
)
);
->
with
Success
(
'تم إضافة العضو المؤقت — الرسوم: '
.
money
(
$totalFee
)
.
' — سيتم تحصيلها ضمن الفاتورة المجمعة'
);
}
return
$this
->
redirect
(
"/members/
{
$memberId
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment