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/angkasapuraretail.com/public_html/application/views/admin/orders/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/angkasapuraretail.com/public_html/application/views/admin/orders/view.php
<style>
#orderTable th {
    text-align:left;
}
.topTD {
    width:290px;
}

<?php if (!is_null($order->redeemed_voucher_code)) : ?>
    .bottomTD {
    width:610px;
}
<?php else : ?>
    .bottomTD {
    width:610px;
}
<?php endif; ?>


</style>

<div class="row">
    <div class="col-sm-12">
        <p><a href="<?= base_url('admin/orders'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back to Orders Page</a></p><br>
        <h4>ORDER NO: <?php echo $order->id_orders; ?></h4>
        <h4> ORDER DATE: <?php echo date('j F Y H:i:s', strtotime($order->order_date)); ?></h4>
        <?= $this->session->flashdata('success'); //to display success message ?>
        <?= $this->session->flashdata('result'); //to display result message ?>
    </div><!-- end class="col-sm-12" -->
</div> <!-- end row -->

<?= form_open(); ?>

<div class="row"> 
    <div class="col-sm-3">
        <p>Current Order Status</p>
    </div><!-- end class="col-sm-3" -->

     <div class="col-sm-9">
         <?php
            if($order->payment_status == 0) {
                $options[0] = 'Pending';
                $options[2] = 'Cancel';
            }
            if($order->payment_status == 1) {
                $options[1] = 'Not Paid';
                $options[3] = 'Paid';
                $options[2] = 'Cancel';
            }
            if($order->payment_status == 2) {
                $options[2] = 'Cancel';
            }
            if($order->payment_status == 3) {
                $options[3] = 'Paid';
                $options[4] = 'Process Packing';
                $options[2] = 'Cancel';
            }
            if($order->payment_status == 4) {
                $options[4] = 'Process';
            }
            if($order->payment_status == 5) {
                $options[5] = 'In Delivery Process';
            }

            echo form_dropdown('payment_status', $options, $order->payment_status, 'class="form-control changeOrderStatus"');
            ?>

            <!-- <?php if ($order->payment_status == 1 || $order->payment_status== 3) : ?>
                <br>Courier Tracking Number (Enter below)<br>
                <?php  echo form_input('no_resi', $order->no_resi); ?>
                <br>
            <?php endif; ?>  -->

            <br>

             <?php if($allowed == true) : ?>
                <span><?= form_submit('update', 'Change Order Status', 'class="btn btn-primary btn-success submitOrderStatus"'); ?></span>
            <?php endif; ?>

            <script>
                $(document).ready(function() {
                    $('.submitOrderStatus').prop('disabled', true);
                    $('.changeOrderStatus').change(function() {
                        $('.submitOrderStatus').prop('disabled', false);
                    });
                });
            </script>

      <?= form_close(); ?>
      <br><br>

      <!-- <p><a target="_blank" href="<?php echo base_url() . 'admin/orders/generate_invoice_pdf/' . $order->id_orders; ?>"><i class="fa fa-files-o" aria-hidden="true"></i>
 DOWNLOAD INVOICE</a></p>

    <p><a target="_blank" href="<?php echo base_url() . 'admin/orders/generate_deliveryslip_pdf/' . $order->id_orders; ?>"><i class="fa fa-truck" aria-hidden="true"></i>

    <?php if($order->dropship == 'yes') : ?>
     DROPSHIP
    <?php endif; ?> DOWNLOAD DELIVERY SLIP </a></p> -->


    </div><!-- end class="col-sm-9" -->
</div> <!-- end row -->

<div class="row">
    <div class="col-sm-12">
        <div class="table-responsive">
            <table class="table table-striped">
                <tr>
                    <td class="topTD">Metode Pembayaran</td>
                    <td><?= strtoupper($order->payment_type); ?> <?= strtoupper($order->payment_method); ?></td>
                </tr>

                <?php if($order->no_po != NULL) : ?>
                     <tr>
                        <td class="topTD">Nomor PO</td>
                        <td><?= strtoupper($order->no_po); ?></td>
                    </tr>
                <?php endif; ?>   

                <?php if($order->payment_date != NULL) : ?>
                     <tr>
                        <td class="topTD">Tanggal Bayar</td>
                        <td><?= date('d M Y H:m:s', strtotime($order->payment_date)); ?></td>
                    </tr>
                <?php endif; ?>

                <tr>
                    <td class="topTD">Info Tambahan</td>
                    <td>
                        <?php if($order->payment_type == 'bank transfer BCA' || $order->payment_type == 'bank transfer MANDIRI') : ?>
                        <?php
                            if($order->payment_confirm == 1 ) {
                                echo 'cust pay confirm: Yes';
                            } else {
                                echo 'Cust pay confirm: Not Yet';
                            }
                        ?>
                        <?php elseif($order->payment_type == 'midtrans') : ?>
                            <?= $order->payment_status_message; ?>
                        <?php endif; ?>
                    </td>
                </tr>
                <?php  
                    $customer = $this->db->select('*')->from('customers')->where('id_customers',$order->customer_id)->get()->row();
                ?>
                <tr>
                    <td class="topTD">Kontak Pelanggan</td>
                    <td>
                        <p>
                            Name: <?php echo ucwords($order->recipient_name);  ?><br>
                            Email: <a href="mailto:<?php echo $order->email;  ?>"><?php echo $order->email;  ?></a><br>
                            Phone: <?php echo $order->phone;  ?><br>
                            <?php if($customer->type=="corporate") : ?>
                            Compnay Name: <?= ucwords($customer->company_name) ?><br>
                            NPWP: <?= ucwords($customer->npwp) ?><br>
                            Address: <?= ucwords($customer->address) ?>
                            <?php endif ?>
                        </p>
                    </td>
                 </tr>

                <tr>
                    <td class="topTD">Detail Pengiriman</td>
                    <td>
                        <p>
                            <?= ucwords($order->address); ?><br>
                            <?php
                                //get subdistrict
                                echo ucwords($order->subdistrict) . '. ';
                                //get district
                                echo ucwords($order->district) . '. ';
                                echo ucwords($order->province);
                            ?>
                            <br>
                            Kodepos: <?= $order->postcode; ?>
                            <br>
                            KURIR: REX <?= $order->kurir; ?>
                        </p>
                    </td>
                </tr>
             <!-- <tr>
                <td>CUSTOMER NOTE</td>
                <td><p><?= ucfirst($order->customer_note); ?></p></td>
             </tr> -->

            <tr>
            <td colspan="2">
                <table id="orderTable" class="table table-striped" style="margin-top: 30px">
                    <tr>
                        <th>Nama Barang</th>
                        <th>Qty</th>
                        <th>Harga</th>
                        <th>Sub Total</th>
                        <th>Dikirim Dari</th>
                    </tr>
                    <?php $count = 0; ?>
                    <?php $total_amount = 0; ?> 

                    <?php foreach($order_details as $item) : ?>
                        <?php $count++; ?>
                        <tr>
                            <td>
                                <?php echo ucwords($item->item_name); ?><br>
                                <?php 
                                //get product code (item number)
                                $this->db->select('product_code')->from('products')->where('id_products', $item->item_id);
                                $product_code = $this->db->get()->row()->product_code;
                                ?>
                                Item No: <?php echo $product_code; ?>
                            </td>
                            <td><?=$item->quantity;?> Pcs</td>
                            
                            <td>IDR &nbsp;&nbsp;<?= number_format($item->item_price / 1.11);?></td>
                            <td>IDR &nbsp;&nbsp;<?= number_format($item->quantity * $item->item_price / 1.11);?></td>
                            <td>
                            <?php 
                                $warehouse_name = $this->db->select('name')->from('warehouse')->where('id',$item->warehouse_id)->get()->row()->name;
                                $shipping_method= $this->db->select('name')->from('shipment_method')->where('id',$item->chosen_shipping_id)->get()->row()->name;
                                //echo ucfirst($warehouse_name.', '.ucfirst($shipping_method));
                                echo ucfirst($warehouse_name);
                            ?>
                            <br />
                            <?php if($item->is_backorder === 'yes') : ?>
                                (Indent)
                            <?php else : ?>
                                (In Stock)
                            <?php endif; ?>  
                            </td>
                        </tr>    

                    <?php 
                    $total_amount = $total_amount + ($item->item_price / 1.11 * $item->quantity); 
                endforeach; ?>   
                </table>

                <table style="margin-top: 20px;"> 
                    <tr>
                        <td class="bottomTD">Total Produk</td>
                        <td>: IDR <?= number_format($total_amount);?></td>
                    </tr>  
                    <tr>
                        <td class="bottomTD">PPN</td>
                        <td>: IDR <?= number_format($total_amount * 11/100);?></td>
                    </tr>  
                    <?php if($order->birthday_promo_amount > 0) : ?>
                    <tr>
                        <td class="bottomTD">Birthday Promo <?= $order->birthday_promo_percentage;?>%</td>
                        <td>: -IDR <?= number_format($order->birthday_promo_amount);?></td>
                    </tr>
                    <tr>
                        <td class="bottomTD">Kode Voucher</td>
                        <td>: <?= $order->redeemed_voucher_code; ?></td>
                    </tr>
                    <?php endif; ?>
                    <?php if($order->redeemed_voucher_amount > 0) : ?>
                    <tr>
                        <td class="bottomTD">Voucher</td>
                        <td>: -IDR <?= number_format($order->redeemed_voucher_amount);?></td>
                    </tr>
                    <tr>
                        <td class="bottomTD">Kode Voucher</td>
                        <td>: <?= $order->redeemed_voucher_code; ?></td>
                    </tr>
                    <?php endif; ?>
                    <tr>
                        <td class="bottomTD">Total Ongkos Kirim</td>
                        <td>: IDR <?= number_format($order->shipping_fee);?></td>
                    </tr>  
                    <?php if($order->free_shipping_fee > 0) : ?>
                        <tr>
                        <td class="bottomTD">Diskon Biaya Pengiriman</td>
                        <td>: -IDR <?= number_format($order->free_shipping_fee);?></td>
                    </tr>
                    <?php endif; ?>  
                    <tr> 
                        <td class="bottomTD"><b>Grand Total</b></td>
                        <td>: IDR <?php
                        $final_grand_total = 0;
                        $grand_total = ($total_amount + $order->shipping_fee) 
                        + ($total_amount * 11/100)
                        - ($order->free_shipping_fee + $order->redeemed_voucher_amount + $order->birthday_promo_amount + $order->minus_reward_amount);

                        if($grand_total > 0){
                            $final_grand_total = $grand_total;
                        }
                        echo number_format($final_grand_total);
                        if($final_grand_total == 0){
                            echo " (Free Order)";
                        }
                        ?>
                        </td>
                    </tr>  
                </table> 

                <table style="margin-top: 20px;"> 
                    <tr>
                        <td class="bottomTD">Metode Pembayaran</td>
                        <td>: <?php echo ucfirst($order->payment_type),' ',ucfirst($order->payment_method); ?></td>
                    </tr>  
                    
                    <!-- <tr>
                        <td class="bottomTD">Informasi Tambahan</td>
                        <td>: <?php if($order->payment_type == 'Bank transfer') : ?>
                        <?php
                            if($order->payment_confirm == 1 ) {
                                echo 'Cust pay confirm: Yes';
                            } else {
                                echo 'Cust pay confirm: Not Yet';
                            }
                        ?>
                        <?php elseif($order->payment_type == 'midtrans') : ?>
                            <?= ucfirst($order->payment_status_message); ?>
                        <?php endif; ?></td>
                    </tr>   -->

                    <?php if ($customer->sales_id == NULL): ?>
                    <?php else: ?>
                        <tr>
                        <td>Sales ID</td>
                        <td>: <?= $customer->sales_id?></td> 
                        </tr> 
                    <?php endif ?> 
                </table>
    

    <?php if ($order->payment_confirm_details): ?>
        <table class="table">
            <tr>
                <td><br>MANUAL BANK TRANSFER PAYMENT CONFIRMATION</td>
                <td><br><?= $order->payment_confirm_details; ?>
            </tr>
        </table>
    <?php endif; ?>
    </table>
        </div>
    </div>
</div>

<!-- cek salah satu barang sudah Generate Airway Bill -->

<div class="row" style="margin-top: 0px;">
    <div class="col-sm-12" style="text-align: center;">
        <a href="<?= base_url() . 'admin/orders/new_generate_invoice/' . $order->id_orders; ?>" target="_blank" class="btn btn-primary" type="submit" onclick="return confirm('Print Invoice ??')">
            <i class="fa fa-print"></i>&nbsp;Print Invoice
        </a>
    </div>
</div>


https://t.me/RX1948 - 2025