Subversion Repositories SmartDukaan

Rev

Rev 32774 | Blame | Compare with Previous | Last modification | View Log | RSS feed


<section class="wrapper">
        <div class="row">
                <div class="col-lg-12">
                        <h3 class="page-header"><i class="icon_document_alt"></i>SECONDARY</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>Secondary</li>                                                     
                        </ol>
                </div>
        </div>
        
        
        <table style="Width:100%; margin:15px">
                <tr>
                        <td  style="Width:40%; float:left">
                     <div class = "row">
                       <div class="col-lg-6">
                            <div class="input-group">
                                <select class="form-control input-sm" id = "warehouseMap" name="warehouseMap" placeholder="Warehouse">
                                                <option value="" disabled selected>Warehouse</option>
                                                #if($warehouseId.contains(0))
                                                <option value="0" selected>All</option>
                                                #else 
                                                        <option value="0">All</option>
                                                        #end
                                                  #foreach($wm in $warehouseMap.entrySet()))
                              #if($warehouseId.contains($wm.getKey()) && !$warehouseId.contains(0))
                                        <option value="$wm.getKey()" selected>$wm.getValue()</option>
                                  #else
                                        <option value="$wm.getKey()">$wm.getValue()</option>
                                  #end
                                  #end
                                </select>
                        <span class="input-group-btn">
                                <button class="btn btn-primary submit" id="warehouse-wise-billing" type="button">Go!</button>
                        </span>
                  </div>
                  </div>
                 </div>
                </td>
           
          
                </tr>
    </table>
        <div class="row">
        <div class="col-lg-6">
                                
                                 <div class="row col-lg-3">
                                                <h3 style="margin-top:-2px;margin-bottom:24px"><strong>Open PO</strong></h3>
                                 </div>
                                 <table class="table table-striped table-advance table-hover" id ="openpo">
                                <tbody>
                                        <tr>
                                         <th>Brand</th>
                                         <th>Today Qty</th>
                                         <th>Today</th>
                                         <th>3 Days Qty</th>
                         <th>3 Days</th>
                         <th>7 Days Qty</th>
                                         <th>7 Days</th>
                                        </tr>
                                        #foreach($po in $openPO)
                                        <tr onclick="">
                                     <td>$po.getBrand()</td>
                                     <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "0" data-brand = "$po.getBrand()" class="currency openpodays">$po.getTodayQty()</td>
                                     <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "0" data-brand = "$po.getBrand()" class="currency openpodays">$po.getTodayValue()</td> 
                                     <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "3" data-brand = "$po.getBrand()" class="currency openpodays">$po.getThreedaysQty()</td> 
                                     <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "3" data-brand = "$po.getBrand()" class="currency openpodays">$po.getThreedaysValue()</td>
                                     <td  data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "7" data-brand = "$po.getBrand()" class="currency openpodays">$po.getSevendaysQty()</td>
                                     <td  data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "7" data-brand = "$po.getBrand()" class="currency openpodays">$po.getSevendaysValue()</td>
                                   </tr>
                                         #end
                                        
                            </tbody>
                        </table>
                        
                 <div class="row col-lg-3">
                                                <h3 style="margin-top:-2px;margin-bottom:24px"><strong>Our Purchase</strong></h3>
                                 </div>
                                 <table class="table table-striped table-advance table-hover" id ="openpurchase">
                                <tbody>
                                        <tr>
                                         <th>Brand</th>
                                          <th>Today Qty</th>
                                          <th>Today</th>
                                          <th>3 Days Qty</th>
                          <th>3 Days</th>
                          <th>LMP Qty</th>
                                          <th>LMP</th>
                                          <th>MTD Qty</th>
                                          <th>MTD</th>
                                        
                                        </tr>
                                        #foreach($ourPurchaseModel in $ourPurchaseModels)
                                        <tr onclick="">
                                     <td>$ourPurchaseModel.getBrand()</td>
                                               <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "0" data-brand = "$ourPurchaseModel.getBrand()" class="currency openpurchasedays">$ourPurchaseModel.getTodayQty()</td>
                                               <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "0" data-brand = "$ourPurchaseModel.getBrand()" class="currency openpurchasedays">$ourPurchaseModel.getTodayValue()</td>
                                               <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "3" data-brand = "$ourPurchaseModel.getBrand()" class="currency openpurchasedays">$ourPurchaseModel.getThreedaysQty()</td>
                                              <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "3" data-brand = "$ourPurchaseModel.getBrand()" class="currency openpurchasedays">$ourPurchaseModel.getThreedaysValue()</td>
                                     <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "-1" data-brand = "$ourPurchaseModel.getBrand()" class="currency openpurchasedays">$ourPurchaseModel.getLmsQty()</td>
                                     <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "-1" data-brand = "$ourPurchaseModel.getBrand()" class="currency openpurchasedays">$ourPurchaseModel.getLms()</td>
                                     <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "1" data-brand = "$ourPurchaseModel.getBrand()" class="currency openpurchasedays">$ourPurchaseModel.getMtdQty()</td>
                                     <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "1" data-brand = "$ourPurchaseModel.getBrand()" class="currency openpurchasedays">$ourPurchaseModel.getMtd()</td>
                                   </tr>
                                         #end
                                        
                            </tbody>
                        </table>
        </div>
        
        <div class="col-lg-6">
                         <div class="row col-lg-4">
                                                <h3 style="margin-top:-2px;margin-bottom:24px"><strong>Secondary Billing</strong></h3>
                                 </div>
                                 <table class="table table-striped table-advance table-hover" id ="secondaryBillingtable">
                                <tbody>
                                        <tr>
                                         <th>Brand</th>
                                         <th>Today Qty</th>
                                         <th>Today</th>
                         <th>3 Days Qty</th>
                         <th>3 Days</th>
                         <th>LMS Qty</th>
                         <th>LMS</th>
                         <th>MTD Qty</th>
                                         <th>MTD</th>
                                          <th>LMTD Qty</th>
                                          <th>LMTD</th>
                                        
                                        </tr>
                                        
                                  #foreach($bill in $billing)
                                        <tr onclick="">
                                      <td>$bill.getBrand()</td>
                                      <td  data-time = "0" data-brand = "$bill.getBrand()" class="currency secondaryBilling">$bill.getTodayQty()</td>
                                      <td data-time = "0" data-brand = "$bill.getBrand()" class="currency secondaryBilling">$bill.getTodayValue()</td>
                                      <td   data-time = "3" data-brand = "$bill.getBrand()" class="currency secondaryBilling">$bill.getThreedaysQty()</td>
                                      <td data-time = "3" data-brand = "$bill.getBrand()" class="currency secondaryBilling">$bill.getThreedaysValue()</td>
                                      <td data-time = "-1" data-brand = "$bill.getBrand()" class="currency secondaryBilling">$bill.getLmsQty()</td>
                                      <td data-time = "-1" data-brand = "$bill.getBrand()" class="currency secondaryBilling">$bill.getLms()</td>
                                      <td  data-time = "1" data-brand = "$bill.getBrand()" class="currency secondaryBilling">$bill.getMtdQty()</td>
                                      <td   data-time = "1" data-brand = "$bill.getBrand()" class="currency secondaryBilling">$bill.getMtd()</td>
                                      <td   data-time = "2" data-brand = "$bill.getBrand()" class="currency secondaryBilling">$bill.getLmtdQty()</td>
                                       <td   data-time = "2" data-brand = "$bill.getBrand()" class="currency secondaryBilling">$bill.getLmtd()</td>
                                     </tr>
                                         #end
                                
                                        
                            </tbody>
                        </table>
                        
                                 <div class="row col-lg-3">
                                                <h3 style="margin-top:-2px;margin-bottom:24px"><strong>Partner Tertiary</strong></h3>
                                 </div>
                                 <table class="table table-striped table-advance table-hover" id ="tertiaryTable">
                                <tbody>
                                        <tr>
                                         <th>Brand</th>
                                         <th>Today Qty</th>
                                         <th>Today</th>
                         <th>3 Days Qty</th>
                         <th>3 Days</th>
                         <th>LMS Qty</th>
                         <th>LMS</th>
                         <th>MTD Qty</th>
                                         <th>MTD</th>
                                          <th>LMTD Qty</th>
                                          <th>LMTD</th>
                                        
                                        </tr>
                                        #foreach($ter in $tertiary)
                                        <tr onclick="">
                                     <td>$ter.getBrand()</td>
                                      <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "0" data-brand = "$ter.getBrand()" class="currency tertBilling">$ter.getTodayQty()</td>
                                     <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "0" data-brand = "$ter.getBrand()" class="currency tertBilling">$ter.getTodayValue()</td>
                                      <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "3" data-brand = "$ter.getBrand()" class="currency tertBilling">$ter.getThreedaysQty()</td>
                                    <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "3" data-brand = "$ter.getBrand()" class="currency tertBilling">$ter.getThreedaysValue()</td>
                                      <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "-1" data-brand = "$ter.getBrand()" class="currency tertBilling">$ter.getLmsQty()</td>
                                    <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "-1" data-brand = "$ter.getBrand()" class="currency tertBilling">$ter.getLms()</td>
                             <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "1" data-brand = "$ter.getBrand()" class="currency tertBilling">$ter.getMtdQty()</td>
                                    <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "1" data-brand = "$ter.getBrand()" class="currency tertBilling">$ter.getMtd()</td>
                                      <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "2" data-brand = "$ter.getBrand()" class="currency tertBilling">$ter.getLmtdQty()</td>
                                    <td data-toggle="modal" data-toggle="modal" data-target="#inventoryListingModel" data-time = "2" data-brand = "$ter.getBrand()" class="currency tertBilling">$ter.getLmtd()</td>
                                   </tr>
                                #end
                            </tbody>
                        </table>        
                
        </div>
        </div>


  <div id="inventoryListingModel" class="modal" role="dialog">
          <div class="modal-dialog">
            <div class="modal-content">
             
    </div>
   </div>
 </div>
 
 <script>
 $('#openpo').on('click', '.openpodays', function(){
        console.log("Hello")
        
                var timeValue = $(this).data('time');
                var brand = [];
                brand.push($(this).data('brand'));
                 var warehouseId = $('#warehouseMap').val()
                                
                                doGetAjaxRequestHandler(context + "/getOpenPoItemByBrand?timeValue="
                                                + timeValue+ "&brand="+brand +"&warehouseIds="+warehouseId, function(response) {

                                        $('#inventoryListingModel .modal-content').html(response);

                                });
});


 $('#openpurchase').on('click', '.openpurchasedays', function(){
        console.log("Hello")
        
                var timeValue = $(this).data('time');
                        
                var brand = $(this).data('brand');
                 var warehouseId = $('#warehouseMap').val()
                                
                                doGetAjaxRequestHandler(context + "/getOurPurchaseItemByBrand?timeValue="
                                                + timeValue+ "&brand="+brand +"&warehouseIds="+warehouseId, function(response) {

                                        $('#inventoryListingModel .modal-content').html(response);

                                });
});

 $('#secondaryBillingtable').on('click', '.secondaryBilling', function(){
        console.log("Hello")
        
                var timeValue = $(this).data('time');
                        
                var brand = $(this).data('brand');
                                
                                doGetAjaxRequestHandler(context + "/getWarehouseWiseSecondaryBillingByBrand?timeValue="
                                                + timeValue+ "&brand="+brand, function(response) {

                                        $('#' + "main-content").html(response);
                                                console.log(response)
                                });
});

  $('#tertiaryTable').on('click', '.tertBilling', function(){
        console.log("Hello")
        
                var timeValue = $(this).data('time');
                        
                var brand = $(this).data('brand');
                 var warehouseId = $('#warehouseMap').val()
                                
                                doGetAjaxRequestHandler(context + "/getPartnerTertiaryItemByBrand?timeValue="
                                                + timeValue+ "&brand="+brand +"&warehouseIds="+warehouseId, function(response) {

                                        $('#inventoryListingModel .modal-content').html(response);

                                });
});
 
 </script>
</section>