Debit

@foreach($transactions as $key => $value) @php $detail = ''; $PageTitle = ''; $type = ''; $description = ''; if ($value->voucher_type==1): $detail='fdc/viewJournalVoucherDetail'; $PageTitle = 'View Journal Voucher Detail'; $type ='Journal Voucher'; $jvs = DB::Connection('mysql2')->table('new_jvs')->where('jv_no','=',$value->voucher_no)->first(); $description = $jvs->description; endif; if ($value->voucher_type==2): $PayType= DB::Connection('mysql2')->table('new_pv')->where('pv_no',$value->voucher_no)->select('payment_type')->first(); if($PayType->payment_type == 1) { $detail='fdc/viewBankPaymentVoucherDetailInDetail'; } else { $detail='fdc/viewBankPaymentVoucherDetail'; } $PageTitle = 'View Payement Voucher Detail'; CommonHelper::companyDatabaseConnection($company_id); $cheque_data=DB::Connection('mysql2')->table('new_pv')->where('pv_no',$value->voucher_no)->first(); $description = $cheque_data->description ?? ''; $cheque_no=$cheque_data->cheque_no; CommonHelper::reconnectMasterDatabase(); $type ='Payment Voucher'; endif; if ($value->voucher_type==3): $VNo = substr($value->voucher_no, 0, 3); $type='Receipt Voucher'; $description = DB::Connection('mysql2')->table('new_rvs')->where('status',1)->where('rv_no',$value->voucher_no)->select('description')->value('description'); if($VNo == 'crv') { $detail='fdc/viewCashRvDetailNew'; } else { $detail='fdc/viewBankRvDetailNew'; } $PageTitle = 'View Receipt Voucher Detail'; CommonHelper::companyDatabaseConnection($company_id); $cheque_data = DB::Connection('mysql2')->table('rvs')->where('rv_no',$value->voucher_no)->first(); // $description = $cheque_data->description ?? ''; if (isset($cheque_data->cheque_no)): $cheque_no=$cheque_data->cheque_no; else: $cheque_no=''; endif; CommonHelper::reconnectMasterDatabase(); endif; if ($value->voucher_type==4): $detail='fdc/viewPurchaseVoucherDetail'; $PageTitle = 'View Purchase Voucher Detail'; $type='Purchase Invoice'; $pvs =DB::Connection('mysql2')->table('new_purchase_voucher as npv') ->where('npv.pv_no','=',$value->voucher_no) ->first(); $description = $pvs->description; endif; if ($value->voucher_type==5): $detail='pdc/viewPurchaseReturnDetail'; $PageTitle = 'Purchase Return'; $type='Purchase Return'; endif; if ($value->voucher_type==7): $type='Credit Note'; endif; if ($value->voucher_type==6 || $value->voucher_type==8): $detail='sales/viewSalesTaxInvoiceDetail'; $PageTitle = 'Invoice'; $type='Sales Tax Invoice'; $so_data= DB::Connection('mysql2')->table('sales_tax_invoice')->where('status',1)->where('gi_no',$value->voucher_no)->select('id','so_no')->first(); $so=strtoupper($so_data->so_no); endif; if ($value->voucher_type==18 || $value->voucher_type==19): $detail='production/view_cost?order_no='.$value->voucher_no.'&&type=1'; $PageTitle = 'Production'; $type='Production'; endif; if ($value->voucher_type==16 || $value->voucher_type==17): $detail='production/view_plan?order_no='.$value->voucher_no.'&&type=1'; $PageTitle = 'Production'; $type='Production'; endif; $cashFlowHead = Commonhelper::getCashFlowHead($value->cash_flow_head_id); $cashFlowHeadName = $cashFlowHead->name ?? ''; @endphp @if($value->debit_credit == 1) @endif @endforeach
S.No Cash Flow Head Voucher No Voucher Date Voucher Type Amount
{{ $count++ }} {{ $cashFlowHeadName}} {{ $value->voucher_no }} 03-Jul-2026 {{ $type }} {{ $value->amount }}

Credit

@php $count = 1; @endphp
@foreach($transactions as $key => $value) @php $detail = ''; $PageTitle = ''; $type = ''; $description = ''; if ($value->voucher_type==1): $detail='fdc/viewJournalVoucherDetail'; $PageTitle = 'View Journal Voucher Detail'; $type ='Journal Voucher'; $jvs = DB::Connection('mysql2')->table('new_jvs')->where('jv_no','=',$value->voucher_no)->first(); $description = $jvs->description; endif; if ($value->voucher_type==2): $PayType= DB::Connection('mysql2')->table('new_pv')->where('pv_no',$value->voucher_no)->select('payment_type')->first(); if($PayType->payment_type == 1) { $detail='fdc/viewBankPaymentVoucherDetailInDetail'; } else { $detail='fdc/viewBankPaymentVoucherDetail'; } $PageTitle = 'View Payement Voucher Detail'; CommonHelper::companyDatabaseConnection($company_id); $cheque_data=DB::Connection('mysql2')->table('new_pv')->where('pv_no',$value->voucher_no)->first(); $description = $cheque_data->description ?? ''; $cheque_no=$cheque_data->cheque_no; CommonHelper::reconnectMasterDatabase(); $type ='Payment Voucher'; endif; if ($value->voucher_type==3): $VNo = substr($value->voucher_no, 0, 3); $type='Receipt Voucher'; $description = DB::Connection('mysql2')->table('new_rvs')->where('status',1)->where('rv_no',$value->voucher_no)->select('description')->value('description'); if($VNo == 'crv') { $detail='fdc/viewCashRvDetailNew'; } else { $detail='fdc/viewBankRvDetailNew'; } $PageTitle = 'View Receipt Voucher Detail'; CommonHelper::companyDatabaseConnection($company_id); $cheque_data = DB::Connection('mysql2')->table('rvs')->where('rv_no',$value->voucher_no)->first(); // $description = $cheque_data->description ?? ''; if (isset($cheque_data->cheque_no)): $cheque_no=$cheque_data->cheque_no; else: $cheque_no=''; endif; CommonHelper::reconnectMasterDatabase(); endif; if ($value->voucher_type==4): $detail='fdc/viewPurchaseVoucherDetail'; $PageTitle = 'View Purchase Voucher Detail'; $type='Purchase Invoice'; $pvs =DB::Connection('mysql2')->table('new_purchase_voucher as npv') ->where('npv.pv_no','=',$value->voucher_no) ->first(); $description = $pvs->description; endif; if ($value->voucher_type==5): $detail='pdc/viewPurchaseReturnDetail'; $PageTitle = 'Purchase Return'; $type='Purchase Return'; endif; if ($value->voucher_type==7): $type='Credit Note'; endif; if ($value->voucher_type==6 || $value->voucher_type==8): $detail='sales/viewSalesTaxInvoiceDetail'; $PageTitle = 'Invoice'; $type='Sales Tax Invoice'; $so_data= DB::Connection('mysql2')->table('sales_tax_invoice')->where('status',1)->where('gi_no',$value->voucher_no)->select('id','so_no')->first(); $so=strtoupper($so_data->so_no); endif; if ($value->voucher_type==18 || $value->voucher_type==19): $detail='production/view_cost?order_no='.$value->voucher_no.'&&type=1'; $PageTitle = 'Production'; $type='Production'; endif; if ($value->voucher_type==16 || $value->voucher_type==17): $detail='production/view_plan?order_no='.$value->voucher_no.'&&type=1'; $PageTitle = 'Production'; $type='Production'; endif; $cashFlowHead = Commonhelper::getCashFlowHead($value->cash_flow_head_id); $cashFlowHeadName = $cashFlowHead->name ?? ''; @endphp @if($value->debit_credit == 0) @endif @endforeach
S.No Cash Flow Head Voucher No Voucher Date Voucher Type Amount
{{ $count++ }} {{ $cashFlowHeadName }} {{ $value->voucher_no }} 03-Jul-2026 {{ $type }} {{ $value->amount }}