IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/resources/views/schools/north/transaction/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/resources/views/schools/north/transaction/daycollpdf.blade.php

<!DOCTYPE html>
<html>
    <head>
        <!-- <meta charset="utf-8"> -->
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>School MIS</title>
        <!-- Tell the browser to be responsive to screen width -->
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <style type="text/css">
            @page {
                header: page-header;
                footer: page-footer;
                margin-top: 100pt;
                margin-bottom: 10px;
            }
            @page { sheet-size: A4-L; }
            section{

            }
            body {
                font-family: 'examplefont', sans-serif;
                font-size: 13px;
            }	
           
        </style>
    </head>

    <body>
        <htmlpageheader name="page-header" >
            <table class="table">
                <tbody>
                    <tr>
                        <th style="vertical-align: middle;text-align: center; width: 30%; padding: 0px; "><img src="{{ asset('storage/schools/'.$school->idSchool.'/'.$school->schoolLogo)}}" height="90" width="90"></th>
                        <td style="vertical-align: middle;text-align: center; width: 36%; padding: 0px; ">
                            <strong>{{$school->schoolName}}</strong><br>
                            {{$school->street}} {{$school->landmark}} {{$school->subArea}} {{$school->area}} <br>
                            {{$school->city}}  {{$school->state->stateName}}<br>
                            <strong>Contact No : {{$school->mobile}}</strong><br>
                            <strong>Email : {{$school->email}}</strong><br>
                        </td>
                    </tr>
                </tbody>
            </table>
        </htmlpageheader>
        <section>
            <div class="content">
              <div style="page-break-inside:avoid">
                <table border="1" style="width:100% ;border-collapse: collapse;overflow: wrap;">
                    <thead>
                        <tr>
                            <th>Ec No.</th>
                            <th>Name</th>
                            <th>Class</th>
                            @foreach($feeheads as $var)
                            <th>{{$var->headerName}}</th>
                            @endforeach
                            <th>Fine</th>
                            <th>Total</th>
                            <th>Discount</th>
                            <th>Net</th>
                            <th>Receipt No</th>
                        </tr>
                    </thead>
                    <tbody>
                       <?php 
                        $i=0;$pagetotal =[];
                        $page_netamt = 0;$page_fine = 0;$page_total=0;$page_discount=0; 
                        $netamt = 0;$netfine = 0;$nettotal=0;$netdiscount=0; 
                       foreach($feeheads as $var)
                           array_push($pagetotal,0);
                       ?>
                        @foreach($transactions as $t)
                        <?php $i++; ?>
                        <tr>
                            <td>{{$t->ecNo}}</td>
                            <td>{{$t->Name}}</td>
                            <td>{{$t->class}} {{$t->section}}</td>
                            <?php $j=0;?>
                            @foreach($feeheads as $var)
                            <td>
                                <?php 
                                    $fd = \App\DailyTransactionDetail::where('idDailyTransaction','=',$t->idDailyTransaction)
                                        ->where('headerName','=',$var->headerName)
                                        ->select(DB::raw('SUM(dailytransaction_details.amountPaid) AS amountPaid'))
                                        ->first();
                                if(isset($fd)){
                                 if(is_scalar($pagetotal[$j]))
                                   $pagetotal[$j] =$pagetotal[$j]+ $fd->amountPaid;
                                }
                                 $j++;
                                ?>
                                @if($fd!=null)
                                {{$fd->amountPaid}}
                                @endif
                                
                            </td>
                            @endforeach
                            <td>
                                {{$t->totalFine}}
                                 <?php $page_fine = $page_fine + $t->totalFine;
                                        $netfine = $netfine + $t->totalFine;?>
                            </td>
                            <td>
                                {{$t->totalfeePaid }}
                                <?php $page_total = $page_total + $t->totalfeePaid;
                                $nettotal = $nettotal + $t->totalfeePaid;?>
                            </td>
                            <td>
                                {{$t->totalDiscount}}
                                <?php $page_discount = $page_discount + $t->totalDiscount;
                                $netdiscount = $netdiscount + $t->totalDiscount;?>
                            </td>
                            <td>
                                {{$t->netAmount}}
                                <?php $page_netamt = $page_netamt + $t->netAmount;
                                $netamt = $netamt + $t->netAmount;?>
                            </td>
                            <td>{{$t->receiptNo}}</td>
                        </tr>
                        @if($i%20 == '0')
                        
                        <tr>
                            <th></th>
                            <th></th>
                            <th>Page Total:</th>
                            <?php $j=0; 
                            foreach($feeheads as $var){
                            if(isset($pagetotal[$j]))
                                echo '<th>'.$pagetotal[$j].'</th>';
                            $j++;
                            }
                            ?>
                            <th>{{$page_fine}}</th>
                            <th>{{$page_total}}</th>
                            <th>{{$page_discount}}</th>
                            <th>{{$page_netamt}}</th>
                            <th></th>
                        </tr>
                        <tr>
                            
                            <th colspan="{{count($feeheads)+8}}">Page Total:{{$page_netamt}}</th>
                            
                        </tr>
                        <?php $pagetotal =[]; $page_netamt = 0;$page_fine = 0;$page_total=0;$page_discount=0;
                       foreach($feeheads as $var)
                           array_push($pagetotal,0);?>
                        @endif
                        @endforeach
                        
                    </tbody>
                    <tfoot>
                         <tr>
                            <th></th>
                            <th></th>
                            <th>Exemption:</th>
                            @foreach($feeheads as $var)
                            <th>{{$var->discountTotalFeehead}}</th>
                            @endforeach
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                        </tr>
                        <tr>
                            <th></th>
                            <th></th>
                            <th>Total:</th>
                            @foreach($feeheads as $var)
                            <th>{{$var->feeheadPaidTotal}}</th>
                            @endforeach
                            <th>{{$netfine}}</th>
                            <th>{{$nettotal}}</th>
                            <th>{{$netdiscount}}</th>
                            <th>{{$netamt}}</th>
                            <th></th>
                        </tr>
                        <tr>
                               <th colspan="{{count($feeheads)+8}}">Grand Total:{{$netamt}}</th>
                        </tr>
                    </tfoot>
                </table>
              </div>
            </div>
        </section>
    <htmlpagefooter name="page-footer" >
        <p style="text-align: center;padding-top: 5px;padding-bottom: 0px;font-size: 12px;"><strong>Page No : {PAGENO} Created On : {DATE j-m-Y} ; Report Date : {{ \Carbon\Carbon::parse($todaydate)->format('d-m-Y')}}</strong></p>
    </htmlpagefooter>

</body>
</html>

Copyright © 2021 - 2025 IMMREX7