Rev 23638 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<style>.btn:hover{color: grey;text-decoration: none;}.btn-primary:hover{color: grey;text-decoration: none;}.retailer-details{cursor:pointer;}</style><section class="wrapper"><div class="row"><div class="col-lg-12"><h3 class="page-header"><i class="icon_document_alt"></i>View/Request Return</h3><ol class="breadcrumb"><li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li><li><i class="icon_document_alt"></i>View Returnables</li></ol></div></div><div><div class="row"><strong>Stock older than $ageDays days could be requested for Return</strong></div><div class="row"><div class="col-lg-10" id="returnable-container"><table class="table table-striped table-condensed table-bordered" id="returnables"><thead><tr><th>Item Id</th><th>Description</th><th>Serial Number</th><!--<th>Invoice Number</th>--><th>Purchase Price</th><!--<th>Effective Price</th>--><th>Scanned On</th><th>Status</th></tr></thead><tbody>#foreach( $returnableInventoryItem in $returnableInventoryItems )<tr><td>$returnableInventoryItem.getItemId()</td><td>$returnableInventoryItem.getItemDescription()</td><td>$returnableInventoryItem.getSerialNumber()</td><td>$returnableInventoryItem.getUnitPrice()</td><td>$returnableInventoryItem.getFormattedCreateTimestamp()</td><!--<td>$date.format('MMM d, yy', $returnableInventoryItem.getCreateTimestamp())</td>--><td>#if($returnsInProcess.containsKey($returnableInventoryItem.getId()))$returnsInProcess.get($returnableInventoryItem.getId()).getStatus().getValue()#else<a href="javascript:void(0);" data-inventoryitemid="$returnableInventoryItem.getId()" class="request-return">Request Return</a>#end</td></tr>#end</tbody></table></div></div></section><script type="text/javascript">/* Create an array with the values of all the input boxes in a column */$.fn.dataTable.ext.order['dom-text'] = function ( settings, col ){return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {return $('input', td).val();} );}/* Create an array with the values of all the input boxes in a column, parsed as numbers */$.fn.dataTable.ext.order['dom-text-numeric'] = function ( settings, col ){return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {return $('input', td).val() * 1;} );}/* Create an array with the values of all the select options in a column */$.fn.dataTable.ext.order['dom-select'] = function ( settings, col ){return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {return $('select', td).val();} );}/* Create an array with the values of all the checkboxes in a column */$.fn.dataTable.ext.order['dom-checkbox'] = function ( settings, col ){return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {return $('input', td).prop('checked') ? '1' : '0';} );}/* Initialise the table with the required column ordering data types */$(document).ready(function() {returnsTable = $('#returnables').DataTable({"pageLength": 50});/*returnsTable.rows().data().each(function(arr){var $input = $(arr[6]);quantity = parseInt($input.val(), 10);if(quantity > 0){indentMap[parseInt(arr[0])] = {"quantity": quantity, "sellingPrice":parseInt(arr[2]), "description": arr[1]}}});populateIndentSummary();*/});</script>