fadlyshafa

Untitled

May 12th, 2020
65
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/delete/'); ?>'+id;
  15. }
  16. }
  17. </script>
  18. <script type="text/javascript">
  19. function change_status(status, id){
  20. if(status=='Partial'){
  21.  
  22.  
  23. $('.div_detail').html();
  24. $('.div_detail').show();
  25.  
  26. $.ajax({
  27. url: "<?php echo base_url('index.php/purchase/getDetail'); ?>",
  28. type: 'POST',
  29. data: {
  30. id : id
  31. },
  32. success: function(response){
  33. $('.div_detail').html(response);
  34. },
  35. error: function(xhr) {
  36. //Do Something to handle error
  37. alert('error occured!');
  38. }
  39. });
  40. }
  41. else{
  42. $('.div_detail').hide();
  43.  
  44. }
  45.  
  46. }
  47. </script>
  48.  
  49. <div class="content-wrapper">
  50. <!-- Content Header (Page header) -->
  51. <section class="content-header">
  52. <h5>
  53. <ol class="breadcrumb">
  54. <li><a href="<?php echo base_url('auth/dashboard'); ?>"><i class="fa fa-dashboard"></i> <?php echo $this->lang->line('header_dashboard'); ?></a></li>
  55. <li class="active"><?php echo $this->lang->line('header_purchase'); ?></li>
  56. </ol>
  57. </h5>
  58. </section>
  59. <!-- Main content -->
  60. <section class="content">
  61. <div class="row">
  62. <?php
  63. if($message = $this->session->flashdata('message')){
  64. ?>
  65. <div class="col-sm-12">
  66. <div class="alert alert-success">
  67. <button class="close" data-dismiss="alert" type="button">×</button>
  68. <?php echo $message; ?>
  69. <div class="alerts-con"></div>
  70. </div>
  71. </div>
  72. <?php
  73. }
  74. ?>
  75. <div class="col-md-12">
  76. <div class="box">
  77. <div class="box-header with-border">
  78. <h3 class="box-title"><?php echo $this->lang->line('purchase_list_purchase'); ?></h3>
  79. <?php if ($this->session->flashdata('success')) { ?>
  80. <div class="alert alert-success"> <?= $this->session->flashdata('success') ?> </div>
  81. <?php } ?>
  82. <?php if ($this->session->flashdata('fail')) { ?>
  83. <div class="alert alert-warning"> <?= $this->session->flashdata('fail') ?> </div>
  84. <?php } ?>
  85. <a class="btn btn-sm btn-danger pull-right" style="margin: 10px" href="<?php echo base_url('document/lists/po');?>">Document List</a>
  86. <a class="btn btn-sm btn-info pull-right" style="margin: 10px" href="<?php echo base_url('purchase/add');?>" title="Add New Purchase"><?php echo $this->lang->line('purchase_add_new_purchase'); ?></a>
  87. </div>
  88. <div class="box-body outer-scroll">
  89. <div class="inner-scroll">
  90. <table id="index" class="table table-bordered table-striped">
  91. <thead>
  92. <tr>
  93. <th><?php echo $this->lang->line('product_no'); ?></th>
  94. <th><?php echo $this->lang->line('purchase_date'); ?></th>
  95. <th><?php echo $this->lang->line('purchase_reference_no').'/No Permintaan'; ?></th>
  96. <th><?php echo $this->lang->line('purchase_supplier').'/Vendor'; ?></th>
  97. <th><?php echo $this->lang->line('purchase_purchase_status'); ?></th>
  98. <th>Status</th>
  99. <th><?php echo $this->lang->line('purchase_grand_total'); ?></th>
  100. <th><?php echo $this->lang->line('product_action'); ?></th>
  101. </tr>
  102. </thead>
  103. <tbody>
  104. <?php foreach ($data as $row) {
  105. // $data->total=number_format((float)$data->total,0,',','.');
  106. $id= $row->purchase_id; ?>
  107. <tr>
  108. <td></td>
  109. <td><?= date("d-m-Y", strtotime($row->podate)) ?></td>
  110. <td>
  111. <a href="<?= base_url('purchase/view/'.$id) ?>"><?= $row->reference_no ?></a>
  112. </td>
  113. <td><?php echo $row->supplier_name; ?></td>
  114. <td align="center">
  115. <?= status($row->purchase_id) ?>
  116. </td>
  117. <td align="middle">
  118. <?php if($row->status==1) { echo "Revisi"; }
  119. else if($row->status==2) { echo "Disetujui"; }
  120. else if($row->status==3) { echo "Ditolak"; }
  121. else if($row->status==4) { echo "Draft"; }
  122. else { echo "Dibuat"; }
  123. ?>
  124. </td>
  125. <td align="right"><?php echo $this->session->userdata('symbol').$row->total=number_format(($row->total),2); ?></td>
  126. <td align="center">
  127. <div class="dropdown">
  128. <button type="button" class="btn btn-default gropdown-toggle" data-toggle="dropdown">
  129. <?php echo $this->lang->line('product_action'); ?>
  130. <span class="caret"></span>
  131. </button>
  132. <ul class="dropdown-menu dropdown-menu-right">
  133. <!-- <li>
  134. <a href="<?php echo base_url('purchase/view/');?><?php echo $id; ?>"><i class="fa fa-file-text-o"></i><?php echo $this->lang->line('purchase_purchase_details'); ?></a>
  135. </li> -->
  136. <?php if($row->status==0 || $row->status==1){ ?>
  137. <li>
  138. <a href="<?php echo base_url('purchase/ditolak/'); ?><?php echo $id; ?>"><i class="fa fa-edit"></i>Ditolak</a>
  139. </li>
  140. <?php } if($row->status==0 || $row->status==1){ ?>
  141. <li>
  142. <a href="<?php echo base_url('purchase/disetujui/'); ?><?php echo $id; ?>"><i class="fa fa-close"></i>Disetujui</a>
  143. </li>
  144. <?php } if($row->status==0 || $row->status==1 || $row->status==4){ ?>
  145. <li>
  146. <a href="<?php echo base_url('purchase/edit/'); ?><?php echo $id; ?>"><i class="fa fa-edit"></i><?php echo $this->lang->line('purchase_edit_purchase'); ?></a>
  147. </li>
  148. <?php } if($row->status==0 || $row->status==2){ ?>
  149. <li>
  150. <a href="<?php echo base_url('purchase/revisi/'); ?><?php echo $id; ?>"><i class="fa fa-edit"></i>Revisi Purchase</a>
  151. </li>
  152.  
  153. <?php } ?>
  154. <!-- <li>
  155. <a href="<?php echo base_url('purchase/pdf/');?><?php echo $id; ?>" target="_blank "><i class="fa fa-file-pdf-o"></i><?php echo $this->lang->line('purchase_download_as_pdf'); ?></a>
  156. </li> -->
  157. <!-- <li>
  158. <a href="<?php echo base_url('purchase/email/');?><?php echo $id; ?>"><i class="fa fa-envelope"></i><?php echo $this->lang->line('purchase_email_purchase'); ?></a>
  159. </li> -->
  160.  
  161. <li>
  162. <a href="" data-toggle="modal" data-target="#voidModal<?php echo $id;?>"> <i class="fa fa-edit"></i>+ Input Void</a>
  163. </li>
  164. <li>
  165. <a href="" data-toggle="modal" data-target="#closepoModal<?php echo $id;?>"> <i class="fa fa-edit"></i>x Close PO</a>
  166. </li>
  167. <li>
  168. <a href="<?php echo base_url('purchase/delete_po/'.$id) ?>" class="btn-hapus"> <i class="fa fa-trash"></i>x Delete PO</a>
  169. </li>
  170.  
  171. <!-- <li>
  172. <a href="" data-toggle="modal" data-target="#shippingModal<?php echo $id;?>"> <i class="fa fa-edit"></i>Shipping</a>
  173. </li> -->
  174.  
  175. <!-- <?php if ($row->status == "2") { ?>
  176. <li>
  177. <a href="<?= base_url('document/lists/po/'.$id) ?>"> <i class="fa fa-file"></i>Document</a>
  178. </li>
  179. <?php } ?> -->
  180.  
  181. <?php if(strpos(status($row->purchase_id), 'Shipping')) { ?>
  182. <li>
  183. <a href="" data-toggle="modal" data-target="#cleranceModal<?php echo $id;?>"> <i class="fa fa-edit"></i>Costum Clearence</a>
  184. </li>
  185.  
  186. <?php } ?>
  187.  
  188. <!-- <li>
  189. <a href="javascript:delete_id(<?php echo $id;?>)"><i class="fa fa-trash-o"></i><?php echo $this->lang->line('purchase_delete_purchase'); ?></a>
  190. </li> -->
  191. </ul>
  192. </div>
  193. </td>
  194. </tr>
  195. <?php } ?>
  196. </tbody>
  197. <tfoot>
  198. <tr>
  199. <th><?php echo $this->lang->line('product_no'); ?></th>
  200. <th><?php echo $this->lang->line('purchase_date'); ?></th>
  201. <th><?php echo $this->lang->line('purchase_reference_no').'/No Permintaan'; ?></th>
  202. <th><?php echo $this->lang->line('purchase_supplier').'/Vendor'; ?></th>
  203. <th><?php echo $this->lang->line('purchase_purchase_status'); ?></th>
  204. <th>Status</th>
  205. <th><?php echo $this->lang->line('purchase_grand_total'); ?></th>
  206. <th><?php echo $this->lang->line('product_action'); ?></th>
  207. </tr>
  208. </tfoot>
  209. </table>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. </section>
  216. </div>
  217. <?php
  218. foreach ($data as $row)
  219. {
  220. $id= $row->purchase_id;
  221. ?>
  222. <div id="voidModal<?php echo $id;?>" class="modal fade" role="dialog">
  223. <div class="modal-dialog">
  224. <div class="modal-content">
  225. <div class="modal-header">
  226. <button type="button" class="close" data-dismiss="modal">&times;</button>
  227. Confirm Void Data
  228. </h4>
  229. </div>
  230. <div class="modal-body">
  231. <div class="control-group">
  232. <div class="controls">
  233. <div class="tabbable">
  234. <div class="box-body">
  235. <div class="row">
  236. <form method="post" action="<?php echo base_url('purchase/editVoid');?>">
  237. <input type="hidden" name="id" id="id" value="<?php echo $row->purchase_id;?>">
  238. <div class="col-md-9">
  239. <div class="form-group">
  240. <label for="customer_name">
  241. <?php echo "Are you sure to void this item ".$row->reference_no." ?"; ?>
  242. </label>
  243. </div>
  244. <div class="form-group">
  245. <label for="voiddesc">
  246. <?php echo "Description of Void"; ?>
  247. </label>
  248. <textarea class="form-control" id="voiddesc" rows="4" name="voiddesc"><?php echo set_value('address'); ?></textarea>
  249. </div>
  250. </div>
  251.  
  252. <div class="col-sm-12">
  253. <div class="box-footer">
  254. <input type="submit" id="btn_submit" class="btn btn-info" value="Confirm">&nbsp;&nbsp;&nbsp;
  255. <span class="btn btn-default" id="cancel" style="margin-left: 2%" data-dismiss="modal">
  256. <?php echo "Cancel"; ?>
  257. </span>
  258. </div>
  259. </div>
  260. </form>
  261. </div>
  262. </div>
  263. <div class="modal-footer">
  264. <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('product_close'); ?></button>
  265. </div>
  266. </div>
  267. </div>
  268. </div> <!-- /controls -->
  269. </div> <!-- /control-group -->
  270. </div>
  271. </div>
  272. </div>
  273.  
  274. <div id="closepoModal<?php echo $id;?>" class="modal fade" role="dialog">
  275. <div class="modal-dialog">
  276. <div class="modal-content">
  277. <div class="modal-header">
  278. <button type="button" class="close" data-dismiss="modal">&times;</button>
  279. Confirm Close PO
  280. </h4>
  281. </div>
  282. <div class="modal-body">
  283. <div class="control-group">
  284. <div class="controls">
  285. <div class="tabbable">
  286. <div class="box-body">
  287. <div class="row">
  288. <form method="post" action="<?php echo base_url('purchase/editClosepo');?>">
  289. <input type="hidden" name="id" id="id" value="<?php echo $row->purchase_id;?>">
  290. <div class="col-md-9">
  291. <div class="form-group">
  292. <label for="customer_name">
  293. <input type="hidden" name="reference_no" value="<?php echo $row->reference_no; ?>">
  294. </label>
  295. </div>
  296. <div class="form-group">
  297. <label for="voiddesc">
  298. <?php echo "Description of Close PO"; ?>
  299. </label>
  300. <textarea class="form-control" id="closepo" rows="6" name="closepo"><?php echo set_value('address'); ?></textarea>
  301. </div>
  302. </div>
  303.  
  304. <div class="col-sm-12">
  305. <div class="box-footer">
  306. <input type="submit" id="btn_submit" class="btn btn-info" value="Confirm">&nbsp;&nbsp;&nbsp;
  307. <span class="btn btn-default" id="cancel" style="margin-left: 2%" data-dismiss="modal">
  308. <?php echo "Cancel"; ?>
  309. </span>
  310. </div>
  311. </div>
  312. </form>
  313. </div>
  314. </div>
  315. <div class="modal-footer">
  316. <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('product_close'); ?></button>
  317. </div>
  318. </div>
  319. </div>
  320. </div> <!-- /controls -->
  321. </div> <!-- /control-group -->
  322. </div>
  323. </div>
  324. </div>
  325.  
  326. <div id="shippingModal<?php echo $id;?>" class="modal fade" role="dialog">
  327. <div class="modal-dialog">
  328. <!-- Modal content-->
  329. <div class="modal-content">
  330. <div class="modal-header">
  331. <button type="button" class="close" data-dismiss="modal">&times;</button>
  332. <h4><!-- <?php echo $this->lang->line('product_hsn_sac_lookup'); ?> -->
  333. Add Shipping Data
  334. </h4>
  335. </div>
  336. <div class="modal-body">
  337. <div class="control-group">
  338. <div class="controls">
  339. <div class="tabbable">
  340. <div class="box-body">
  341. <div class="row">
  342. <form method="post" action="<?php echo base_url('purchase/editShipping');?>" enctype="multipart/form-data">
  343. <input type="hidden" name="id" id="id" value="<?php echo $row->purchase_id;?>">
  344. <div class="col-md-9">
  345. <div class="form-group">
  346. <label for="customer_name">
  347. <?php echo "Shipping Data :".$row->reference_no." ?"; ?>
  348. </label>
  349. </div>
  350. </div>
  351.  
  352. <div class="col-md-9">
  353. <div class="form-group">
  354. <label for="shipstatus"><!-- Country -->
  355. <?php echo "Status"; ?>
  356. </label>
  357. <select class="form-control select2" id="shipstatus" name="shipstatus" style="width: 100%;" onchange="change_status(this.value, <?php echo $id; ?>)">
  358. <option value="Full">Full</option>
  359. <option value="Partial">Partial</option>
  360. </select>
  361. </div>
  362. </div>
  363.  
  364. <div class="col-md-9">
  365. <div class="form-group">
  366. <label for="awb">
  367. <?php echo "AWB/HAWB"; ?>
  368. </label>
  369. <input type="text" class="form-control" id="shipawb" name="shipawb" value="<?php echo set_value('customer_name'); ?>">
  370. </div>
  371. </div>
  372.  
  373. <div class="col-md-9">
  374. <div class="form-group">
  375. <label for="shipdate">
  376. <?php echo "Date"; ?>
  377. </label>
  378. <input type="text" class="form-control datepicker" id="shipdate" name="shipdate" value="<?php echo set_value('customer_name'); ?>">
  379. </div>
  380. </div>
  381.  
  382. <div class="col-md-9">
  383. <div class="form-group">
  384. <label for="trackno">
  385. <?php echo "Tracking No"; ?>
  386. </label>
  387. <input type="text" class="form-control" id="shiptrackno" name="shiptrackno" value="<?php echo set_value('customer_name'); ?>">
  388. </div>
  389. </div>
  390.  
  391. <div class="col-md-9">
  392. <div class="form-group">
  393. <label for="courier">
  394. <?php echo "Courier"; ?>
  395. </label>
  396. <input type="text" class="form-control" id="shipcourier" name="shipcourier" value="<?php echo set_value('customer_name'); ?>">
  397. </div>
  398. </div>
  399.  
  400. <div class="col-md-9">
  401. <div class="form-group">
  402. <label for="freight">
  403. <?php echo "Freight"; ?>
  404. </label>
  405. <input type="text" class="form-control" id="shipfreight" name="shipfreight" value="<?php echo set_value('customer_name'); ?>">
  406. </div>
  407. </div>
  408.  
  409. <div class="col-md-9">
  410. <div class="form-group">
  411. <label for="shipfile">
  412. <?php echo "Attach File"; ?>
  413. </label>
  414. <input type="file" class="form-control" id="shipfile" name="shipfile" value="<?php echo set_value('customer_name'); ?>">
  415. </div>
  416. </div>
  417.  
  418. <div class="col-md-9">
  419. <div class="form-group">
  420. <label for="shipto">
  421. <?php echo "Ship TO"; ?>
  422. </label>
  423. <input type="text" class="form-control" id="shipto" name="shipto" value="<?php echo set_value('customer_name'); ?>">
  424. </div>
  425. </div>
  426. <div class="div_detail">
  427. </div>
  428. <div class="col-sm-12">
  429. <div class="box-footer">
  430. <input type="submit" id="btn_submit" class="btn btn-info" value="Confirm">&nbsp;&nbsp;&nbsp;
  431. <span class="btn btn-default" id="cancel" style="margin-left: 2%" data-dismiss="modal">
  432. <?php echo "Cancel"; ?>
  433. </span>
  434. </div>
  435. </div>
  436.  
  437. </form>
  438. </div>
  439. <!-- /.box-body -->
  440. </div>
  441. <div class="modal-footer">
  442. <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('product_close'); ?></button>
  443. </div>
  444. </div>
  445. </div>
  446. </div> <!-- /controls -->
  447. </div> <!-- /control-group -->
  448. </div>
  449. </div>
  450. </div>
  451.  
  452.  
  453. <div id="cleranceModal<?php echo $id;?>" class="modal fade" role="dialog">
  454. <div class="modal-dialog">
  455. <!-- Modal content-->
  456. <div class="modal-content">
  457. <div class="modal-header">
  458. <button type="button" class="close" data-dismiss="modal">&times;</button>
  459. <h4><!-- <?php echo $this->lang->line('product_hsn_sac_lookup'); ?> -->
  460. Add Clerance Data
  461. </h4>
  462. </div>
  463. <div class="modal-body">
  464. <div class="control-group">
  465. <div class="controls">
  466. <div class="tabbable">
  467. <div class="box-body">
  468. <div class="row">
  469. <form method="post" action="<?php echo base_url('purchase/editClerance');?>" enctype="multipart/form-data">
  470. <input type="hidden" name="id" id="id" value="<?php echo $row->purchase_id;?>">
  471. <div class="col-md-9">
  472. <div class="form-group">
  473. <label for="customer_name">
  474. <?php echo "Clerance Data :".$row->reference_no." ?"; ?>
  475. </label>
  476. </div>
  477. </div>
  478.  
  479. <div class="col-md-9">
  480. <div class="form-group">
  481. <label for="awb">
  482. <?php echo "AWB/HAWB"; ?>
  483. </label>
  484. <input type="text" class="form-control" id="cleranceawb" name="cleranceawb" value="<?php echo set_value('customer_name'); ?>">
  485. </div>
  486. </div>
  487.  
  488. <div class="col-md-9">
  489. <div class="form-group">
  490. <label for="clerance">
  491. <?php echo "Date Of Arrival On Port"; ?>
  492. </label>
  493. <input type="text" class="form-control datepicker" id="clerancedate" name="clerancedate" value="<?php echo set_value('customer_name'); ?>">
  494. </div>
  495. </div>
  496.  
  497. <div class="col-md-9">
  498. <div class="form-group">
  499. <label for="trackno">
  500. <?php echo "Tracking No"; ?>
  501. </label>
  502. <input type="text" class="form-control" id="clerancetrackno" name="clerancetrackno" value="<?php echo set_value('customer_name'); ?>">
  503. </div>
  504. </div>
  505.  
  506. <div class="col-md-9">
  507. <div class="form-group">
  508. <label for="courier">
  509. <?php echo "Courier"; ?>
  510. </label>
  511. <input type="text" class="form-control" id="clerancecourier" name="clerancecourier" value="<?php echo set_value('customer_name'); ?>">
  512. </div>
  513. </div>
  514.  
  515. <div class="col-md-9">
  516. <div class="form-group">
  517. <label for="freight">
  518. <?php echo "Freight"; ?>
  519. </label>
  520. <input type="text" class="form-control" id="clerancefreight" name="clerancefreight" value="<?php echo set_value('customer_name'); ?>">
  521. </div>
  522. </div>
  523.  
  524. <div class="col-md-9">
  525. <div class="form-group">
  526. <label for="shipfile">
  527. <?php echo "Attach File"; ?>
  528. </label>
  529. <input type="file" class="form-control" id="clerancefile" name="clerancefile" value="<?php echo set_value('customer_name'); ?>">
  530. </div>
  531. </div>
  532.  
  533. <div class="col-md-9">
  534. <div class="form-group">
  535. <label for="clerancepib">
  536. <?php echo "PIB no"; ?>
  537. </label>
  538. <input type="text" class="form-control" id="clerancepib" name="clerancepib" value="<?php echo set_value('customer_name'); ?>">
  539. </div>
  540. </div>
  541.  
  542. <div class="col-md-9">
  543. <div class="form-group">
  544. <label for="clerancepib">
  545. <?php echo "Estimate Duty And Tax"; ?>
  546. </label>
  547. <input type="text" class="form-control" id="dutytax" name="dutytax" value="<?php echo set_value('customer_name'); ?>">
  548. </div>
  549. </div>
  550.  
  551.  
  552. <div class="col-sm-12">
  553. <div class="box-footer">
  554. <input type="submit" id="btn_submit" class="btn btn-info" value="Confirm">&nbsp;&nbsp;&nbsp;
  555. <span class="btn btn-default" id="cancel" style="margin-left: 2%" data-dismiss="modal">
  556. <?php echo "Cancel"; ?>
  557. </span>
  558. </div>
  559. </div>
  560.  
  561. </form>
  562. </div>
  563. <!-- /.box-body -->
  564. </div>
  565. <div class="modal-footer">
  566. <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $this->lang->line('product_close'); ?></button>
  567. </div>
  568. </div>
  569. </div>
  570. </div> <!-- /controls -->
  571. </div> <!-- /control-group -->
  572. </div>
  573. </div>
  574. </div>
  575.  
  576. <!-- modal hapus -->
  577. <div class="modal fade" id="modal-hapus" tabindex="-1" role="dialog" aria-labelledby="modal-notification" aria-hidden="true">
  578. <div class="modal-dialog modal-default modal-dialog-centered modal-" role="document">
  579. <div class="modal-content bg-gradient-danger">
  580.  
  581. <div class="modal-header">
  582. <h6 class="modal-title" id="modal-title-notification">Your attention is required</h6>
  583. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  584. <span aria-hidden="true">×</span>
  585. </button>
  586. </div>
  587.  
  588. <div class="modal-body">
  589.  
  590. <div class="py-3 text-center">
  591. <i class="ni ni-bell-55 ni-3x"></i>
  592. <h4 class="heading mt-4">Apakah kamu yakin ingin menghapus data ini?</h4>
  593. </div>
  594.  
  595. </div>
  596.  
  597. <div class="modal-footer">
  598. <form action="" method="post">
  599. <p>
  600. <button type="submit" class="btn btn-danger btn-flat btn-sm menu-sidebar">Ok, Hapus</button>
  601. <button type="button" class="btn btn-link text-white ml-auto" data-dismiss="modal">Close</button>
  602. </p>
  603. </form>
  604. </div>
  605.  
  606. </div>
  607. </div>
  608. </div>
  609.  
  610. <?php } ?>
  611.  
  612. <?php
  613. $this->load->view('layout/footer2');
  614. ?>
  615.  
  616. <script type="text/javascript">
  617. $(document).ready(function(){
  618. $('body').on('click','.btn-hapus',function(e){
  619. e.preventDefault();
  620. var url = $(this).attr('href');
  621.  
  622. $('#modal-hapus').find('form').attr('action',url);
  623. $('#modal-hapus').modal();
  624. });
  625. });
  626. </script>
RAW Paste Data