-
Notifications
You must be signed in to change notification settings - Fork 10
/
view_custom_bill.php
68 lines (56 loc) · 2.42 KB
/
view_custom_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
68
<?php
require 'config.php';
require 'conversion.php';
$conn = connection();
$id = $_REQUEST['id'];
$query = "SELECT * FROM bill_records WHERE bill_id = '$id'";
$rec = $conn->query($query);
foreach ($rec as $key => $value) {
$uid = $value['bill_uid'];
}
$pro = "SELECT * FROM custom_products WHERE cp_uid = '$uid'";
$detail = $conn->query($pro);
?>
<link rel="stylesheet" type="text/css" href="assets/lib/perfect-scrollbar/css/perfect-scrollbar.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/lib/material-design-icons/css/material-design-iconic-font.min.css"/>
<link rel="stylesheet" href="assets/css/style.css" type="text/css"/>
<table align="center" border="1px dotted black;" width="90%">
<tr>
<h1 style="text-decoration: underline; font-style: italic;
"><center><strong>ESTIMATE</strong></center></h1>
<br>
</tr>
<tr>
<td colspan="2"><strong> Bill No. : <?php echo $value['bill_id']; ?></strong> </td>
<td colspan="3"><strong> M/S : <?php echo ucwords($value['bill_name']); ?></strong></td>
<td colspan="2"><strong> Date : <?php echo $value['bill_entrydt'];?></strong></td>
</tr>
<tr>
<td colspan="7"> </td>
</tr>
<tr>
<th><center>S.no.</center></th>
<th colspan="2"><center>Name Of Product</center></th>
<th><center>Price</center></th>
<th><center>Qty Req.</center></th>
<th><center>Amount</center></th>
</tr>
<?php $s=0; foreach ($detail as $key => $row) { $s++; ?>
<tr>
<td><center><?php echo $s; ?></center></td>
<td colspan="2"> <?php echo ucwords($row['cp_name']); ?></td>
<td><center><?php echo $row['cp_price']; ?></center></td>
<td><center><?php echo $row['cp_qty']; ?></center></td>
<td><center><?php echo $row['cp_price'] * $row['cp_qty'];?></center></td>
</tr>
<?php } ?>
<tr>
<td colspan="5"><strong> Rupees In Words : </strong><?php echo convertNumberToWordsForIndia($value['bill_amt']+$value['bill_tchrg']); ?></td>
<td colspan="2"><strong> Total : <?php echo $value['bill_amt']+$value['bill_tchrg']." /-"; ?></strong></td>
</tr>
<tr>
<td colspan="2"><strong> GSTIN : <?php echo $value['bill_gst']; ?></strong></td>
<td colspan="3"><strong> Transport Charge : <?php echo $value['bill_tchrg']; ?></strong></td>
<td colspan="2"><strong> Transport no : <?php echo $value['bill_tno']; ?></strong></td>
</tr>
</table>