Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table cellspacing="0" cellpadding="0">
- <tr>
- <th colspan="12" class="tops"></th>
- </tr>
- <tr>
- <th colspan="12"><br><u>MONTHLY INVENTORY AND CONSUMPTION REPORTS<u><br><br></th>
- </tr>
- <tr>
- <th colspan="5" style="text-align: left;">Department/Section: ENGINEERING AND FACILITIES MANAGEMENT SECTION<br><br></th>
- <th colspan="2" style="text-align: right;">Period Covered:<br><br></th>
- <th colspan="4"><input type="text" name="from" id="from" class="tcal"> to <input type="text" name="to" id="to" class="tcal"><br><br></th>
- <th><input type="submit" class="button" value=""><br><br></th></th>
- </tr>
- <tr>
- <th rowspan="3" width="500px" class="all">ITEMS</th>
- <th colspan="3" width="280px" class="top right">BEGINNING BALANCE</th>
- <th colspan="3" width="350px" class="top right">ADD - RECEIVED FROM SUPPLY</th>
- <th rowspan="3" width="80px" class="top right bottom">TOTAL QUANTITY RECEIVED</th>
- <th colspan="3" width="280px" class="top right">DEDUCT CONSUMPTION</th>
- <th rowspan="3" width="80px" class="top right bottom">TOTAL ENDING BALANCE</th>
- </tr>
- <tr>
- <td colspan="3" style="text-align: center;" class="right bottom"><font size="2px">(Stock on Hand prior to the Request)</font></td>
- <td colspan="3" style="text-align: center;" class="right bottom"><font size="2px">(Stock received for the Month Consumption)</font></td>
- <td colspan="3" style="text-align: center;" class="right bottom"><font size="2px">(Total Issuance to End-user)</font></td>
- </tr>
- <tr>
- <th width="80px" class="right bottom">Qty</th>
- <th width="100px" class="right bottom">Unit Cost</th>
- <th width="100px" class="right bottom">Total Cost</th>
- <th width="80px" class="right bottom">Qty</th>
- <th width="100px" class="right bottom">Unit Cost</th>
- <th width="100px" class="right bottom">Total Cost</th>
- <th width="80px" class="right bottom">Qty</th>
- <th width="100px" class="right bottom">Unit Cost</th>
- <th width="100px" class="right bottom">Total Cost</th>
- </tr>
- <?php
- include('connect/connection.php');
- $con = mysqli_connect('localhost','root','','efms');
- if (!$con) {
- die('Could not connect: ' . mysqli_error($con));
- }
- $from=@$_POST['from'];
- $to=@$_POST['to'];
- $query = "SELECT *, SUM(rqty), SUM(iqty), COUNT(item), COUNT(description) FROM issuances WHERE trandate BETWEEN '$from' AND '$to' GROUP BY item, description ORDER BY item ASC, id DESC";
- $result = mysql_query($query) or die(mysql_error());
- while($row = mysql_fetch_array($result)){
- $id=$row['id'];
- $item=$row['item'];
- $description=$row['description'];
- $stockno=$row['stockno'];
- $orderpoint=$row['orderpoint'];
- $rqty=$row['SUM(rqty)'];
- $iqty=$row['SUM(iqty)'];
- $bqty=$row['bqty'];
- $bbal=$bqty;
- $totqtyr=$bbal+$rqty;
- $totqtyb=$totqtyr-$iqty;
- echo "<tr>";
- echo "<th width='80px' class='left bottom right'>$item ( $description )</th>";
- echo "<th width='80px' class='right bottom'>$bbal</th>";
- echo "<th width='100px' class='right bottom'></th>";
- echo "<th width='100px' class='right bottom'></th>";
- echo "<th width='80px' class='right bottom'>$rqty</th>";
- echo "<th width='100px' class='right bottom'></th>";
- echo "<th width='100px' class='right bottom'></th>";
- echo "<th width='100px' class='right bottom'>$totqtyr</th>";
- echo "<th width='80px' class='right bottom'>$iqty</th>";
- echo "<th width='100px' class='right bottom'></th>";
- echo "<th width='100px' class='right bottom'></th>";
- echo "<th width='100px' class='right bottom'>$totqtyb</th>";
- echo "</tr>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement