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
8b2afbf2
Commit
8b2afbf2
authored
Apr 15, 2026
by
Mahmoud Aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes Accounting
parent
c0419dbd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
CostCenterController.php
app/Modules/Accounting/Controllers/CostCenterController.php
+3
-3
JournalEntryController.php
...Modules/Accounting/Controllers/JournalEntryController.php
+1
-1
ReportController.php
app/Modules/Accounting/Controllers/ReportController.php
+4
-4
AccountPayable.php
app/Modules/Accounting/Models/AccountPayable.php
+1
-1
FinancialReportService.php
app/Modules/Accounting/Services/FinancialReportService.php
+1
-1
No files found.
app/Modules/Accounting/Controllers/CostCenterController.php
View file @
8b2afbf2
...
...
@@ -21,7 +21,7 @@ class CostCenterController extends Controller
// Fetch branch names
$db
=
App
::
getInstance
()
->
db
();
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
rchived = 0
ORDER BY name_ar"
);
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
ctive = 1
ORDER BY name_ar"
);
return
$this
->
view
(
'Accounting/Views/cost_centers/index'
,
[
'centers'
=>
$centers
,
...
...
@@ -34,7 +34,7 @@ class CostCenterController extends Controller
$this
->
authorize
(
'accounting.cost_center.manage'
);
$db
=
App
::
getInstance
()
->
db
();
$branches
=
$db
->
select
(
"SELECT id, name_ar, name_en FROM branches WHERE is_a
rchived = 0
ORDER BY name_ar"
);
$branches
=
$db
->
select
(
"SELECT id, name_ar, name_en FROM branches WHERE is_a
ctive = 1
ORDER BY name_ar"
);
$parents
=
CostCenter
::
query
()
->
where
(
'is_archived'
,
'='
,
0
)
...
...
@@ -87,7 +87,7 @@ class CostCenterController extends Controller
$center
=
CostCenter
::
findOrFail
(
$id
);
$db
=
App
::
getInstance
()
->
db
();
$branches
=
$db
->
select
(
"SELECT id, name_ar, name_en FROM branches WHERE is_a
rchived = 0
ORDER BY name_ar"
);
$branches
=
$db
->
select
(
"SELECT id, name_ar, name_en FROM branches WHERE is_a
ctive = 1
ORDER BY name_ar"
);
$parents
=
CostCenter
::
query
()
->
where
(
'is_archived'
,
'='
,
0
)
...
...
app/Modules/Accounting/Controllers/JournalEntryController.php
View file @
8b2afbf2
...
...
@@ -55,7 +55,7 @@ class JournalEntryController extends Controller
$currentFY
=
FiscalYear
::
current
();
$db
=
App
::
getInstance
()
->
db
();
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
rchived = 0
ORDER BY name_ar"
);
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
ctive = 1
ORDER BY name_ar"
);
return
$this
->
view
(
'Accounting/Views/journal_entries/create'
,
[
'accounts'
=>
$accounts
,
...
...
app/Modules/Accounting/Controllers/ReportController.php
View file @
8b2afbf2
...
...
@@ -63,7 +63,7 @@ class ReportController extends Controller
$costCenters
=
CostCenter
::
getActive
();
$db
=
App
::
getInstance
()
->
db
();
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
rchived = 0
ORDER BY name_ar"
);
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
ctive = 1
ORDER BY name_ar"
);
return
$this
->
view
(
'Accounting/Views/reports/trial_balance'
,
[
'result'
=>
$result
,
...
...
@@ -96,7 +96,7 @@ class ReportController extends Controller
$costCenters
=
CostCenter
::
getActive
();
$db
=
App
::
getInstance
()
->
db
();
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
rchived = 0
ORDER BY name_ar"
);
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
ctive = 1
ORDER BY name_ar"
);
return
$this
->
view
(
'Accounting/Views/reports/general_ledger'
,
[
'ledger'
=>
$ledger
,
...
...
@@ -126,7 +126,7 @@ class ReportController extends Controller
$costCenters
=
CostCenter
::
getActive
();
$db
=
App
::
getInstance
()
->
db
();
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
rchived = 0
ORDER BY name_ar"
);
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
ctive = 1
ORDER BY name_ar"
);
return
$this
->
view
(
'Accounting/Views/reports/income_statement'
,
[
'result'
=>
$result
,
...
...
@@ -153,7 +153,7 @@ class ReportController extends Controller
$costCenters
=
CostCenter
::
getActive
();
$db
=
App
::
getInstance
()
->
db
();
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
rchived = 0
ORDER BY name_ar"
);
$branches
=
$db
->
select
(
"SELECT id, name_ar FROM branches WHERE is_a
ctive = 1
ORDER BY name_ar"
);
return
$this
->
view
(
'Accounting/Views/reports/balance_sheet'
,
[
'result'
=>
$result
,
...
...
app/Modules/Accounting/Models/AccountPayable.php
View file @
8b2afbf2
...
...
@@ -30,7 +30,7 @@ class AccountPayable extends Model
}
return
$db
->
select
(
"SELECT ap.*, s.name as supplier_name
"SELECT ap.*, s.name
_ar
as supplier_name
FROM accounts_payable ap
LEFT JOIN suppliers s ON s.id = ap.supplier_id
WHERE
{
$where
}
...
...
app/Modules/Accounting/Services/FinancialReportService.php
View file @
8b2afbf2
...
...
@@ -211,7 +211,7 @@ final class FinancialReportService
public
static
function
getConsolidatedBalanceSheet
(
string
$asOfDate
)
:
array
{
$db
=
App
::
getInstance
()
->
db
();
$branches
=
$db
->
select
(
"SELECT id, name_ar, name_en FROM branches WHERE is_a
rchived = 0
ORDER BY id"
);
$branches
=
$db
->
select
(
"SELECT id, name_ar, name_en FROM branches WHERE is_a
ctive = 1
ORDER BY id"
);
$branchSheets
=
[];
foreach
(
$branches
as
$branch
)
{
...
...
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