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/admin/penawaran/ |
Upload File : |
<div class="row"> <div class="col-sm-12"> <p><a href="<?= base_url('admin/dashboard'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back to Dashboard</a></p><br> <h2>Penawaran Harga</h2> <?= $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 --> <div class="row"> <div class="col-sm-12"> <p><a href="<?= base_url('admin/penawaran_excel_export'); ?>"><img src="<?= base_url('assets/admin/img/excel-icon.png'); ?>"> EXPORT KE MS EXCEL</a></p> <p>(Export File Excel)</p> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="table-responsive"> <table class="table table-striped"> <thead> <tr> <th>Tgl Penawaran</th> <th>No Penawaran</th> <th>Nama Sales</th> <th>Nama Konsumen</th> <th>Jumlah Total (Rp)</th> <th>Status Penawaran</th> <th>Lihat Penawaran</th> <th>Batalkan Penawaran</th> </tr> </thead> <tbody> <?php if(count($penawaran)) : ?> <?php $count = 0; ?> <?php foreach($penawaran as $item): ?> <?php $count++; ?> <tr> <td><?= date('j M Y H:i:s', strtotime($item->time_added)); ?></td> <td><?= $item->no_penawaran_harga; ?></td> <td> <?php $this->db->select('sales_name')->from('sales_list')->where('employee_id', $item->sales_id); $sales_name = $this->db->get()->row()->sales_name; echo ucwords($sales_name); ?> </td> <td> <?php $this->db->select('name, company_name')->from('customers')->where('id_customers', $item->customer_id); $customer_name = $this->db->get()->row(); if(!empty($customer_name->company_name)) { echo ucwords($customer_name->company_name); } else { echo ucwords($customer_name->name); } ?> </td> <td> <?php $grand_total = (($item->sub_total + $item->ppn - $item->redeemed_voucher_amount - $item->minus_reward_amount) + ($item->total_shipping_fee - $item->free_shipping)); echo number_format($grand_total); ?> </td> <td><?= strtoupper($item->status); ?></td> <td style="text-align: center;"><a target="_blank" href="<?= base_url(). 'admin/penawaran/generate_penawaran_harga/' . $item->id; ?>"><i class="fa fa-eye"></i></a></td> <?php if($item->status == 'pending') : ?> <td style="text-align: center;"><a id="cancel<?= $count; ?>" style="text-decoration: underline;" href="<?= base_url(). 'admin/penawaran/cancel/' . $item->id; ?>">BATALKAN <i class="fa fa-trash"></i></a></td> <?php elseif($item->status =='po') : ?> <td style="text-align: center;">-</td> <?php elseif($item->status == 'cancel') : ?> <td style="text-align: center;">SUDAH BATAL</td> <?php endif; ?> <script> $(document).ready(function() { $('#cancel<?= $count; ?>').on('click', function(e) { if(confirm("Yakin mau batalkan penawaran " + <?= $item->no_penawaran_harga; ?> + "?")) { return true; } else { e.preventDefault(); } }); }); </script> </tr> <?php endforeach; ?> <?php else: ?> <tr> <td colspan="3">Tidak ada penawaran.</td> </tr> <?php endif; ?> </tbody> </table> </div> </div><!-- end class="col-sm-12" --> </div> <!-- end row --> <div class="row"> <div class="col-sm-12"> <?php //create pagination... echo '<p style="text-align:center;">' . $this->pagination->create_links() . '</p>'; ?> </div><!-- end class="col-sm-12" --> </div> <!-- end row --> <script> $(document).ready(function() { $('#filter_key').change(function() { var filter_key = $(this).val(); if(filter_key == 'order_id'){ $('#order_id').show(); $('#payment_status').hide(); $('#payment_type').hide(); $('#date').hide(); $('#totalorder').hide(); } if((filter_key == 'voucher') || (filter_key == 'flashsale') || (filter_key == 'sale')){ $('#order_id').hide(); $('#payment_status').hide(); $('#payment_type').hide(); $('#date').hide(); $('#totalorder').hide(); } if(filter_key == 'payment_status'){ $('#order_id').hide(); $('#payment_status').show(); $('#payment_type').hide(); $('#date').hide(); $('#totalorder').hide(); } if(filter_key == 'payment_type'){ $('#order_id').hide(); $('#payment_status').hide(); $('#payment_type').show(); $('#date').hide(); $('#totalorder').hide(); } if(filter_key == 'date'){ $('#order_id').hide(); $('#payment_status').hide(); $('#payment_type').hide(); $('#date').show(); $('#totalorder').hide(); }if(filter_key == 'totalorder'){ $('#order_id').hide(); $('#payment_status').hide(); $('#payment_type').hide(); $('#date').hide(); $('#totalorder').show(); } }); }); </script>