Prv8 Shell
Server : Apache
System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : matalashes ( 1004)
PHP Version : 8.1.29
Disable Function : NONE
Directory :  /home/matalashes/.trash/app.bak/Views/admin/pages/custom/report/reportservice/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/matalashes/.trash/app.bak/Views/admin/pages/custom/report/reportservice/reportservice.php
<?= $this->extend('admin/layout/report/admin_report_blank') ?>
<?= $this->section('content') ?>
    <!-- ============================================================== -->
    <!-- Page Content -->
    <!-- ============================================================== -->

    <!-- ============================================================== -->
    <!-- Different data widgets -->
    <!-- ============================================================== -->

    <?php echo form_open($url_action_table['main']); ?>
    <div class="row">
      <div class="col-md-3"></div>
      <div class="col-md-3">
        <div class="fv-row mb-5">
            <label class="form-label fw-bold">Start</label>
            <?= input_field('start', 'form-control form-control-lg', 'start', 'date', 'Start', $start); ?>
        </div>
      </div>
      <div class="col-md-3">
        <div class="fv-row mb-5">
            <label class="form-label fw-bold">End</label>
            <?= input_field('end', 'form-control form-control-lg', 'end', 'date', 'End', $end); ?>
        </div>
      </div>
      <div class="col-md-3"></div>
    </div>

    <div class="row">
      <div class="col-md-3"></div>
      <div class="col-md-6">
        <div class="fv-row mb-5"><center>
            <!-- <label class="form-label fw-bold">&nbsp;</label> -->
            <?= button_button('', 'btn btn-light-primary', 'rpt', 'submit','value="export"', '', 'Export Excel'); ?>
            <?= button_button('', 'btn btn-light-primary', 'rpt', 'submit','value="show"', '', 'Show Data'); ?></center>
        </div>
      </div>
      <div class="col-md-3"></div>
    </div>
     <?= form_close() ?>
    <!-- ============================================================== -->
    <?php
     if($show){
$session = service('session');
echo form_content_table_tag_open('table', 'table align-middle table-row-dashed fs-6 gy-5', '', $session->get('trash')) ?>
    <thead>
    <tr class="text-start text-muted fw-bolder fs-7 text-uppercase gs-0">
        <th hidden>ID</th>
        <th>Tgl</th>
        <th>Konsumen</th>
        <th>Barang/Jasa</th>
        <th>Jml Penjualan</th>
        <th>Harga Satuan</th>
        <th>Total</th>
        <th class="text-end">#</th>
    </tr>
    </thead>
    <tbody class="text-gray-600 fw-bold">
    <?php foreach ($_service as $d) { 
        $created_at = date("d M Y H:i", strtotime($d->created_at ?? ''));
        $ps_customer = $d->ps_customer;
    ?>
            <?php
            $json = json_decode($d->ps_item_wo2);
            foreach($json as $j){
                $o = $j->item;
                $os = $j->item_service;
                $q = $j->qty;
                $p = $j->price;
                $v = $j->mekanik;
                $s = $j->result;

                if(isset($o) && $o != ''){
                    $barang = new  \App\Models\MasterBarang();
                    $_item = $barang->find($o);
                    $_item_name = $_item->mb_merk.'-'.$_item->mb_name;
                }else{
                    $service = new  \App\Models\MasterService();
                    $_item = $service->find($os);  
                    $_item_name = $_item->msc_type;
                }
                ?>
                <tr>
                    <td hidden><?= $d->ps_id ?></td> 
                    <td><?= $created_at ?></td>
                    <td><?= $ps_customer ?></td>
                    <td><?= $_item_name ?></td>
                    <td><?= $q ?></td>
                    <td><?= 'Rp '.number_format($p ?? 0, 0, ',', '.') ?></td>
                    <td><?= 'Rp '.number_format($q*$p ?? 0, 0, ',', '.') ?></td>
                    <td>&nbsp;</td>
                </tr>
                <?php
                if(!empty($created_at)){
                    $created_at = '';
                }
                if(!empty($ps_customer)){
                    $ps_customer = '';
                }
            }
        ?>
        <?php
    }
    ?>
    </tbody>
<?= form_content_table_tag_close(); ?>
<?php } ?>
<?= $this->endSection('content') ?>

haha - 2025