Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
middleware('auth'); } public function general_ledger(Request $request){ $general_ledger = DB::table('general_ledger')->where('branch_id',Session::get('user')['branch_id'])->get(); return view('/pages/general_ledger')->with('general_ledger',$general_ledger); } public function ledger_account_groups(Request $request){ return view('/pages/ledger_account_groups'); } public function register_ledger_account(Request $request){ return view('/pages/register_ledger_account'); } public function assign_ledger_account(Request $request){ return view('/pages/assign_ledger_account'); } public function income_statement(Request $request){ $general_ledger = DB::table('general_ledger')->where('branch_id',Session::get('user')['branch_id'])->get(); return view('/pages/income_statement')->with('general_ledger',$general_ledger); } public function dividends(Request $request){ $general_ledger = DB::table('general_ledger')->where('branch_id',Session::get('user')['branch_id'])->get(); return view('/pages/dividends')->with('general_ledger',$general_ledger); } public function post_general_ledger(Request $request){ return redirect('/accounting/general_ledger?f='. $request->from.'&t='. $request->to); } public function post_balance_sheet(Request $request){ return redirect('/accounting/balance_sheet?f='. $request->from.'&t='. $request->to); } public function balance_sheet(Request $request){ $lastDate = app('App\Http\Controllers\Settings')->load_equity(); $general_ledger = DB::table('general_ledger')->where('branch_id',Session::get('user')['branch_id'])->get(); return view('/pages/balance_sheet')->with('general_ledger', $general_ledger); } public function cash_flow_accumulated(){ $year = '%'.date('Y').'%'; $data = DB::table('repaymentschedule') ->where('branch_id',Session::get('user')['branch_id']) ->where('date', 'like', $year) ->select( DB::raw('SUM(principal) as principal'), DB::raw('SUM(principal_paid) as principal_paid'), DB::raw('SUM(interest) as interest'), DB::raw('SUM(interest_paid) as interest_paid'), DB::raw('SUM(fee) as fee'), DB::raw('SUM(fee_paid) as fee_paid'), DB::raw('SUM(penalty) as penalty'), DB::raw('SUM(penalty_paid) as penalty_paid'), DB::raw('SUM(amount) as amount'), DB::raw('SUM(overdue) as overdue') ) ->get(); $savings = DB::table('savingtransactions') ->where('branch_id',Session::get('user')['branch_id']) ->where('date', 'like', $year) ->select(DB::raw('SUM(amount) as amount'),'type') ->groupBy('type') ->get(); return View('pages.cash_flow_accumulated')->with('receipts',$data)->with('savings',$savings); } public function subgroups(Request $request){ ?>
visible=='equity'){ $nature='equity'; } $data =array( 'branch_id'=>Session::get('user')['branch_id'], 'account_number'=>$request->account_number, 'name'=>$request->name, 'nature'=>$nature, 'bank'=>0, 'visible'=>$request->visible, 'registered_by'=>Auth::id(), 'date'=>date('Y-m-d'), ); DB::table('ledger_accounts')->insert($data); return redirect('accounting/register_ledger_account?sents'); } public function insert_ledger_accounts(Request $request){ $data =array( 'branch_id'=>Session::get('user')['branch_id'], 'account_number'=>$request->account_number, 'name'=>$request->name, 'nature'=>$request->nature, 'bank'=>$request->bank_id, 'registered_by'=>Auth::id(), 'date'=>date('Y-m-d'), ); DB::table('ledger_accounts')->insert($data); return redirect('accounting/register_ledger_account?sents'); } public function insert_account_group(Request $request){ $data =array( 'branch_id'=>Session::get('user')['branch_id'], 'account_number'=>$request->account_number, 'name'=>$request->name, 'nature'=>$request->nature, 'registered_by'=>Auth::id(), 'date'=>date('Y-m-d'), ); DB::table('ledger_account_groups')->insert($data); return redirect('accounting/ledger_account_groups?sent'); } public function delete_ledger_account(Request $request){ DB::table('ledger_accounts')->where('id',$request->id)->where('visible',null)->delete(); return redirect('accounting/register_ledger_account'); } public function insert_sub_account_group(Request $request){ $g=explode('|',$request->group); $group=$g[0]; $nature=$g[1]; $data =array( 'branch_id'=>Session::get('user')['branch_id'], 'account_number'=>$request->account_number, 'group_id'=>$group, 'name'=>$request->name, 'nature'=>$nature, 'registered_by'=>Auth::id(), 'date'=>date('Y-m-d'), ); DB::table('ledger_account_sub_groups')->insert($data); return redirect('accounting/ledger_account_groups?sents'); } public function cash_flow_accumulated_search(Request $request){ $from = $request->from; $to = $request->to; $year = date('Y').'%'; $receipts = DB::table('repaymentschedule') ->where('branch_id',Session::get('user')['branch_id']) ->where('date', 'like', $year) ->where('dueDate','>=',$from) ->where('dueDate','<=',$to) ->select( DB::raw('SUM(principal) as principal'), DB::raw('SUM(principal_paid) as principal_paid'), DB::raw('SUM(interest) as interest'), DB::raw('SUM(interest_paid) as interest_paid'), DB::raw('SUM(fee) as fee'), DB::raw('SUM(fee_paid) as fee_paid'), DB::raw('SUM(penalty) as penalty'), DB::raw('SUM(penalty_paid) as penalty_paid'), DB::raw('SUM(amount) as amount'), DB::raw('SUM(overdue) as overdue') ) ->get(); $savings = DB::table('savingtransactions') ->where('branch_id',Session::get('user')['branch_id']) ->where('date', 'like', $year) ->where('date','>=',$from) ->where('date','<=',$to) ->select(DB::raw('SUM(amount) as amount'),'type') ->groupBy('type') ->get(); ?>
Cash flow Accumulated From
type == 'deposit'){ $saving_deposits = $save->amount; }else if($save->type == 'fee'){ $saving_fee = $save->amount; }else if($save->type == 'interest'){ $saving_interest = $save->amount; }else if($save->type == 'withdrawal'){ $saving_withdrawal = $save->amount; } } ## Getting the capital from shareholders $cap = DB::table('shareholders')->select(DB::raw('SUM(amount) as amount'))->where('date','<=',$to)->where('date','like',date('Y').'%')->where('branch_id',Session::get('user')['branch_id'])->get(); foreach($cap as $am){ $capital = $am->amount; } ## Getting the expenses $cap = DB::table('expenses')->select(DB::raw('SUM(amount) as amount'))->where('expenseDate','<=',$to)->where('expenseDate','like',date('Y').'%')->where('branch_id',Session::get('user')['branch_id'])->get(); foreach($cap as $am){ $expenses = $am->amount; } ## Getting other income $cap = DB::table('incomes')->select(DB::raw('SUM(amount) as amount'))->where('transactionDate','<=',$to)->where('transactionDate','like',date('Y').'%')->where('branch_id',Session::get('user')['branch_id'])->get(); foreach($cap as $am){ $income = $am->amount; } foreach($receipts as $results){ $principal = round(($income+$saving_fee+$saving_deposits+$results->fee_paid+$results->penalty_paid+$results->principal_paid+$results->interest_paid + $capital),2); ?> where('branch_id',Session::get('user')['branch_id']) ->where('loanReleaseDate','like',date('Y').'%') ->where('loanReleaseDate','<=',$to) ->select(DB::raw('SUM(principalAmount) as principal')) ->get(); foreach($loans as $loan){ $principalAmount = $loan->principal; } ?>
Balance TZS
Receipts
Capital
Loan Principal Repayments principal_paid); ?>
Loan Interest Repayments interest_paid); ?>
Loan Penalty Repayments penalty_paid); ?>
Loan Fees Repayments fee_paid); ?>
Savings Deposits
Savings Fees
Savings Commissions
Savings Transfer In
Other Income
Total Receipts (A)
Payments
Expenses
Loans Released (Principal)
Savings Withdrawals
Savings Transfer Out
Total Payments (B)
Total Cash Balance (A) - (B)