Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- $p = array('1','31','32','51','52');
- if(!(in_array($this->session->userdata('type'),$p))){
- redirect('auth/dashboard');
- }
- $this->load->view('layout/header');
- ?>
- <script type="text/javascript">
- function delete_id(id)
- {
- if(confirm('<?php echo $this->lang->line('product_delete_conform'); ?>'))
- {
- window.location.href='<?php echo base_url('purchase_return/delete/'); ?>'+id;
- }
- }
- </script>
- <div class="content-wrapper">
- <!-- Content Header (Page header) -->
- <section class="content-header">
- <h5>
- <ol class="breadcrumb">
- <li><a href="<?php echo base_url('auth/dashboard'); ?>"><i class="fa fa-dashboard"></i> <?php echo $this->lang->line('header_dashboard'); ?></a></li>
- <li class="active"><?php echo $this->lang->line('header_purchase_return'); ?></li>
- </ol>
- </h5>
- </section>
- <!-- Main content -->
- <section class="content">
- <div class="row">
- <!-- right column -->
- <div class="col-md-12">
- <div class="box">
- <div class="box-header with-border">
- <h3 class="box-title"><?php echo $this->lang->line('purchase_return_list_purchase_return'); ?></h3>
- <a class="btn btn-sm btn-info pull-right" style="margin: 10px" href="<?php echo base_url('purchase_return/add');?>" title="Add New Purchase"><?php echo $this->lang->line('purchase_return_add_new_purchase_return'); ?> </a>
- </div>
- <!-- /.box-header -->
- <div class="box-body">
- <div class="table-responsive">
- <table id="index" class="table table-bordered table-striped">
- <thead>
- <tr>
- <th><?php echo $this->lang->line('product_no'); ?></th>
- <th><?php echo $this->lang->line('purchase_date'); ?></th>
- <th><?php echo $this->lang->line('purchase_reference_no').'/ Nomor Permintaan'; ?></th>
- <th><?php echo $this->lang->line('purchase_supplier'); ?></th>
- <th><?php echo $this->lang->line('purchase_total'); ?></th>
- <th><?php echo $this->lang->line('product_action'); ?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach ($data as $row) {
- $id= $row->purchase_return_id;
- ?>
- <tr>
- <td></td>
- <td><?php echo $row->date; ?></td>
- <td><?php echo $row->reference_no; ?></td>
- <td><?php echo $row->supplier_name; ?></td>
- <td><?php echo $this->session->userdata('symbol').$row->total; ?></td>
- <td>
- <!-- <a href="" title="View Details" class="btn btn-xs btn-warning"><span class="fa fa-eye"></span></a> -->
- <a href="<?php echo base_url('purchase_return/edit/'); ?><?php echo $id; ?>" title="Edit" class="btn btn-xs btn-info"><span class="glyphicon glyphicon-edit"></span></a>
- <a href="javascript:delete_id(<?php echo $id;?>)" title="Delete" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span></a>
- </td>
- <?php
- }
- ?>
- <tfoot>
- <tr>
- <th><?php echo $this->lang->line('product_no'); ?></th>
- <th><?php echo $this->lang->line('purchase_date'); ?></th>
- <th><?php echo $this->lang->line('purchase_reference_no').'/ Nomor Permintaan'; ?></th>
- <th><?php echo $this->lang->line('purchase_supplier'); ?></th>
- <th><?php echo $this->lang->line('purchase_total'); ?></th>
- <th><?php echo $this->lang->line('product_action'); ?></th>
- </tr>
- </tfoot>
- </table>
- </div>
- <!-- /.box-body -->
- </div>
- </div>
- <!-- /.box -->
- </div>
- <!--/.col (right) -->
- </div>
- <!-- /.row -->
- </section>
- <!-- /.content -->
- </div>
- <!-- /.content-wrapper -->
- <?php
- $this->load->view('layout/footer');
- ?>
RAW Paste Data