/
home
/
sjslayjy
/
public_html
/
mosaram
/
resources
/
views
/
dashboard
/
report
/
Upload File
HOME
@extends('dashboard.layouts.app') @section('title','Outstanding Amount Details') @section('content') <div class="main-content"> <div class="main-content-inner"> <div class="breadcrumbs ace-save-state" id="breadcrumbs"> <ul class="breadcrumb"> <li> <i class="ace-icon fa fa-home home-icon"></i> <a href="#">{{__('messages.Home')}}</a> </li> <li class="active">Outstanding Amount Details</li> </ul></div> <div class="page-content"> <h3 class="header smaller lighter blue">Outstanding Amount Details</h3> <div class="row"> <div class="col-xs-12"> <div class="clearfix"> <div class="pull-right tableTools-container"> </div> </div> @if (session('success')) <div class="alert alert-success"> {{ session('success') }} </div> @endif @if (session('error')) <div class="alert alert-danger"> {{ session('error') }} </div> @endif <div class="table-header"> {{$dealer->name}} ({{$dealer->address1}}) </div> <div class="table-responsive"> <div class="dataTables_borderWrap"> <table id="dynamic-table" class="table table-striped table-bordered table-hover"> <thead> <tr> <th>Date</th> <th>Party Name</th> <th>Product</th> <th>Total Amount</th> </tr> </thead> @php $total = 0; @endphp @foreach($invoices as $invoice) <tr> <td>{{date('d-m-Y',strtotime($invoice->created_at))}}</td> <td> <b>{{getModelById('Retailer',$invoice->retailer_id)->name}} <br> {{getModelById('Retailer',$invoice->retailer_id)->address}}</b> </td> <td>{{$invoice->product}}</td> <td><a target="_blank" onclick="showInvoiceDetails( '{{$invoice->invoice_number}}', '{{$invoice->invoice_date}}', '{{$dealer->name}}', '{{$invoice->retailer_name}}', '{{$invoice->destination}}', '{{ ($invoice->rate - $invoice->freight_discount) * $invoice->quantity}}', '{{$invoice->product}}', '{{$invoice->cgst}}', '{{$invoice->sgst}}', '{{$invoice->remaining_amount}}', '{{$invoice->product_hsn}}', '{{$invoice->quantity}}', '{{$dealer->address1}}')"> {{$invoice->total}}</a></td> @php $total = $total + ($invoice->total); @endphp </tr> @endforeach <tr> <td></td> <td><b>Total Amount</b></td> <td></td> <td><b>{{$total}}</b></td> </tr> <tbody> </tbody> </table> </div> </div> </div> </div> <div class="modal fade" id="invoiceDetailsModal"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Invoice Details</h4> </div> <div class="modal-body"> <div class="table-responsive"> <table class="table table-hover"> <thead> <tr> <th>Invoice Number</th> <td id="invoice_number"></td> </tr> <tr> <th>Product</th> <td id="product"></td> </tr> <tr> <th>Retailer</th> <td id="retailer"></td> </tr> <tr> <th>Dealer</th> <td id="dealer"></td> </tr> <tr> <th>Product HSN</th> <td id="product_hsn"></td> </tr> <tr> <th>CGST</th> <td id="cgst"></td> </tr> <tr> <th>SGST</th> <td id="sgst"></td> </tr> <tr> <th>Total Amount</th> <td id="total"></td> </tr> <tr> <th>Quantity</th> <td id="quantity"></td> </tr> <tr> <th>Destination</th> <td id="destination"></td> </tr> <tr> <th>Remaining Amount</th> <td id="remaining_amount"></td> </tr> </thead> </table> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> </div> </div> </div> @section('script') {{ Html::script("assets/js/jquery.dataTables.min.js")}} {{ Html::script("assets/js/jquery.dataTables.bootstrap.min.js")}} {{ Html::script("assets/js/dataTables.buttons.min.js")}} {{ Html::script("assets/js/buttons.flash.min.js")}} {{ Html::script("assets/js/buttons.html5.min.js")}} {{ Html::script("assets/js/buttons.print.min.js")}} {{ Html::script("assets/js/buttons.colVis.min.js")}} {{ Html::script("assets/js/dataTables.select.min.js")}} {{ Html::script("assets/js/ace-elements.min.js")}} {{ Html::script("assets/js/ace.min.js")}} <script type="text/javascript"> function showInvoiceDetails(invoice_number,invoice_date,dealer,retailer,destination,total,product,cgst,sgst,remaining_amount,product_hsn,quantity,address){ $('.loading-bg').show(); dealer =dealer+" ("+address+")"; $('#invoice_number').text(invoice_number); $('#invoice_date').text(invoice_date); $('#quantity').text(quantity); $('#dealer').text(dealer); $('#sgst').text(sgst); $('#cgst').text(cgst); $('#destination').text(destination); $('#retailer').text(retailer); $('#remaining_amount').text(remaining_amount); $('#product').text(product); $('#product_hsn').text(product_hsn); $('#total').text(total); $('#invoiceDetailsModal').modal('toggle'); $('.loading-bg').hide(); } </script> @endsection @endsection