Rev 29707 | 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;}.indentMessage{text-transform: lowercase;display: inline-block;}.indentMessage:first-letter{text-transform: UpperCase;}</style><section class="wrapper"><div class="row"><div class="col-lg-12">#if ($isAdmin)<h3 class="page-header"><i class="icon_document_alt"></i>Create Po </h3><ol class="breadcrumb"><li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>#if($retailerName)<script type="text/javascript">currentFofoId=${retailerId};</script><li><i class="icon_document_alt"></i><b>Allocation for $retailerName (Counter Size - $counterSize)</b></li>#else<li><i class="icon_document_alt"></i><b>Standard Allocation (Counter Size - $counterSize)</b></li>#end</ol>#else<h3 class="page-header"><i class="icon_document_alt"></i>My Business Plan <span style ="font-size:18px";>(Open from <b>26<sup>th</sup> to 7<sup>th</sup></b> of each Month)</span></h3>#end</div></div><div><div class="row">#if($userWallet)<h4>Wallet Amount:-Rs.$userWallet.getAmount()</h4>#else<h4>Wallet Amount:- NA</h4>#end</div><div class="row"><div class="col-lg-8" id="indent-container"><table class="table table-striped table-condensed table-bordered" id="entire-inventory-table"><thead><tr><th>Id</th><th style="width:30%">#springMessage("monthlyplanning.description")</th><th style="width:12%">#springMessage("monthlyplanning.dp")</th><th>#springMessage("mop")</th><th style="width:20%">#springMessage("plannedqty")</th>#if($previousMonth||$mtd)<th style="width:6%">#springMessage("sale")</th>#else<th style="width:6%">15 days sale</th>#end<th style="width:9%">#springMessage("instock")</th><th style="width:9%">#springMessage("ourstock")</th><th style="width:9%">#springMessage("intransit")</th><th style="width:3%">#springMessage("recommended")</th><th style="width:3%">#springMessage("minimum")</th><th style="width:3%">#springMessage("obvrecommended")</th><th style="width:3%">#springMessage("obvminimum")</th><th>#springMessage("remaining")</th></tr></thead><tbody>#foreach( $modelListing in $catalogTagListings )<tr><td>$modelListing.getCatalogId()</td><td>$modelListing.getItemDescription()</td><td class="currency">$modelListing.getDp()</td><td class="currency">$modelListing.getMop()</td><td><a class = "selectItemQty" data-catalog-id="$modelListing.getCatalogId()" data-toggle="modal" data-target="#selectItem" > Add to po </a></td>#if($previousMonth)<td>$modelListing.getLastMonthSaleMap()</td>#elseif($mtd)<td>$modelListing.getLast15DaysSale()</td>#else<td>$modelListing.getLast15DaysSale()</td>#end<td>$modelListing.getStockInHand()</td><td>$modelListing.getOurStockQty()</td><td>$modelListing.getInTransitQuantity()</td><td>$modelListing.getRecommendedQty()</td><td>$modelListing.getMinimumQty()</td><td>$modelListing.getObsRecommendedQty()</td><td>$modelListing.getObsMinimumQty()</td>#if($mtd)<td>$modelListing.getRemaining()</td>#else<td></td>#end</tr>#end</tbody></table></div><div class="col-lg-7" id="indent-container1" style="display:none"></div><div class="col-lg-4"><div class="panel panel-default"><div class="panel-heading">Create Po #if($retailerName) (Counter Size - $counterSize) #end</div><div class="panel-content"><div id="posummary"><table class="table table-sm" id="po-table"><thead><tr><th>itemId</th><th>Name</th><th>Quantity</th></tr></thead><tbody></tbody></table></div><div id="pobuttons"><button class="btn btn-primary confirm_po">Confirm Po</button></div></div></div><div class="panel panel-default"><div class="panel-heading">#springMessage("monthlyplanning.brandstock")</div><div class="panel-content"><table class="table table-sm" id="stock-table"><thead><tr><th>#springMessage("monthlyplanning.brand")</th><th>#springMessage("monthlyplanning.qty(pc)")</th><th>#springMessage("monthlyplanning.value")</th></tr></thead><tbody>#foreach( $brandStockPrice in $brandStockPrices )<tr class="stockInfo" ><td>$brandStockPrice.getBrand()</td><td>$brandStockPrice.getTotalQty()</td><td><span class="currency">$brandStockPrice.getTotalValue()</span></td></tr>#end</tbody></table></div></div></div></div></div></div><div class="select-item-container"><div class="modal text-center" id="selectItem"><div class="modal-dialog"><div class="modal-content"></div></div></div></div></section><script type="text/javascript">totalAmount = $totalAmount;/* 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 */var customRetailers = ${customRetailers};$(document).ready(function() {indentTable = $('#entire-inventory-table').DataTable({"scrollY":"600px","columns": [{ "visible": false }, null,null, null,{ "orderDataType": "dom-text-numeric" }, null,null, null, null,null,null,null,null,null],"lengthMenu":[[25,50],[25,50]],"order": []});indentMap = {};indentTable.rows().data().each(function(arr){var $input = $(arr[4]);quantity = parseInt($input.val(), 10);if(quantity > 0){var brandName = arr[1].split(" ")[0];if(indentMap[brandName] == undefined) {indentMap[brandName] = {};}indentMap[brandName][parseInt(arr[0])]= {"initialQuantity": quantity, "quantity": quantity,"sellingPrice":parseInt(arr[2]), "description": arr[1], "diff":0};}})$("#partnerId").typeahead({source: customRetailers,autoSelect: true,displayText:function(item){return item.businessName + "-" + item.address.city;},afterSelect: function(currentItem){currentFofoId = currentItem.partnerId;}});populateIndentSummary();});</script>