D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
shubmkcj
/
urbane.createerp.com
/
Filename :
ajax-show-invoice-details.php
back
Copy
<?php require "config.php"; $id=$_POST['id']; $srinv=1; $dataRow=""; $sql = "SELECT * FROM `contact` where `id` = '$id'"; $result = mysqli_query($conn,$sql); if(mysqli_num_rows($result) > 0){ while($row = mysqli_fetch_array($result)){ $bill_display_name = $row["bill_display_name"]; } } $sqlAssign1 = "SELECT * FROM `generate_invoice` where `bill_pay_name`='$id' AND data_delete != 'yes' order by id desc"; $resultAssign1 = mysqli_query($conn, $sqlAssign1); if (mysqli_num_rows($resultAssign1) > 0) { while($rows = mysqli_fetch_assoc($resultAssign1)) { $aa=$rows['date']; $bb=$rows['proforma_id']; $cc=$rows['invoice_Id']; $dd=$rows['invoice_reference']; $ee=$rows['amount_paid']; $dataRow.="<tr><td>$srinv</td><td>$aa</td><td>$bb</td><td>$cc</td><td>$dd</td><td>$ee</td> </tr>"; $srinv++; } } $msg['status'] = "true"; $msg['datarows'] = $dataRow; $msg['dataRowCompanyName'] = ucwords(strtolower($bill_display_name)); echo json_encode( $msg ); ?>