https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /var/www/kanvakanva.com/public_html/application/views/admin/stat_sales/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/kanvakanva.com/public_html/application/views/admin/stat_sales/index.php
<!-- chart lib -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.bundle.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.bundle.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.css">

<!-- date range picker lib -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />

<!-- datatbles lib -->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.2.6/css/responsive.bootstrap4.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.22/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.4/css/buttons.dataTables.min.css">
<script type="text/javascript" src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.22/js/dataTables.bootstrap4.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.2.6/js/dataTables.responsive.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.2.6/js/responsive.bootstrap4.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.4/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.flash.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.html5.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.print.min.js"></script>

<section>
    <h2>Statistic Sales</h2>
    <h5>Jumlah Pendapatan</h5>
    <p>Cek pendapatan toko untuk atur strategi penjualan.</p>
        <div class="row container">
            <?= form_open('admin/stat_sales/filter_date', 'class="form-inline"'); ?>
              <div class="form-group">
                <label for="inputsm">Tanggal : </label> &nbsp;
                <input type="text" name="daterange" class="form-control" size="21" value="<?= date("Y/m/d", strtotime($start_date)); ?> - <?= date("Y/m/d", strtotime($end_date)); ?>" />&nbsp;
              </div>
              <script type="text/javascript">
                $('input[name="daterange"]').daterangepicker({
                    locale: {
                        format: 'YYYY/MM/DD'
                    }
                });
              </script>
              <button type="submit" class="btn btn-primary">Submit</button>
            <?= form_close() ?>   
        </div>
        <br>

        <div class="row" >
            <div class="col-sm-12" >
                <div class="card bg-light mb-3">
                  <div class="card-body">
                    <h6 class="card-title"> Pendapatan bersih <sup><i class="fa fa-info-circle" title="Total pendapatan penjualan produk"></i></sup> </h6>
                    
                    <h5><strong> Rp. <?= number_format($total_bersih,2,',','.'); ?></strong></h5>

                    <div class="container">
                        <canvas id="myChart" style="height:40vh; width:80vw"></canvas>
                        <script>
                        var ctx = document.getElementById('myChart').getContext('2d');
                        var myChart = new Chart(ctx, {
                            type: 'line',
                            data: {
                                labels: [       
                                                <?php foreach ($period as $value) {
                                                  echo "' ".$value->format('d M')." ',";  
                                                } ?>
                                        ],
                                datasets: [{
                                    label: 'Pendapatan bersih (Rp)',
                                    data:   [
                                               <?php foreach ($period as $value) {
                                                  if ( $all_data['tgl'][$value->format('Y-m-d')]->jumlah_bersih == "" ) {
                                                    echo "0,";
                                                  } else {
                                                      echo $all_data['tgl'][$value->format('Y-m-d')]->jumlah_bersih.",";  
                                                    
                                                  }
                                                } ?>
                                            ],
                                    fill: false,
                                    borderColor: 'rgba(51, 153, 255, 1)',
                                    pointBackgroundColor : 'rgba(51, 153, 255, 0.6)',
                                    pointBorderColor : 'rgba(51, 153, 255, 1)',
                                    borderWidth: 1
                                }]
                            },
                            options: {
                                scales: {
                                    yAxes: [{
                                        ticks: {
                                            beginAtZero: true
                                        }
                                    }]
                                }
                            }
                        });
                        </script>
                    </div>

                    <!-- <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> -->
                  </div>
                </div>
            </div>

            <div class="col-sm-3 offset-md-2" >
                <div class="card bg-light mb-3">
                  <div class="card-body">
                    <p class="card-title"> Pendapatan kotor diterima <sup><i class="fa fa-info-circle float-right" title="Total pendapatan penjualan produk dan ongkos kirim"></i></sup> </p>
                    <h5><strong> Rp. <?= number_format($total_kotor,2,',','.'); ?></strong></h5>
                  </div>
                </div>
            </div>
            <div class="col-sm-3 offset-md-2" >
                <div class="card bg-light mb-3">
                  <div class="card-body">
                    <p class="card-title"> Pendapatan bersih diterima <sup><i class="fa fa-info-circle float-right" title="Total pendapatan penjualan produk"></i></sup> </p>
                    <h5><strong> Rp. <?= number_format($total_bersih,2,',','.'); ?></strong></h5>
                  </div>
                </div>
            </div>
            <div class="col-sm-12" >
                <div class="card bg-light mb-3">
                  <div class="card-body">
                    <h6 class="card-title"> Produk terjual periode <?= date("d/M/Y", strtotime($start_date)); ?> ~ <?= date("d/M/Y", strtotime($end_date)); ?> </h6>
                    <table id="data" class="table table-striped">
                      <thead>
                        <tr>
                          <th scope="col">Product</th>
                          <th scope="col">Variant</th>
                          <th scope="col">Quantity</th>
                          <th scope="col">Total (Rp)</th>
                        </tr>
                      </thead>
                      <tbody>
                        <?php foreach ($key as $k) : ?>
                        <tr>
                          <td><?= str_replace( $products[$k]['type'] , "", $k) ?></td>
                          <td><?= $products[$k]['type'] ?></td>
                          <td><?= $products[$k]['count'] ?></td>
                          <td><?= $products[$k]['total'] ?></td>
                        </tr>
                        <?php endforeach; ?>
                      </tbody>
                    </table>
                  </div>
                </div>
            </div>
            <script type="text/javascript">
                $(document).ready(function() {
                    $('#data').DataTable( {
                          "order": [2],
                          "columnDefs": [ {
                            "targets"  : [0,1],
                            "orderable": false,
                          }],
                          "dom" : '<"row"<"col-sm-4"B><"col-sm-4"l><"col-sm-4"f>> rt <"row"<"col-sm-6"i><"col-sm-6"p>>',
                          "buttons" : [
                              {
                                  extend: 'excel',
                                  title: "Data Sales <?= date("d M Y", strtotime($start_date)); ?> - <?= date("d M Y", strtotime($end_date)); ?>",
                              },
                              {
                                  extend: 'print',
                                  title: "<div style='font-size: 20px; text-align: center;'>Data Sales <?= date("d M Y", strtotime($start_date)); ?> - <?= date("d M Y", strtotime($end_date)); ?></div>"
                              },
                          ],
                    } );
                } );
            </script>

        </div>
    <!-- </div> -->
    

    
	
</section>

https://t.me/RX1948 - 2025