Subversion Repositories SmartDukaan

Rev

Rev 31298 | Rev 35538 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

               
              
         <div class="row warehouseMilestone" style="margin: 5px">
                        <div class="col-lg-4 form-group">

                                                            <span><b> Warehouse </b> </span>
                                                            <select class="form-control input-sm" id="warehousepurchasemil" name="warehouseMap" placeholder="Warehouse"
                                                                    onchange="changeWarehousePurchaseMilestone()">
                                                                <option value="" disabled selected>Warehouse</option>
                                                                #if($warehouseId == 0)
                                                                    <option value="0" selected>All</option> #else
                                                                    <option value="0">All</option>
                                                                #end
                                                                #foreach($wm in
                                                                    $warehouseMap.entrySet())) #if($warehouseId ==$wm.getKey())
                                                                    <option value="$wm.getKey()" selected>$wm.getValue()</option> #else
                                                                    <option value="$wm.getKey()">$wm.getValue()</option> #end #end
                                                            </select>
                                                        </div>
                        </div>

        

                        <table class="table table-striped table-advance table-hover">
                                <tbody>
                                        <tr>
                                                <th>Partner Category</th>
                                                <th>MTD</th>
                                                <th>LMTD</th>
                                                <th>LMS</th>
                                                <th>Avg 3 Month</th>
                                        
                                </tr>
                                
                                        #foreach( $milestone in $milestones )
                                        
                                                <tr>
                                                        <td>$milestone</td>
                                                        #if($smtdMap.get($milestone))
                                                                <td onclick="getPartnersPurchaseDetail($smtdMap.get($milestone))">$smtdMap.get($milestone).size()</td>
                                                                #else
                                                                <td>0</td>
                                                                
                                                                #end
                                                                
                                                            #if($slmtdMap.get($milestone))
                                                                
                                                                <td onclick="getPartnersPurchaseDetail($slmtdMap.get($milestone))">$slmtdMap.get($milestone).size()</td>
                                                                #else
                                                                        <td>0</td>
                                                        
                                                                #end
                                                                
                                                                                
                                                            #if($lmsMap.get($milestone))
                                                                
                                                                <td onclick="getPartnersPurchaseDetail($lmsMap.get($milestone))">$lmsMap.get($milestone).size()</td>
                                                                #else
                                                                        <td>0</td>
                                                        
                                                                #end
                                                                
                                                                #if($avg3MonthS.get($milestone))
                                                        
                                                                <td onclick="getPartnersPurchaseDetail($avg3MonthS.get($milestone))">$avg3MonthS.get($milestone).size()</td>
                                                                #else
                                                                 <td>0</td>
                                                                #end
                                                
                                                        </tr>
                                                
                                   #end
                                        
                                </tbody>
                        </table>
        
        
<script>

  function changeWarehousePurchaseMilestone() {
        var warehouseId = $('#warehousepurchasemil').val();


        doGetAjaxRequestHandler(context + "/getPurchaseCountByMileStone?warehouseId="
                + warehouseId, function (response) {
            $('.purchaseMilestoneContainer').html(response);
        });

    }
    
        function getPartnersPurchaseDetail(partnerIds){
        
              console.log(partnerIds)
                doGetAjaxRequestHandler(context + "/getMonthWisePurchase?fofoIds="+partnerIds,
                        function(response) {
                                $('#' + "main-content").html(response);
                                console.log(response)
                        });
        }


</script>