| 35965 |
amit |
1 |
<section class="wrapper">
|
|
|
2 |
<div class="row">
|
|
|
3 |
<div class="col-lg-12">
|
|
|
4 |
<h3 class="page-header"><i class="icon_document_alt"></i>Bulk Order Approval Report</h3>
|
|
|
5 |
<ol class="breadcrumb">
|
|
|
6 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
7 |
<li><i class="icon_document_alt"></i>Approval Report</li>
|
|
|
8 |
</ol>
|
|
|
9 |
</div>
|
|
|
10 |
</div>
|
|
|
11 |
<div class="col-lg-12">
|
|
|
12 |
<div class="row" style="margin-bottom: 15px;">
|
|
|
13 |
<div class="col-md-3">
|
|
|
14 |
<label>Start Date</label>
|
|
|
15 |
<input type="date" id="reportStartDate" class="form-control" value="$startDate"/>
|
|
|
16 |
</div>
|
|
|
17 |
<div class="col-md-3">
|
|
|
18 |
<label>End Date</label>
|
|
|
19 |
<input type="date" id="reportEndDate" class="form-control" value="$endDate"/>
|
|
|
20 |
</div>
|
|
|
21 |
<div class="col-md-3" style="margin-top: 25px;">
|
|
|
22 |
<button class="btn btn-primary fetch-approval-report">Fetch</button>
|
|
|
23 |
</div>
|
|
|
24 |
</div>
|
|
|
25 |
|
|
|
26 |
<table class="table table-bordered table-striped table-condensed" id="approvalReportTable" style="width:100%">
|
|
|
27 |
<thead style="background:#F5F5F5;">
|
|
|
28 |
<tr>
|
|
|
29 |
<th>Transaction ID</th>
|
|
|
30 |
<th>Retailer</th>
|
|
|
31 |
<th>Created By</th>
|
|
|
32 |
<th>Created On</th>
|
|
|
33 |
<th>Status</th>
|
|
|
34 |
<th>Approved By</th>
|
|
|
35 |
<th>Approved On</th>
|
|
|
36 |
<th>Remark</th>
|
|
|
37 |
<th>Items</th>
|
|
|
38 |
</tr>
|
|
|
39 |
</thead>
|
|
|
40 |
<tbody>
|
|
|
41 |
#foreach($approval in $approvalModelList)
|
|
|
42 |
<tr>
|
|
|
43 |
<td>$approval.getTransactionId()</td>
|
|
|
44 |
<td>$!approval.getRetailerName()</td>
|
|
|
45 |
<td>$!approval.getCreatedBy()</td>
|
|
|
46 |
<td>#if($approval.getCreatedOn())$approval.getCreatedOn().format($dateTimeFormatter)#end</td>
|
|
|
47 |
<td>
|
|
|
48 |
#if($approval.getStatus() == "APPROVED")
|
|
|
49 |
<span class="label label-success">APPROVED</span>
|
|
|
50 |
#elseif($approval.getStatus() == "REJECTED")
|
|
|
51 |
<span class="label label-danger">REJECTED</span>
|
|
|
52 |
#else
|
|
|
53 |
<span class="label label-warning">PENDING</span>
|
|
|
54 |
#end
|
|
|
55 |
</td>
|
|
|
56 |
<td>$!approval.getApprovedBy()</td>
|
|
|
57 |
<td>#if($approval.getApprovedOn())$approval.getApprovedOn().format($dateTimeFormatter)#end</td>
|
|
|
58 |
<td>$!approval.getRemark()</td>
|
|
|
59 |
<td>
|
|
|
60 |
$approval.getLineItemModels().size() items
|
|
|
61 |
<button class="btn btn-xs btn-info" data-toggle="collapse" data-target="#items-$approval.getTransactionId()">Details</button>
|
|
|
62 |
<div id="items-$approval.getTransactionId()" class="collapse" style="margin-top:5px;">
|
|
|
63 |
<table class="table table-bordered table-condensed" style="font-size:12px;">
|
|
|
64 |
<thead>
|
|
|
65 |
<tr>
|
|
|
66 |
<th>Item ID</th>
|
|
|
67 |
<th>Name</th>
|
|
|
68 |
<th>Qty</th>
|
|
|
69 |
<th>DP</th>
|
|
|
70 |
<th>Selling Price</th>
|
|
|
71 |
</tr>
|
|
|
72 |
</thead>
|
|
|
73 |
<tbody>
|
|
|
74 |
#foreach($item in $approval.getLineItemModels())
|
|
|
75 |
<tr>
|
|
|
76 |
<td>$item.getItemId()</td>
|
|
|
77 |
<td>$item.getItemName()</td>
|
|
|
78 |
<td>$item.getItemQuantity()</td>
|
|
|
79 |
<td>$item.getDp()</td>
|
|
|
80 |
<td>$item.getSellingPrice()</td>
|
|
|
81 |
</tr>
|
|
|
82 |
#end
|
|
|
83 |
</tbody>
|
|
|
84 |
</table>
|
|
|
85 |
</div>
|
|
|
86 |
</td>
|
|
|
87 |
</tr>
|
|
|
88 |
#end
|
|
|
89 |
</tbody>
|
|
|
90 |
</table>
|
|
|
91 |
</div>
|
|
|
92 |
</section>
|
|
|
93 |
<script>
|
|
|
94 |
$(function () {
|
|
|
95 |
if ($.fn.DataTable) {
|
|
|
96 |
$('#approvalReportTable').DataTable({
|
|
|
97 |
"order": [],
|
|
|
98 |
"pageLength": 25
|
|
|
99 |
});
|
|
|
100 |
}
|
|
|
101 |
});
|
|
|
102 |
</script>
|