150 lines
3.5 KiB
PHP
150 lines
3.5 KiB
PHP
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
|
||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
|
||
|
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
|
||
|
<style type="text/css">
|
||
|
<!--
|
||
|
.style1 {font-size: small}
|
||
|
-->
|
||
|
</style>
|
||
|
<?php
|
||
|
|
||
|
include('includes/config/config.php');
|
||
|
include('includes/functions.php');
|
||
|
$sql_for_requisition=" select * from requisition where req_id='".$_REQUEST['req_id']."'";
|
||
|
$result_for_requisition = mysqli_query($conn,$sql_for_requisition);
|
||
|
$row_for_requisition=@mysqli_fetch_array($result_for_requisition);
|
||
|
@extract($row_for_requisition);
|
||
|
?>
|
||
|
|
||
|
<style>
|
||
|
|
||
|
hr {
|
||
|
margin-top: 10px;
|
||
|
margin-bottom: 10px;
|
||
|
padding: 0px;
|
||
|
border: 0;
|
||
|
border-top: 1px solid #000;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<html>
|
||
|
<body>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div id="pdfModal">
|
||
|
<form class="form" id="reqPDFForm" name="reqPDFForm" method="post" target="_blank">
|
||
|
<div class="panel-body" >
|
||
|
|
||
|
|
||
|
<hr>
|
||
|
<table border="0" width="100%">
|
||
|
<tr>
|
||
|
<td align="center"><strong><font="24"><div>REQUISITION</font></strong></div></td>
|
||
|
</tr>
|
||
|
|
||
|
</table>
|
||
|
<hr/>
|
||
|
|
||
|
<table border="0" width="100%">
|
||
|
<tr>
|
||
|
<td width="15%" align="left" >Requisition No:</td>
|
||
|
<td width="45%"align="left" ><div id="reqStore"><?php echo $req_ref_no;?></div></td>
|
||
|
<td width="15%" align="left" >Remarks:</td>
|
||
|
<td width="22.5%" align="left" ><div id="reqRefNo"><?php echo $remarks;?></div></td>
|
||
|
|
||
|
|
||
|
<input type="hidden" name="htmlText" id="htmlText">
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td width="15%" align="left" >Requisition Date :</td>
|
||
|
<td width="45%"align="left" ><div id="reqRequestedBy"><?php echo date_format(date_create($req_date),"d-M-Y"); ?></div></td>
|
||
|
<td width="15%" align="left" > </td>
|
||
|
<td width="20%"align="left" ><div id="reqReqDate"></div></td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
</table>
|
||
|
|
||
|
|
||
|
<table border="1" width="100%" id="reqPdfTable" >
|
||
|
<tr>
|
||
|
<td bgcolor="#eeeeee" border="1" align="center" width="3%">Sr</td>
|
||
|
<td bgcolor="#eeeeee" border="1" align="center" width="60%">Item Description</td>
|
||
|
<td bgcolor="#eeeeee" border="1" align="center" width="14%">Quantity</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" ></td>
|
||
|
<td align="left" ></td>
|
||
|
<td align="right" ></td>
|
||
|
|
||
|
</tr>
|
||
|
<?php
|
||
|
$unitMap =getKeyValueMap('unit_master','unit_id','unit_name');
|
||
|
$count=1;
|
||
|
$sql_for_requisition_items=" select * from requisition_items where req_id=$req_id";
|
||
|
$result_for_requisition_items = mysqli_query($conn,$sql_for_requisition_items);
|
||
|
while($row_for_requisition_items=@mysqli_fetch_array($result_for_requisition_items)){?>
|
||
|
<tr>
|
||
|
<td align="center"><?php echo $count; ?></td>
|
||
|
<td align="center"><?php echo getTableFieldValue('tbl_items','item_name','item_id',$row_for_requisition_items['item_id']); ?></td>
|
||
|
<td align="center"><?php echo $row_for_requisition_items['qty']; ?> <?php echo $unitMap[getTableFieldValue('tbl_items','unit_id','item_id',$row_for_requisition_items['item_id'])] ;?></td>
|
||
|
</tr>
|
||
|
<?php
|
||
|
$count++;
|
||
|
}
|
||
|
|
||
|
|
||
|
?>
|
||
|
|
||
|
|
||
|
</table>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</body></html>
|
||
|
<style>
|
||
|
.modal-dialog {
|
||
|
padding: 15px;
|
||
|
width:90%;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<script>
|
||
|
//generateReqPdf();
|
||
|
function generateReqPdf(){
|
||
|
|
||
|
var content = $("#pdfModal").html();
|
||
|
$("#htmlText").val(content);
|
||
|
document.reqPDFForm.action="dynamic_pdf.php";
|
||
|
document.reqPDFForm.method="POST";
|
||
|
document.getElementById("reqPDFForm").submit();
|
||
|
|
||
|
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
|