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
6d44324b
Commit
6d44324b
authored
Apr 18, 2026
by
Mahmoud Aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kokowawa
parent
6291dcf2
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
175 additions
and
37 deletions
+175
-37
AccountingIntegrationService.php
...ules/Accounting/Services/AccountingIntegrationService.php
+57
-37
Phase_36_001_seed_expanded_chart_of_accounts.php
...se/seeds/Phase_36_001_seed_expanded_chart_of_accounts.php
+118
-0
No files found.
app/Modules/Accounting/Services/AccountingIntegrationService.php
View file @
6d44324b
...
...
@@ -64,30 +64,49 @@ final class AccountingIntegrationService
};
// Determine credit account (revenue type)
// Uses granular sub-accounts (4110+) with fallback to legacy accounts (4101+)
$creditAccountCode
=
match
(
$type
)
{
'form_fee'
=>
'4110'
,
// Form Fee Revenue
'membership_fee'
=>
'4111'
,
// Membership Value Revenue
'addition_fee'
=>
'4112'
,
// Dependent Addition Revenue
'separation_fee'
=>
'4120'
,
// Separation Fee Revenue
'divorce_fee'
=>
'4121'
,
// Divorce Fee Revenue
'death_fee'
=>
'4122'
,
// Death Transfer Fee Revenue
'waiver_fee'
=>
'4123'
,
// Waiver Fee Revenue
'sports_conversion'
=>
'4124'
,
// Sports Conversion Revenue
'seasonal_fee'
=>
'4130'
,
// Seasonal Membership Revenue
'carnet_replacement'
=>
'4131'
,
// Carnet Replacement Revenue
'annual_subscription'
=>
'4140'
,
// Annual Subscription Revenue
'development_fee'
=>
'4141'
,
// Development Fee Revenue
'activity_subscription'
=>
'4150'
,
// Activity Subscription Revenue
'down_payment'
=>
'1103'
,
// Accounts Receivable (reducing AR)
'installment'
=>
'1103'
,
// Accounts Receivable (reducing AR)
'fine'
=>
'4104'
,
// Fine Revenue
'inventory_sale'
=>
'4103'
,
// Sales Revenue
default
=>
'4105'
,
// Service Revenue (catch-all)
};
// Fallback: if the granular account doesn't exist yet, use legacy grouping
$creditAccount
=
self
::
getAccountByCode
(
$creditAccountCode
);
if
(
!
$creditAccount
)
{
$fallbackCode
=
match
(
$type
)
{
'form_fee'
,
'membership_fee'
,
'addition_fee'
,
'separation_fee'
,
'divorce_fee'
,
'death_fee'
,
'waiver_fee'
,
'sports_conversion'
,
'carnet_replacement'
,
'seasonal_fee'
=>
'4101'
,
// Membership Revenue
=>
'4101'
,
// Membership Revenue (legacy)
'annual_subscription'
,
'development_fee'
=>
'4102'
,
// Subscription Revenue
'down_payment'
,
'installment'
=>
'1103'
,
// Accounts Receivable (reducing AR)
'fine'
=>
'4104'
,
// Fine Revenue
'inventory_sale'
=>
'4103'
,
// Sales Revenue
default
=>
'4105'
,
// Service Revenue
=>
'4102'
,
// Subscription Revenue (legacy)
'activity_subscription'
=>
'4105'
,
// Service Revenue (legacy)
default
=>
null
,
};
if
(
$fallbackCode
)
{
$creditAccountCode
=
$fallbackCode
;
$creditAccount
=
self
::
getAccountByCode
(
$creditAccountCode
);
}
}
$debitAccount
=
self
::
getAccountByCode
(
$debitAccountCode
);
$creditAccount
=
self
::
getAccountByCode
(
$creditAccountCode
);
if
(
!
$debitAccount
||
!
$creditAccount
)
{
Logger
::
error
(
"Accounting auto-post failed: account not found"
,
[
...
...
@@ -1214,6 +1233,7 @@ final class AccountingIntegrationService
'seasonal_fee'
=>
'رسوم عضوية موسمية'
,
'sports_conversion'
=>
'رسوم تحويل رياضي'
,
'inventory_sale'
=>
'مبيعات مخزون'
,
'activity_subscription'
=>
'اشتراك نشاط'
,
default
=>
$type
,
};
}
...
...
database/seeds/Phase_36_001_seed_expanded_chart_of_accounts.php
0 → 100644
View file @
6d44324b
This diff is collapsed.
Click to expand it.
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