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/indolok.id/application/views/ |
Upload File : |
<table border="1" cellpadding="8"> <tr> <th>Order ID</th> <th>Order Date</th> <th>Payment Status</th> <th>Total Amount</th> <th>Payment Type</th> <th>Payment Date</th> <th>Recipient Name</th> <th>Address</th> <th>District</th> <th>Subdistrict</th> <th>Province</th> <th>Postcode</th> <th>Phone</th> <th>Email</th> <th>Redeemed Voucher Code</th> <th>Redeemed Voucher Type</th> <th>Redeemed Voucher Value</th> <th>Redeemed Voucher Amount</th> <th>Redeemed Point Reward</th> <th>Redeemed Point Amount</th> <th>Shipping Fee</th> <th>Free Shipping Fee</th> <th>Item Name</th> <th>Item Price</th> <th>Quantity</th> <th>Subtotal</th> <th>Warehouse</th> <th>Shipment Method</th> <th>Shipping Fee Item</th> <th>Is Backorder</th> <th>Status Sent Item</th> <th>No. Resi</th> </tr> <?php if(!empty($orders_detail)){ // Jika data pada database tidak sama dengan empty (alias ada datanya) foreach($orders_detail as $item){ // Lakukan looping pada variabel siswa dari controller $order = $this->db->select(' order_date, payment_status, total_amount, payment_type, payment_date, recipient_name, address, district, subdistrict, province, postcode, phone, email, redeemed_voucher_code, redeemed_voucher_type, redeemed_voucher_value, redeemed_voucher_amount, minus_reward, minus_reward_amount, shipping_fee, free_shipping_fee ')->from('orders')->where('id_orders',$item->orders_id)->get()->row(); echo "<td>".$item->orders_id."</td>"; echo "<td>".$order->order_date."</td>"; switch ($order->payment_status) { case 0: echo "<td>Pending</td>"; break; case 1: echo "<td>Not Paid</td>"; break; case 2: echo "<td>Cancel</td>"; break; case 3: echo "<td>Paid</td>"; break; case 4: echo "<td>Process</td>"; break; case 5: echo "<td>Delivered</td>"; break; default: echo "Not Found Status"; } $final_grand_total = 0; $grand_total = ($order->total_amount - $order->redeemed_voucher_amount - $order->minus_reward_amount)+($order->shipping_fee - $order->free_shipping_fee); if($grand_total > 0){ $final_grand_total = $grand_total; } echo "<td>".$final_grand_total."</td>"; echo "<td>".$order->payment_type."</td>"; echo "<td>".$order->payment_date."</td>"; echo "<td>".$order->recipient_name."</td>"; echo "<td>".$order->address."</td>"; echo "<td>".$order->district."</td>"; echo "<td>".$order->subdistrict."</td>"; echo "<td>".$order->province."</td>"; echo "<td>".$order->postcode."</td>"; echo "<td>".$order->phone."</td>"; echo "<td>".$order->email."</td>"; echo "<td>".$order->redeemed_voucher_code."</td>"; echo "<td>".$order->redeemed_voucher_type."</td>"; echo "<td>".$order->redeemed_voucher_value."</td>"; echo "<td>".$order->redeemed_voucher_amount."</td>"; echo "<td>".$order->minus_reward."</td>"; echo "<td>".$order->minus_reward_amount."</td>"; echo "<td>".$order->shipping_fee."</td>"; echo "<td>".$order->free_shipping_fee."</td>"; echo "<td>".$item->item_name."</td>"; echo "<td>".$item->item_price."</td>"; echo "<td>".$item->quantity."</td>"; echo "<td>".$item->subtotal."</td>"; $warehouse = $this->db->select('name')->from('warehouse')->where('id',$item->warehouse_id)->get()->row()->name; echo "<td>".$warehouse."</td>"; $shipment_method = $this->db->select('name')->from('shipment_method')->where('id',$item->chosen_shipping_id)->get()->row()->name; echo "<td>".$shipment_method."</td>"; echo "<td>".$item->shipping_fee."</td>"; echo "<td>".$item->is_backorder."</td>"; switch ($item->status) { case 0: echo "<td>Open</td>"; break; case 1: echo "<td>Ready to pick up</td>"; break; case 2: echo "<td>Picked up</td>"; break; default: echo "Not Found Status"; } echo "<td>".$item->no_resi."</td>"; echo "</tr>"; } }else{ // Jika data tidak ada echo "<tr><td colspan='3'>Data tidak ada</td></tr>"; } ?> </table>