| 23506 |
amit.gupta |
1 |
<style>
|
|
|
2 |
.btn:hover{
|
|
|
3 |
color: grey;
|
|
|
4 |
text-decoration: none;
|
|
|
5 |
}
|
|
|
6 |
.btn-primary:hover{
|
|
|
7 |
color: grey;
|
|
|
8 |
text-decoration: none;
|
|
|
9 |
}
|
|
|
10 |
.retailer-details{
|
|
|
11 |
cursor:pointer;
|
|
|
12 |
}
|
|
|
13 |
</style>
|
|
|
14 |
|
|
|
15 |
<section class="wrapper">
|
|
|
16 |
<div class="row">
|
|
|
17 |
<div class="col-lg-12">
|
|
|
18 |
<h3 class="page-header"><i class="icon_document_alt"></i>View/Request Return</h3>
|
|
|
19 |
<ol class="breadcrumb">
|
|
|
20 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
21 |
<li><i class="icon_document_alt"></i>View Returnables</li>
|
|
|
22 |
</ol>
|
|
|
23 |
</div>
|
|
|
24 |
</div>
|
|
|
25 |
|
|
|
26 |
<div>
|
|
|
27 |
<div class="row"><strong>Stock older than $ageDays days could be requested for Return</strong></div>
|
|
|
28 |
<div class="row">
|
|
|
29 |
<div class="col-lg-10" id="returnable-container">
|
|
|
30 |
<table class="table table-striped table-condensed table-bordered" id="returnables">
|
|
|
31 |
<thead>
|
|
|
32 |
<tr>
|
|
|
33 |
<th>Item Id</th>
|
|
|
34 |
<th>Description</th>
|
|
|
35 |
<th>Serial Number</th>
|
|
|
36 |
<!--<th>Invoice Number</th>-->
|
|
|
37 |
<th>Purchase Price</th>
|
|
|
38 |
<!--<th>Effective Price</th>-->
|
|
|
39 |
<th>Scanned On</th>
|
|
|
40 |
<th>Status</th>
|
|
|
41 |
</tr>
|
|
|
42 |
</thead>
|
|
|
43 |
<tbody>
|
|
|
44 |
#foreach( $returnableInventoryItem in $returnableInventoryItems )
|
|
|
45 |
<tr>
|
|
|
46 |
<td>$returnableInventoryItem.getItemId()</td>
|
|
|
47 |
<td>$returnableInventoryItem.getItemDescription()</td>
|
|
|
48 |
<td>$returnableInventoryItem.getSerialNumber()</td>
|
|
|
49 |
<td>$returnableInventoryItem.getUnitPrice()</td>
|
|
|
50 |
<td>$returnableInventoryItem.getFormattedCreateTimestamp()</td>
|
|
|
51 |
<!--<td>$date.format('MMM d, yy', $returnableInventoryItem.getCreateTimestamp())</td>-->
|
|
|
52 |
<td>
|
|
|
53 |
#if($returnsInProcess.containsKey($returnableInventoryItem.getId()))
|
|
|
54 |
$returnsInProcess.get($returnableInventoryItem.getId()).getStatus().getValue()
|
|
|
55 |
#else
|
|
|
56 |
<a href="javascript:void(0);" data-inventoryitemid="$returnableInventoryItem.getId()" class="request-return">Request Return</a>
|
|
|
57 |
#end</td>
|
|
|
58 |
</tr>
|
|
|
59 |
#end
|
|
|
60 |
</tbody>
|
|
|
61 |
</table>
|
|
|
62 |
</div>
|
|
|
63 |
</div>
|
|
|
64 |
</section>
|
|
|
65 |
<script type="text/javascript">
|
|
|
66 |
/* Create an array with the values of all the input boxes in a column */
|
|
|
67 |
$.fn.dataTable.ext.order['dom-text'] = function ( settings, col )
|
|
|
68 |
{
|
|
|
69 |
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
|
|
70 |
return $('input', td).val();
|
|
|
71 |
} );
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
/* Create an array with the values of all the input boxes in a column, parsed as numbers */
|
|
|
75 |
$.fn.dataTable.ext.order['dom-text-numeric'] = function ( settings, col )
|
|
|
76 |
{
|
|
|
77 |
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
|
|
78 |
return $('input', td).val() * 1;
|
|
|
79 |
} );
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
/* Create an array with the values of all the select options in a column */
|
|
|
83 |
$.fn.dataTable.ext.order['dom-select'] = function ( settings, col )
|
|
|
84 |
{
|
|
|
85 |
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
|
|
86 |
return $('select', td).val();
|
|
|
87 |
} );
|
|
|
88 |
}
|
|
|
89 |
|
|
|
90 |
/* Create an array with the values of all the checkboxes in a column */
|
|
|
91 |
$.fn.dataTable.ext.order['dom-checkbox'] = function ( settings, col )
|
|
|
92 |
{
|
|
|
93 |
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
|
|
94 |
return $('input', td).prop('checked') ? '1' : '0';
|
|
|
95 |
} );
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
/* Initialise the table with the required column ordering data types */
|
|
|
99 |
$(document).ready(function() {
|
|
|
100 |
returnsTable = $('#returnables').DataTable({"pageLength": 50});
|
|
|
101 |
/*returnsTable.rows().data().each(function(arr){
|
|
|
102 |
var $input = $(arr[6]);
|
|
|
103 |
quantity = parseInt($input.val(), 10);
|
|
|
104 |
if(quantity > 0){
|
|
|
105 |
indentMap[parseInt(arr[0])] = {"quantity": quantity, "sellingPrice":parseInt(arr[2]), "description": arr[1]}
|
|
|
106 |
}
|
|
|
107 |
});
|
|
|
108 |
populateIndentSummary();*/
|
|
|
109 |
|
|
|
110 |
});
|
|
|
111 |
|
|
|
112 |
</script>
|