davidjmorin

Invoice Display

Oct 13th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.54 KB | None | 0 0
  1. <head>
  2. <link href="http://admin.ourscorecard.com/css/navbar.css" rel="stylesheet" type="text/css">
  3.  
  4. </head>
  5.  
  6. <?php
  7. session_start();
  8. if (!isset($_SESSION['loggedin'])) {
  9.     header('Location: http://admin.ourscorecard.com/index.php');
  10.     exit();
  11. }
  12.  
  13. ?>
  14. <?php
  15.  
  16. include "config.php";
  17. $owner = $_SESSION['role'];
  18. ?>
  19. <?php include "../../assets/navbar.php" ?>
  20. <div>
  21.  
  22.  <form method='post' action='../finance/export/download.php'>
  23.   <input type='submit' value='Export' name='Export'>
  24.  
  25.   <table id="invoice_table">
  26.     <tr>
  27. <tr class="invheader">
  28. <th>Reference Number</th>
  29. <th>Memo</th>
  30. <th>Trans. Date</th>
  31. <th>Due Date</th>
  32. <th>Location</th>
  33. <th>PO Number</th>
  34. <th>Item Amount</th>
  35. <th>Pre Order #</th>
  36. <th>Quantity</th>
  37. <th>Vendor</th>
  38. <th>Balance</th>
  39. </tr>
  40.     </tr>
  41.     <?php
  42.      $owner = $_SESSION['role'];
  43.      $query = "SELECT l.AddressCode,
  44. l.owner,
  45. l.City,
  46. l.State,
  47. l.Zip,
  48. i.RefNumber,
  49. i.memo,
  50. i.Txndate,
  51. i.DueDate,
  52. i.ItemCustomerFullName,
  53. i.PO_number ,
  54. i.ItemAmount,
  55. i.PO_number,
  56. i.preorder_,
  57. i.Quantity,
  58. i.Vendor,
  59. i.balance
  60. FROM imw_locations l
  61. INNER JOIN vzw_invoice i
  62. ON l.AddressCode=i.ItemCustomerFullName
  63. WHERE l.owner='" . $owner . "'
  64. ";
  65.      $result = mysqli_query($con,$query);
  66.      $user_arr = array();
  67.      while($row = mysqli_fetch_array($result)){
  68.       $ref = $row['RefNumber'];
  69.       $memo = $row['memo'];
  70.       $Txndate = $row['Txndate'];
  71.       $duedate = $row['DueDate'];
  72.       $ItemCustomerFullName = $row['City'];
  73.       $PO_number = $row['PO_number'];
  74.       $ItemAmount = $row['ItemAmount'];
  75.       $preorder_ = $row['preorder_'];
  76.       $Quantity = $row['Quantity'];
  77.       $Vendor = $row['Vendor'];
  78.       $balance = $row['balance'];
  79.       $user_arr[] = array($ref,$memo,$Txndate,$duedate,$ItemCustomerFullName,$PO_number,$ItemAmount,$preorder_,$Quantity,$Vendor,$balance);
  80.    ?>
  81.       <tr>
  82.      
  83.        <td><?php echo $ref; ?></td>
  84.        <td><?php echo $memo; ?></td>
  85.        <td><?php echo $Txndate; ?></td>
  86.        <td><?php echo $duedate; ?></td>
  87.        <td><?php echo $ItemCustomerFullName; ?></td>
  88.        <td><?php echo $PO_number; ?></td>
  89.        <td><?php echo $ItemAmount; ?></td>
  90.        <td><?php echo $preorder_; ?></td>
  91.        <td><?php echo $Quantity; ?></td>
  92.        <td><?php echo $Vendor; ?></td>
  93.        <td><?php echo $balance; ?></td>
  94.        <td><? php echo $owner; ?></td>
  95.  
  96.       </tr>
  97.    <?php
  98.     }
  99.    ?>
  100.    </table>
  101.    <?php
  102.     $serialize_user_arr = serialize($user_arr);
  103.    ?>
  104.   <textarea name='export_data' style='display: none;'><?php echo $serialize_user_arr; ?></textarea>
  105.  </form>
  106. </div>
Advertisement
Add Comment
Please, Sign In to add comment