-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathview_seller_bill.php
67 lines (61 loc) · 2.67 KB
/
view_seller_bill.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!-- VIEW BUTTON OF SELLER BILL DETAILS -->
<?php
$id = $_REQUEST['id'];
require 'config.php';
require 'conversion.php';
$conn = connection();
$bill_info = "SELECT * FROM `seller_bill_records` WHERE `bill_id` = $id";
$inf = $conn->query($bill_info);
foreach ($inf as $row) {
$uid = $row['bill_uid'];
}
$pro = "SELECT f.firm_name,c.cat_name,t.ty_name,bp.bp_qty,bp.bp_price,p.pro_price FROM `seller_bill_products` bp INNER JOIN product p ON p.pro_id = bp.bp_pid INNER JOIN category c ON c.cat_id=p.pro_grpid INNER JOIN type t ON t.ty_id=p.pro_typeid INNER JOIN firm f ON f.firm_id= p.pro_firmid WHERE bp.bp_uid = '$uid'";
$detail = $conn->query($pro);
?>
<table border="1" class="table table-condensed table-bordered" width="100%">
<tr>
<td colspan="7"><br>
<h1 style="text-decoration: underline;margin-top: -3%;"><center><strong>VSK Industry</strong></center></h1>
</td>
</tr>
<tr>
<td colspan="2">
<strong> Bill No. : <?php echo $row['bill_id']; ?></strong>
</td>
<td colspan="3">
<strong> M/S : <?php echo ucwords($row['bill_name']); ?></strong>
</td>
<td colspan="2">
<strong> Date : <?php echo $row['bill_entrydt']; ?></strong>
</td>
</tr>
<tr>
<th><strong><center>S. No.</center></strong></th>
<th><strong><center>FIRM</center></strong></th>
<th><strong><center>DESCRIPTION</center></strong></th>
<th><strong><center>SIZE</center></strong></th>
<th><strong><center>QUANTITY</center></strong></th>
<th><strong><center>RATE</center></strong></th>
<th><strong><center>AMOUNT</center></strong></th>
</tr>
<?php $s=0; foreach ($detail as $key => $value) { $s++; ?>
<tr>
<td><center><?php echo $s; ?></center></td>
<td> <?php echo ucwords($value['firm_name']); ?></td>
<td> <?php echo ucwords($value['cat_name']); ?></td>
<td><center><?php echo ucwords(strtoupper($value['ty_name'])); ?></center></td>
<td><center><?php echo $value['bp_qty']; ?></center></td>
<td><center><?php echo $value['bp_price']; ?></center></td>
<td><center><?php echo $value['bp_price'] * $value['bp_qty'];?></center></td>
</tr>
<?php } ?>
<tr>
<td colspan="5"><strong>Rupees In Words : <?php echo convertNumberToWordsForIndia($row['bill_amt']+$row['bill_tchrg']); ?></strong></td>
<td colspan="2"><strong>Total : <?php echo $row['bill_amt']+$row['bill_tchrg']." /-"; ?></strong></td>
</tr>
<tr>
<td colspan="3"><strong>GSTIN : <?php echo $row['bill_gst']; ?></strong></td>
<td colspan="2"><strong>Transport Charge : <?php echo $row['bill_tchrg']; ?></strong></td>
<td colspan="2"><strong>Transport no : <?php echo $row['bill_tno']; ?></strong></td>
</tr>
</table>