IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/resources/views/schools/stock/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/resources/views/schools/stock/collection_report.blade.php

@extends('schools.school_layout')

@section('content')

<div class="row clearfix">

    <div class="col-lg-12 col-md-12 col-sm-12">

        <!--<div class="card">-->

        <div class="body">

            <button class="btn btn-raised btn-warning btn-round waves-effect" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">Advance Search</button>

            <div class="collapse" id="collapseExample">

                <div class="well">

                    <div class="row clearfix">

                        <div class="col-lg-12 col-md-12 col-sm-12">

                            <div class="card">

                                <div class="header">

                                    <h2><strong>Collection Report</strong></h2>

                                </div>

                                <div class="body">

                                    {!! Form::open(['method' => 'GET',  'action' => ['School\Stock\StockReportController@collectionReport'], 'class' => 'form-horizontal']) !!}

                                    <div class="row clearfix">

                                        <div class="col-sm-2 form-control-label">

                                            <label for="classname">From Date</label>

                                        </div>

                                        <div class="col-sm-3">

                                            <div class="form-group">

                                                {!! Form::text('fromDate',null,['class' => 'form-control datepicker']) !!}

                                            </div>

                                        </div>

                                        <div class="col-sm-2 form-control-label">

                                            <label for="classname">To Date</label>

                                        </div>

                                        <div class="col-sm-3">

                                            <div class="form-group">

                                                {!! Form::text('toDate',null,['class' => 'form-control datepicker']) !!}

                                            </div>

                                        </div>

                                    </div>

                                    <div class="row clearfix">

                                        <div class="col-sm-8 offset-sm-2">

                                            {!! Form::submit('Search',['class' => 'btn btn-raised btn-primary btn-round waves-effect']) !!}

                                            {!! Form::close() !!} 

                                        </div>

                                    </div>

                                </div>

                            </div>

                        </div>

                    </div>

                </div>

            </div>

        </div>

        <!--</div>-->

    </div>

</div>

<div class="row clearfix">

    <div class="col-sm-12">

        <div class="card">

            <div class="header">

                <h2><strong>Collection Report</strong></h2>

            </div>

            <div class="body table-responsive">

                <table class="table table-bordered table-striped table-hover" id="js-inventory">

                    <thead>

                        <tr>
                            <th>Invoice Date</th>

                            <th>Invoice No</th>

                            <th>Name</th>

                            <th>Ec No.</th>

                            <th>Invoice Amount</th>

                            <th>Item Quantity</th>

                            <th>Receipt Number</th>

                            <th>Receipt Date</th>

                            <th>Receipt Amount</th>

                            <th>Payment Mode</th>

                            <th>Account Details</th>

                            <th>Salesperson</th>

                            <th>Note</th>

                            <th>Created By</th>

                        </tr>

                    </thead>

                    <tbody>

                        @foreach($invoice as $var)
                        <tr>

                            <td>{{$var->invoiceDate}}</td>

                            <td>{{$var->invoiceNo}}</td>

                            @if($var->customerType == "Customer")
                            @php $customer = DB::table('customers')->where('idCustomer',$var->idCustomer)->first();@endphp
                            <td>{{$customer->customerName}}</td>
                            <td>{{$customer->customerNumber}}</td>
                            @else
                            @if($var->customerType == "Student")
                            @php $customer = DB::table('students')->where('idStudent',$var->idCustomer)->first();@endphp
                            <td>{{$customer->firstName}} {{$customer->lastName}}</td>
                            <td>{{$customer->ecNo}}</td>
                            @else
                            @php $customer = DB::table('employees')->where('idEmployee',$var->idCustomer)->first();@endphp
                            <td>{{$customer->firstName}}  {{$customer->lastName}}</td>
                            <td>{{$customer->enrollmentNo}}</td>
                            @endif
                            @endif

                            <td>{{$var->amountPayable}}</td>

                            @php $products = DB::table('invoice_details')->join('products','invoice_details.idProduct','=','products.idProduct')->where('idInvoice',$var->idInvoice)->get(); @endphp
                            <td>
                                @foreach($products as $product)
                                <p>{{$product->productName}} - x({{$product->quantity}})</p>
                                @endforeach
                            </td>

                            <td>{{$var->receiptNo}}</td>

                            <td>{{$var->paymentDate}}</td>

                            <td>{{$var->paidAmount}}</td>

                            <td>{{$var->paymentMode}}</td>

                            @if($var->paymentMode == "IMPS")
                            <td>
                                @php $account = DB::table('account_paid')->where('idAccount',$var->idAccount)->first(); @endphp
                                {{$account->accountName}}<br>
                                {{$account->accountNo}}<br>
                                 @php echo DB::table('banks')->where('idBank',$account->idPayBank)->first()->bankName;@endphp
                            </td>
                            @else
                            <td></td>
                            @endif

                            <td>{{strtoupper($var->salesperson)}}</td>

                            <td>{{$var->notes}}</td>

                            <td>@if(isset($var->created_by)) {{fetchSchoolUser($var->created_by)}} @endif</td>

                        </tr>

                        @endforeach

                        

                    </tbody>

                </table>

            </div>

        </div>

    </div>

</div>

@stop

@section('script')

<script>
$('#js-inventory').DataTable( {
        dom: 'Bfrtip',
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
        ]
    } );    

$(document).ready(function() {

});

$(document).on('click', '.select-all', function(){

    var checkAll = this.checked;

        if(checkAll === true){

            $('input[type=checkbox]').each(function () {

                this.checked = checkAll;

            });

        }else{

            $('input[type=checkbox]').each(function () {

                this.checked = checkAll;

            });

        }

});

</script>

@stop

Copyright © 2021 - 2025 IMMREX7