D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
home
/
shubmkcj
/
urbane.createerp.com
/
Filename :
preview-details-item-code.php
back
Copy
<?php // session_start(); include 'config.php'; if(isset($_POST["data_f_contact_id"], $_POST["data_f_item_code_id"])) { $data_f_contact_id = $_POST["data_f_contact_id"]; $data_f_item_code_id = $_POST["data_f_item_code_id"]; $output = ''; $serNo=0; // $sqlinvoice_item="SELECT * FROM `invoice_item` a left join `generate_invoice` b on a.`invoice_reference` = b.`invoice_reference` where a.`item_code` = '$data_f_item_code_id' AND b.`bill_pay_name`='$data_f_contact_id' ORDER BY a.`price` ASC"; $sqlinvoice_item = "SELECT * FROM `proforma_item` a left join `proforma` b on a.`proforma_id` = b.`proforma_id` where a.`item_id` = '$data_f_item_code_id' AND b.`bill_pay_name`='$data_f_contact_id'"; echo $sqlinvoice_item; $result_item = mysqli_query($conn,$sqlinvoice_item); if(mysqli_num_rows($result_item) > 0){ while($item_row = mysqli_fetch_array($result_item)){ $inv_invoice_reference = $item_row["proforma_id"]; $inv_invoice_price = $item_row["price"]; $inv_invoice_item_code = $item_row["item_code"]; $party_id = $item_row["bill_pay_name"]; $party_pdate = $item_row["date"]; $sql_party = "SELECT * FROM `contact` where `data_delete` = 'NO' AND `id`='$party_id'"; $result_party = mysqli_query($conn,$sql_party); if(mysqli_num_rows($result_party) > 0){ while($row_party = mysqli_fetch_array($result_party)){ $customer_type = $row_party["customer_type"]; $bill_display_name = $row_party["bill_display_name"]; }} $output .= ' <tr> <td>'. ($serNo+=1) .'</td> <td><small>'. $inv_invoice_reference .'</small></td> <td>'. $party_pdate .'</td> <td>'. $inv_invoice_price .'</td> </tr> '; }}else{ $output .= ' <tr> <td colspan="4">No Record Found </td> </tr> '; } echo $output; } ?>