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-backup.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">PAYMENT TYPE</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">PAYMENT DATE</td>
                        <td><?= date('d M Y H:m:s', strtotime($order->payment_date)); ?></td>
                    </tr>
                <?php endif; ?>

                <tr>
                    <td class="topTD">ADDITIONAL INFO</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">CUSTOMER CONTACT</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">SHIPPING DETAILS</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">
            <p>ORDER DETAILS</p>

            <table id="orderTable" class="table" style="border: 1px solid black">
                <tr>
                    <th style="border: 1px solid black">Item Name</th>
                    <th style="border: 1px solid black">Quantity</th>
                    <th style="border: 1px solid black">Unit Price</th>
                    <th style="border: 1px solid black">Delivery Fee</th>
                    <th style="border: 1px solid black">Sub Total</th>
                    <th style="border: 1px solid black">Sent From</th>
                    <?php if($order->payment_status == 4) : ?>
                        <th style="border: 1px solid black">Delivery Status</th>
                        <th style="border: 1px solid black">Action</th>
                    <?php elseif($order->payment_status == 5) : ?>
                        <th style="border: 1px solid black">Delivery Status</th>
                    <?php endif;?>
                </tr>

                <?php if($role == 'apoteker') : ?>
                    <?php
                        //get warehouse id for this apoteker
                        $this->db->select('warehouse_id')->from('users')->where('id', $this->session->userdata('admin')['id']);
                        $apoteker_warehouse_id = $this->db->get()->row()->warehouse_id;
                    ?>
                <?php endif; ?>

                <?php $a=1; foreach ($order_details as $item) : ?>

                   
                        <?php
                            $attributes = array('id' => 'update_resi');
                            echo form_open('admin/orders/update_noresi',$attributes); 
                        ?><?= form_close(); ?> 

                        <?= form_open('admin/orders/update_status'); ?>
                            <tr>
                                <td style="border: 1px solid black">
                                    <?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 style="border: 1px solid black">
                                    <?= $item->quantity; ?> Pcs
                                    <?php if($item->is_backorder == 'yes') : ?>
                                        (Backed Order)
                                    <?php endif; ?>
                                </td>
                                <td style="border: 1px solid black">IDR &nbsp;&nbsp;
                                    <?php echo number_format($item->item_price); ?>
                                </td>
                                <td style="border: 1px solid black">
                                    IDR &nbsp;&nbsp;<?php echo number_format($item->shipping_fee); ?>
                                </td>
                                <td style="border: 1px solid black">
                                    IDR &nbsp;&nbsp;<?php echo number_format($item->subtotal); ?>
                                </td>
                                <td style="border: 1px solid black">
                                    <?php
                                        //get warehouse
                                        $this->db->select('name')->from('warehouse')->where('id', $item->warehouse_id);
                                        $warehouse_name = $this->db->get()->row()->name;
                                        echo ucwords($warehouse_name);
                                    ?>
                                </td>
                                <?php if($order->payment_status == 4) : ?>
                                    <input type="hidden" name="id_product_detail" value="<?= $item->id_orders_detail;?>">
                                    <input type="hidden" name="id_order" value="<?= $order->id_orders;?>">
                                    <input type="hidden" name="backed_order" value="<?= $item->is_backorder;?>">
                                    <input type="hidden" name="qty_order" value="<?= $item->quantity;?>">
                                    <input type="hidden" name="warehouse_order" value="<?= $item->warehouse_id;?>">
                                    <input type="hidden" name="item_order" value="<?= $item->item_id;?>">
                                    <input type="hidden" name="id" value="<?=$a;?>">
                                    <td style="border: 1px solid black">
                                        <select class="form-control" name="status">
                                            <?php if($item->status == 0): ?>
                                                <option value="0">Open</option>
                                                <option value="1">Generate Airway Bill</option>
                                            <?php elseif($item->status == 1): ?>
                                                <option value="1">Generate Airway Bill</option>
                                                <option value="2">Pickup Request</option>
                                            <?php elseif($item->status == 2): ?>
                                                <option value="2">Pickup Requested</option>
                                            <?php endif; ?>
                                        </select>
                                        <span><?= $this->session->flashdata('success'.$a); //to display success message ?> </span>
                                        <?php if($item->status == 1): ?>
                                            <br>
                                            <label>No. Resi: <?= $item->no_resi; ?></label>
                                            <label>Tracking Ref : <?= $item->rex_tracking_ref_no; ?></label>
                                            
                                        <?php elseif($item->status == 2): ?>
                                            <br>
                                            <label>No. Resi: <?= $item->no_resi; ?></label>
                                            <label>Tracking Ref : <?= $item->rex_tracking_ref_no; ?></label>
                                        <?php endif; ?>
                                    </td>
                                    <td style="border: 1px solid black;text-align: center;">
                                        <?php if($allowed == true) : ?>
                                            <button class="btn btn-success" type="submit" onclick="return confirm('Are you sure to Update ?')">
                                                <i class="fa fa-save"></i>&nbsp;Update
                                            </button>
                                            <br><br>
                                            <?php if($item->status == 1): ?>
                                                <!-- <a href="<?= base_url() . 'admin/orders/generate_shipping_mark/' . $item->id_orders_detail; ?>" target="_blank" class="btn btn-primary" type="submit" onclick="return confirm('Print Shipping Mark ??')">
                                                    <i class="fa fa-print"></i>&nbsp;Print Shipping Mark
                                                </a> -->
                                            <?php endif; ?>
                                         <?php endif; ?>
                                    </td>
                                <?php elseif($order->payment_status == 5) : ?>
                                    <td style="border: 1px solid black">
                                        <select class="form-control" name="status">
                                            <?php if($item->status == 0): ?>
                                                <option value="0">Open</option>
                                                <option value="1">Generate Airway Bill</option>
                                            <?php elseif($item->status == 1): ?>
                                                <option value="1">Generate Airway Bill</option>
                                                <option value="2">Pickup Requested</option>
                                            <?php elseif($item->status == 2): ?>
                                                <option value="2">Pickup Requested</option>
                                            <?php endif; ?>
                                        </select>
                                        <br>
                                        <label>No. Resi: <?= $item->no_resi; ?></label><br>
                                        <label>Tracking Ref : <?= $item->rex_tracking_ref_no; ?></label>  
                                         <br>   
                                        <!-- Button trigger modal -->
                                        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal<?= $item->id_orders_detail; ?>">
                                        Tracking Delivery
                                        </button>
                                        <br><br>
                                        Note: Cancel Pickup only before 18:00 o'clock.<br>            
                                        <a onclick="return confirm('Are you sure??')" href="<?= base_url('admin/orders/cancel_pickup/' . $order->id_orders . '/'. $item->id_orders_detail); ?>" class="btn btn-danger">Cancel Pickup</a>

                                        <?php
                                        //get tracking data
                                        $tracking_data = rex_tracking_awb($item->no_resi);        
                                        ?>
                                       
                                        <!-- Modal -->
                                        <div class="modal fade" id="exampleModal<?= $item->id_orders_detail; ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
                                        <div class="modal-dialog" role="document">
                                            <div class="modal-content">
                                            <div class="modal-header">
                                                <h3 class="modal-title" id="exampleModalLabel">REX Tracking Delivery </h3>
                                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                <span aria-hidden="true">&times;</span>
                                                </button>
                                            </div>
                                            <div class="modal-body">
                                               <?php
                                                // echo '<pre>';
                                                // print_r($tracking_data->history);    
                                                // echo '</pre>';
                                                ?>
                                                <table class="table">
                                                    <thead>
                                                        <th>Date</th>
                                                        <th>City</th>
                                                        <th>Status</th>
                                                        <th>Receiver</th>
                                                    </thead>
                                                    <?php foreach($tracking_data->history as $history) : ?>
                                                        <tr>
                                                            <td><?= $history->date_time; ?></td>
                                                            <td><?= $history->city_name; ?></td>
                                                            <td><?= $history->status; ?></td>
                                                            <td><?= $history->receiver; ?></td>
                                                        </tr>
                                                    <?php endforeach; ?>
                                                </table>
                                               
                                            </div>
                                            <div class="modal-footer">
                                            </div>
                                            </div>
                                        </div>
                                        </div>
                                    </td>
                                <?php endif;?>
                            </tr>
                        <?= form_close(); ?>
                <?php $a++; endforeach; ?>
            </table>
           </td>
     </tr>
     </table>

    <?php $grand_total = $order->total_amount; ?>
    
    <table class="table table-striped">
    <tr>
        <td class="bottomTD">Product Total Amount</td>
        <td>IDR <?= number_format($order->total_amount); ?></td>
    </tr>
    <?php if($order->ppn != 0) : ?>
        <tr>
            <td class="bottomTD">PPN</td>
            <td>IDR <?= number_format($order->ppn); ?></td>
        </tr>
        <?php $grand_total = $grand_total + $order->ppn; ?> 
    <?php endif; ?> 

    <?php if (!is_null($order->birthday_promo_percentage)) : ?>
        <tr>
            <td class="bottomTD">Birthday Promo: <?= strtoupper($order->birthday_promo_percentage); ?>%</td>
            <td>IDR -<?= number_format($order->birthday_promo_amount); ?></td>
            <?php $grand_total = $grand_total - $order->birthday_promo_amount; ?>
        </tr>
    <?php endif; ?>
    
    <?php if (!is_null($order->redeemed_voucher_code)) : ?>
        <tr>
            <td class="bottomTD">Voucher Code: <?= strtoupper($order->redeemed_voucher_code); ?></td>
            <td>IDR -<?= number_format($order->redeemed_voucher_amount); ?></td>
            <?php $grand_total = $grand_total - $order->redeemed_voucher_amount; ?>
        </tr>
    <?php endif; ?>

    <?php if($order->minus_reward > 0) : ?>
        <tr>
            <td class="bottomTD">REDEEM POINT REWARDS: <?= $order->minus_reward; ?> points</td>
            <td>IDR -<?= number_format($order->minus_reward_amount); ?></td>
        </tr>
         <?php $grand_total = $grand_total - $order->minus_reward_amount; ?>
    <?php endif; ?>
    <?php if($order->shipping_fee != 0) : ?>
        <tr>
            <td class="bottomTD">Total Delivery Fee</td>
            <td>IDR <?= number_format($order->shipping_fee); ?></td>
        </tr>
        <?php $grand_total = $grand_total + $order->shipping_fee; ?>
    <?php endif; ?>
    <?php if($order->free_shipping_fee != 0) : ?>
        <tr>
            <td class="bottomTD">Free Delivery Fee</td>
            <td>IDR -<?= number_format($order->free_shipping_fee); ?></td>
        </tr>
        <?php $grand_total = $grand_total - $order->free_shipping_fee; ?>
    <?php endif; ?>
    <tr>
        <td style="font-weight: bold;" class="bottomTD">GRAND TOTAL AMOUNT</td>
        <td style="font-weight: bold;">
            IDR <?php 
                if($grand_total > 0){
                    echo number_format($grand_total);     
                }
                else{
                    echo number_format(0).' (Free Order)';
                }
            ?>
        </td>
    </tr> 

    <?php if ($order->payment_confirm_details): ?>
        <tr>
            <td><br>MANUAL BANK TRANSFER PAYMENT CONFIRMATION</td>
            <td><br><?= $order->payment_confirm_details; ?>
        </tr>
    <?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