98 lines
4.0 KiB
PHP
98 lines
4.0 KiB
PHP
|
<?php
|
||
|
include('pdf_header.php');
|
||
|
?>
|
||
|
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
|
||
|
|
||
|
<body>
|
||
|
<table width="100%">
|
||
|
<tr>
|
||
|
<div style="font-size:12px">
|
||
|
<td width="25%" align="left"> Run Date : <?php echo date("d-M-Y"); ?></td>
|
||
|
<td width="50%" align="center" style="font-size:40px"><strong>Item Received</strong></td>
|
||
|
<td width="25%" align="left"> User : <?php echo $username ?></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table border="1" width="100%">
|
||
|
<?php
|
||
|
|
||
|
$sql = base64_decode($filterkey);
|
||
|
|
||
|
$result = mysqli_query($conn, $sql);
|
||
|
|
||
|
|
||
|
?>
|
||
|
<strong>
|
||
|
<tr bgcolor="#eeeeee">
|
||
|
<td align="left" width="2%">Sr.</td>
|
||
|
<td align="left" width="10%">Receival No.</td>
|
||
|
<td align="left" width="10%">Receival Date</td>
|
||
|
<td align="left" width="10%">OHC Location</td>
|
||
|
<td align="left" width="10%">Issue No.</td>
|
||
|
<td valign="top" align="left" width="25%">Item Desc</td>
|
||
|
<td width="15%" valign="top" align="left">Requisition No/Direct Issue</td>
|
||
|
<td valign="top" align="left" width="15%">Remarks</td>
|
||
|
</strong></tr>
|
||
|
|
||
|
<?php
|
||
|
$count = 0;
|
||
|
while ($row1 = mysqli_fetch_assoc($result)) {
|
||
|
extract($row1);
|
||
|
$issue_ref_no = "";
|
||
|
$item_desc = "";
|
||
|
$item_unit_id = "";
|
||
|
$item_unit = "";
|
||
|
$ohc_type = "";
|
||
|
$status = "";
|
||
|
?>
|
||
|
<?php
|
||
|
|
||
|
// $issue_ref_no =$row_issue_items['issue_ref_no'];
|
||
|
// $issue_ref_no = getTableFieldValue('stock_issue','issue_ref_no','stock_issue_id',$row1['stock_issue_id']);
|
||
|
// $issue_date = getTableFieldValue('stock_issue','issue_date','stock_issue_id',$row_issue_items['stock_issue_id']);
|
||
|
// $ohc_type = getTableFieldValue('ohc_type','ohc_type_name','ohc_type_id',$row1['ohc_location_id']);
|
||
|
// echo $ohc_type;
|
||
|
$sql_received_items = "select * from received_issue_items where received_id='" . $row1['received_id'] . "'";
|
||
|
$results_received_items = mysqli_query($conn, $sql_received_items);
|
||
|
while ($row_received_items = mysqli_fetch_assoc($results_received_items)) {
|
||
|
|
||
|
if ($row_received_items['is_packaging_item'] == 'N') {
|
||
|
|
||
|
$item_desc = $item_desc . ' <p> ' . getTableFieldValue('tbl_items', 'item_name', 'item_id', $row_received_items['item_id']) . " ";
|
||
|
//$item_desc = $item_desc.getTableFieldValue('tbl_items','item_name','item_id',$row_received_items['item_id'])."<br/>";
|
||
|
$item_unit_id = getTableFieldValue('tbl_items', 'unit_id', 'item_id', $row_received_items['item_id']);
|
||
|
$item_unit = getTableFieldValue(' unit_master', 'unit_name', 'unit_id', $item_unit_id);
|
||
|
$item_desc = $item_desc . '<b> Qty: ' . $row_received_items['received_qty'] . ' ' . $item_unit . '</b>';
|
||
|
$item_desc = $item_desc . "</p>";
|
||
|
} else {
|
||
|
$item_desc = $item_desc . ' <p> ' . getTableFieldValue('tbl_items', 'item_name', 'item_id', $row_received_items['dispensary_item']) . " ";
|
||
|
//$item_desc = $item_desc.getTableFieldValue('tbl_items','item_name','item_id',$row_received_items['item_id'])."<br/>";
|
||
|
$item_unit_id = getTableFieldValue('tbl_items', 'unit_id', 'item_id', $row_received_items['dispensary_item']);
|
||
|
$item_unit = getTableFieldValue(' unit_master', 'unit_name', 'unit_id', $item_unit_id);
|
||
|
$item_desc = $item_desc . '<b> Qty: ' . $row_received_items['dis_item_qty'] . ' ' . $item_unit . '</b>';
|
||
|
$item_desc = $item_desc . "</p>";
|
||
|
}
|
||
|
}
|
||
|
$count = $count + 1;
|
||
|
?>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td><?php echo $count ?></td>
|
||
|
<td><?php echo $row1['received_ref_no'] ?></td>
|
||
|
<td><?php echo date_format(date_create($row1['received_date']), "d-M-Y ") ?></td>
|
||
|
<td><?php echo getTableFieldValue('ohc_type', 'ohc_type_name', 'ohc_type_id', $row1['ohc_location_id']) ?></td>
|
||
|
<td><?php echo getTableFieldValue('stock_issue', 'issue_ref_no', 'stock_issue_id', $row1['issue_id']) ?></td>
|
||
|
<td><?php echo $item_desc ?></td>
|
||
|
<td><?php echo ($row1['req_id'] != null && $row1['req_id'] != "") ? getTableFieldValue('requisition', 'req_ref_no', 'req_id', $row1['req_id']) : ('Direct Issue') ?></td>
|
||
|
<td><?php echo $row1['remarks'] ?></td>
|
||
|
</tr>
|
||
|
<?php
|
||
|
}
|
||
|
?>
|
||
|
</table>
|
||
|
</body>
|
||
|
<?php
|
||
|
include('pdf_footer.php');
|
||
|
?>
|