laporantempaan.blade.php 4.97 KB
Newer Older
daniellumbantobing committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
@extends('layouts.master')
@section('title','Laporan Penjualan Tempaan')
@section('content')
   <div class="main">
        <div class="main-content">
            <div class="container-fluid">
            
            <div class="row">
				
						<div class="col-md-12 col-12">
						   
                            <div class="panel panel-headline" style="border-radius: 20px;">
								<div class="panel-heading mt-3">
									<center>
									<h3 class="panel-title">
									Laporan Penjualan Produk Tempaan 
									</h3>
									</center>
                   
								</div>
							
							</div>

            
			</div>
						<div class="col-md-6 col-6">
						   
                            <div class="panel panel-headline" style="border-radius: 20px;">
								<div class="panel-heading">
									<h3 class="panel-title">Filter</h3>
						           <div class="right">
                         
								   </div>
                        
                   
								</div>
								<div class="panel-body">
								<form action="{{url('/filter/laporantempaan')}}" method="GET" class="form-group">
									@csrf
									
									<select style="cursor:pointer;" class="form-control" id="tag_select" name="hari">
									<option value="0" selected disabled> Pilih Tanggal</option>
									<?php 
									$year =31;
									$min = 1;
									$max = $year;
									for( $i=$min; $i<=$max; $i++ ) {
									echo '<option value='.$i.'>'.$i.'</option>';
														}
														?>
									</select>

								
									
									

									
									<select style="cursor:pointer;margin-top:1.5em;margin-bottom:1.5em;" class="form-control" id="tag_select" name="bulan">
										<option value="0" selected disabled> Pilih Bulan</option>
									<option value="01"> Januari</option>
									<option value="02"> Februari</option>
									<option value="03"> Maret</option>
									<option value="04"> April</option>
									<option value="05"> Mei</option>
									<option value="06"> Juni</option>
									<option value="07"> Juli</option>
									<option value="08"> Agustus</option>
									<option value="09"> September</option>
									<option value="10"> Oktober</option>
									<option value="11"> November</option>
									<option value="12"> Desember</option>
									</select>
													
									<select style="cursor:pointer;" class="form-control" id="tag_select" name="tahun">
									<option value="0" selected disabled> Pilih Tahun</option>
									<?php 
									$year = date('Y');
									$min = $year - 60;
									$max = $year;
									for( $i=$max; $i>=$min; $i-- ) {
									echo '<option value='.$i.'>'.$i.'</option>';
														}
														?>
									</select>
									<br>
									<input class="btn btn-primary btn-block" name="submit" type="submit" value="Cari"/>
								</form>
									
								</div>
							</div>

            
							
						</div>

						<div class="col-md-6 col-6">
						   
                            <div class="panel panel-headline" style="border-radius: 20px;">
								<div class="panel-heading">
									<h3 class="panel-title">
										@if (!@empty($request->hari) && !@empty($request->bulan) && !@empty($request->tahun))
										Hasil Pencarian	 "{{$request->hari}}-{{$request->bulan}}-{{$request->tahun}}"
										@elseif(!@empty($request->bulan) && !@empty($request->tahun))
										Hasil Pencarian	 "{{$request->bulan}}-{{$request->tahun}}"
										@else
										Laporan Penjualan (Hari Ini)
										@endif
									</h3>
						           <div class="right">
                         
								   </div>
                        
                   
								</div>
								<div class="panel-body">
									<h4>Total Pendapatan</h4>
									<hr/>
									<h4>@currency($d)</h4>
									<hr/>
									<h4>Total Transaksi</h4>
									<hr/>
									<h4>{{$d1}}</h4>
									
								</div>
							</div>

            
			</div>

			
				<div class="col-md-12">
							<div class="panel">
								<div id="chartnilai">
									
								</div>
							</div>
						</div>
		</div>
	</div>
</div>
                      
 @endsection
  
 @section('footer')
  <script src="https://code.highcharts.com/highcharts.js"></script>
<script>
		Highcharts.chart('chartnilai', {
	    chart: {
	        type: ''
	    },
	    title: {
	        text: 'Laporan Penjualan'
	    },
	    xAxis: {
	        categories:{!!json_encode($tgl)!!},
	        crosshair: true
	    },
	    yAxis: {
	        min: 0,
	        title: {
	            text: 'Order'
	        }
	    },
	    tooltip: {
	        headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
	        footerFormat: '</table>',
	        shared: true,
	        useHTML: true
	    },
	    plotOptions: {
	        column: {
	            pointPadding: 0.2,
	            borderWidth: 0
	        }
	    },
	    series: [{
	        name: 'Total Pendapatan',
	        data: {!!json_encode($total)!!}
 
	    }] 
	}); 

	$(document).ready(function() {
    $('.nilai').editable();
}); 	
</script>
 @endsection