Priview Ballance
|
Debit |
Credit |
Net |
select('nature')->distinct()->where('nature','!=','equity')->where('branch_id',Session::get('user')['branch_id'])->get();
foreach($ln as $rowln){
?>
|
| nature);?> |
select('ledger_account_id')->distinct()->where('branch_id',Session::get('user')['branch_id'])->get();
foreach($methods as $row){
$ledger_id = $row->ledger_account_id;
$acc=DB::table('ledger_accounts')->where('nature',$rowln->nature)->where('id',$ledger_id)->where('branch_id',Session::get('user')['branch_id'])->get();
foreach($acc as $n){
$total_cr = DB::table('general_ledger')->where('how',1)->where('ledger_account_id',$ledger_id)->where('branch_id',Session::get('user')['branch_id'])->sum('total_cr');
$total_dr = DB::table('general_ledger')->where('how',1)->where('ledger_account_id',$ledger_id)->where('branch_id',Session::get('user')['branch_id'])->sum('total_dr');
$total_amount=$total_cr-$total_dr;
$t_cr=$t_cr+$total_cr;
$t_dr=$t_dr+$total_dr;
$t_net=$t_net+$total_amount;
$i++;
if($total_cr==0 & $total_dr==0){
continue;
}
?>
| name);?> |
|
|
|
| TOTAL |
|
|
|
|
| GRAND TOTAL |
|
|
|
Priview Transfered Transactions
| Account Name |
Debit |
Credit |
Net |
select('nature')->distinct()->where('nature','!=','equity')->where('branch_id',Session::get('user')['branch_id'])->get();
?>
|
where('how',1)->orderby('id','desc')->orderby('pair','asc')->where('branch_id',Session::get('user')['branch_id'])->get();
foreach($methods as $row){
$ledger_id = $row->ledger_account_id;
$acc=DB::table('ledger_accounts')->where('id',$ledger_id)->where('branch_id',Session::get('user')['branch_id'])->get();
foreach($acc as $n){
$total_cr = DB::table('general_ledger')->where('how',1)->where('ledger_account_id',$ledger_id)->where('branch_id',Session::get('user')['branch_id'])->sum('total_cr');
$total_dr = DB::table('general_ledger')->where('how',1)->where('ledger_account_id',$ledger_id)->where('branch_id',Session::get('user')['branch_id'])->sum('total_dr');
$total_amount=$total_cr-$total_dr;
$t_cr=$t_cr+$total_cr;
$t_dr=$t_dr+$total_dr;
$t_net=$t_net+$total_amount;
$i++;
if($total_cr==0 & $total_dr==0){
continue;
}
?>
| name);?> |
|
|
|
| TOTAL |
|
|
|
@include('layouts.footer')