fadlyshafa

Untitled

Jun 10th, 2020
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. $p = array('1','31','32','51','52');
  4. if(!(in_array($this->session->userdata('type'),$p))){
  5. redirect('auth/dashboard');
  6. }
  7. $this->load->view('layout/header');
  8. ?>
  9. <script type="text/javascript">
  10. function delete_id(id)
  11. {
  12. if(confirm('<?php echo $this->lang->line('product_delete_conform'); ?>'))
  13. {
  14. window.location.href='<?php echo base_url('purchase_return/delete/'); ?>'+id;
  15. }
  16. }
  17. </script>
  18. <div class="content-wrapper">
  19. <!-- Content Header (Page header) -->
  20. <section class="content-header">
  21. <h5>
  22. <ol class="breadcrumb">
  23. <li><a href="<?php echo base_url('auth/dashboard'); ?>"><i class="fa fa-dashboard"></i> <?php echo $this->lang->line('header_dashboard'); ?></a></li>
  24. <li class="active"><?php echo $this->lang->line('header_purchase_return'); ?></li>
  25. </ol>
  26. </h5>
  27. </section>
  28. <!-- Main content -->
  29. <section class="content">
  30. <div class="row">
  31. <!-- right column -->
  32. <div class="col-md-12">
  33. <div class="box">
  34. <div class="box-header with-border">
  35. <h3 class="box-title"><?php echo $this->lang->line('purchase_return_list_purchase_return'); ?></h3>
  36. <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>
  37. </div>
  38. <!-- /.box-header -->
  39. <div class="box-body">
  40. <div class="table-responsive">
  41. <table id="index" class="table table-bordered table-striped">
  42. <thead>
  43. <tr>
  44. <th><?php echo $this->lang->line('product_no'); ?></th>
  45. <th><?php echo $this->lang->line('purchase_date'); ?></th>
  46. <th><?php echo $this->lang->line('purchase_reference_no').'/ Nomor Permintaan'; ?></th>
  47. <th><?php echo $this->lang->line('purchase_supplier'); ?></th>
  48. <th><?php echo $this->lang->line('purchase_total'); ?></th>
  49. <th><?php echo $this->lang->line('product_action'); ?></th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. <?php
  54. foreach ($data as $row) {
  55. $id= $row->purchase_return_id;
  56. ?>
  57. <tr>
  58. <td></td>
  59. <td><?php echo $row->date; ?></td>
  60. <td><?php echo $row->reference_no; ?></td>
  61. <td><?php echo $row->supplier_name; ?></td>
  62. <td><?php echo $this->session->userdata('symbol').$row->total; ?></td>
  63. <td>
  64. <!-- <a href="" title="View Details" class="btn btn-xs btn-warning"><span class="fa fa-eye"></span></a>&nbsp;&nbsp; -->
  65. <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>&nbsp;&nbsp;
  66. <a href="javascript:delete_id(<?php echo $id;?>)" title="Delete" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span></a>
  67. </td>
  68. <?php
  69. }
  70. ?>
  71. <tfoot>
  72. <tr>
  73. <th><?php echo $this->lang->line('product_no'); ?></th>
  74. <th><?php echo $this->lang->line('purchase_date'); ?></th>
  75. <th><?php echo $this->lang->line('purchase_reference_no').'/ Nomor Permintaan'; ?></th>
  76. <th><?php echo $this->lang->line('purchase_supplier'); ?></th>
  77. <th><?php echo $this->lang->line('purchase_total'); ?></th>
  78. <th><?php echo $this->lang->line('product_action'); ?></th>
  79. </tr>
  80. </tfoot>
  81. </table>
  82. </div>
  83. <!-- /.box-body -->
  84. </div>
  85. </div>
  86. <!-- /.box -->
  87. </div>
  88. <!--/.col (right) -->
  89. </div>
  90. <!-- /.row -->
  91. </section>
  92. <!-- /.content -->
  93. </div>
  94. <!-- /.content-wrapper -->
  95. <?php
  96. $this->load->view('layout/footer');
  97. ?>
RAW Paste Data