D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
home
/
shubmkcj
/
urbane.createerp.com
/
ajax
/
Filename :
show-profaramId-items.php
back
Copy
<?php //ini_set('display_errors',0); //error_reporting(0); ob_start(); session_start(); include_once("../config.php"); date_default_timezone_set( "Asia/Calcutta" ); $regDate = date( 'd-M-Y H:i' ); $trItem=''; $srNo=0; if (isset($_POST['data_proformaId'])) { $proforma_id = filter_var( $_POST['data_proformaId'], FILTER_SANITIZE_STRING ); $sql = "SELECT * FROM proforma_item a left join inventory b on a.item_id = b.id where a.proforma_id = '$proforma_id'"; $result =mysqli_query( $conn, $sql ); $count = mysqli_num_rows( $result ); if ($count) { while($item_row = mysqli_fetch_assoc($result)){ $item_image = $item_row['item_image']; $i_code=$item_row['item_code']; $i_name=$item_row['name']; $i_qty=$item_row['qty']; $i_unit=$item_row['unit_of_measure']; $srNo=$srNo+1; if(!empty($item_image)){ $if_image = '<img src="inventory/'.$item_image.'" width="50">'; }else{ $if_image = ''; } $trItem.=' <tr> <td>'.$srNo.'</td> <td>'.$i_code.'</td> <td>'.$i_name.'</td> <td>'.$if_image.'</td> <td>'.$i_qty.'</td> <td>'.$i_unit.'</td> </tr> '; } } else { $trItem. "0 results"; } echo $trItem; mysqli_close($conn); } ?>