-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinvoices_old.php
More file actions
executable file
·101 lines (96 loc) · 4.84 KB
/
invoices_old.php
File metadata and controls
executable file
·101 lines (96 loc) · 4.84 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
require_once dirname(__FILE__).'/include/header.php';
require_once dirname(__FILE__).'/include/api.php';
require_once dirname(__FILE__).'/include/navbar.php';
$api = new API;
$response = $api->getInvoices();
?>
<?php if(!$response->error)
{
$invoices = $response->invoices;
?>
<div class="socialcodia" style="margin-top: -30px">
<div class="row">
<div class="col l12 s12 m12" style="padding: 30px 0px 30px 10px;">
<div class="card z-depth-0">
<div class="card-content">
<div class="input-field">
<input type="text" name="productName" autocomplete="off" id="productName" placeholder="" onkeyup="filterProduct()">
<label for="productName">Enter Product Name</label>
</div>
</div>
</div>
<div id="productList">
<div class="card z-depth-0">
<table id="mstrTable" class="highlight responsive-table ">
<thead>
<tr>
<th>Sr No</th>
<th>Image</th>
<th>Name</th>
<th>Invoice Number</th>
<th>Status</th>
<th>Total Amount</th>
<th>Paid Amount</th>
<th>Remaining Amount</th>
<th>Invoice Date</th>
<th>Action</th>
</tr>
</thead>
<tbody id="tableBody">
<tr>
<?php
$count = 1;
foreach ($invoices as $invoice)
{
$color = 'blue';
$image = $invoice->sellerImage;
if (!isset($image) && empty($image))
$image = 'src/img/user.png';
$invoicePaidAmount = (int) $invoice->invoicePaidAmount;
$invoiceRemainingAmount = (int) $invoice->invoiceRemainingAmount;
if (empty($invoicePaidAmount))
$invoicePaidAmount = 0;
if (empty($invoiceRemainingAmount))
$invoiceRemainingAmount = 0;
if ($invoice->invoiceStatus=='UNPAID')
$color = 'red';
echo "<tr>";
echo "<td>$count</td>";
echo "<td><img src='$image' class='circle' style='width:50px; height:50px; border:2px solid red'/></td>";
echo "<td class='blue-text darken-4'>$invoice->sellerName</td>";
echo "<td style='font-weight:bold'>$invoice->invoiceNumber</td>";
echo "<td class='blue-text darken-4 chip $color white-text' style='margin-top:25px;'>$invoice->invoiceStatus</td>";
echo "<td>$invoice->invoiceAmount</td>";
echo "<td>$invoicePaidAmount</td>";
echo "<td>$invoiceRemainingAmount</td>";
echo "<td class='blue-text darken-4'>$invoice->invoiceDate</td>";
echo '<td><a href="invoice?inum='.$invoice->invoiceNumber.'" style="border: 1px solid white;border-radius: 50%;" class="btn blue" data-position="top" data-tooltip="View Invoice"><i class="material-icons white-text">remove_red_eye
</i></a>';
echo '<a href="payment?inum='.$invoice->invoiceNumber.'" style="border: 1px solid white;border-radius: 50%;" class="btn red" data-position="top" data-tooltip="Pay Amount"><i class="material-icons white-text">attach_money
</i></a></td>';
$count++;
echo "</tr>";
}
?>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?php }
else
{
?>
<div class="socialcodia center">
<h4>No Invoices Found</h4>
<img class="verticalCenter socialcodia" src="src/img/empty_cart.svg">
</div>
<?php
}
?>
<?php require_once dirname(__FILE__).'/include/sidenav.php'; ?>
<?php require_once dirname(__FILE__).'/include/footer.php'; ?>