Subversion Repositories SmartDukaan

Rev

Rev 34509 | 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>COLLECTION REPORT</h3>
                        <ol class="breadcrumb">
                                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">#springMessage("reportdailycollection.home")</a></li>
                                <li><i class="icon_document_alt"></i>#springMessage("reportdailycollection.reports")</li>
                        </ol>
                </div>
        </div>
    <br>
    #if($isAdmin)
        #if($isRBM)
            <div style="padding: 5px 10px; margin-top: 2px"
                 class="col-lg-2 form-group">
                <select class="form-control input-sm" id="fofo-users" name="Item" placeholder="Partners">
                    <option value="" disabled selected>Partners</option>
                    #foreach($fofoId in $customRetailersMap.keySet())
                        <option value="$fofoId"
                                data-email="$customRetailersMap.get($fofoId).getEmail()">$customRetailersMap.get($fofoId).getBusinessName()</option>
                    #end
                </select>
            </div>
        #else
        <div class="row col-lg-12" style="float: right;">
            <div class="col-lg-2">
                <div class="input-group">
                    <input placeholder="Enter Partner Name" type="text" class="typeahead form-control"
                           id="typeaheadpartner"
                           name="Item" data-provide="typeahead" autocomplete="off"
                           style="margin-bottom: 10px;margin-left: 22px"> <input id="partnerId"
                                                                                 type="hidden">
                    <br>
                </div>
            </div>
        </div>
        #end
    #end
                <div class="row col-lg-12"  style="float: right;">

            #if(!$isAnalysis)
                #springMessage("reportdailycollection.from") <input type="date" id="startDate-collection-summary"
                                                                    placeholder="" name="" value="$startDate">

                #springMessage("reportdailycollection.to") <input type="date" id="endDate-collection-summary"
                                                                  placeholder="" value="$endDate">

            <button type="submit" class="collection-summary-fetch-report">Fetch Report</button>

                <button type="submit" class="download-collection-summary">Download Report</button>
            #else
                #springMessage("reportdailycollection.from")  <input type="date"
                                                                     id="analysis-startDate-collection-summary"
                                                                     placeholder="" name="" value="$startDate">

                #springMessage("reportdailycollection.to") <input type="date" id="analysis-endDate-collection-summary"
                                                                  placeholder="" value="$endDate">

                <button type="submit" class="analysis-collection-summary-fetch-report" data-fofoid="$fofoId">Fetch
                    Report
                </button>

                <button type="submit" class="analysis-download-collection-summary" data-fofoid="$fofoId">Download
                    Report
                </button>
            #end


                </div>
         
    <div class="col-lg-12">
        <table class="table table-border table-condensed table-bordered" id="collectionSummaryTable" style="width:100%">

            <thead class="row htable" style="background:#F5F5F5;">

            <tr style="color:black;">
                <th>#springMessage("reportdailycollection.date")</th>
                <th>#springMessage("reportdailycollection.referencetype")</th>
                <th>#springMessage("reportdailycollection.cash")</th>
                <th>#springMessage("reportdailycollection.pinelabs")</th>
                <th>#springMessage("reportdailycollection.bajajfinserv")</th>
                <th>#springMessage("reportdailycollection.homecredit")</th>
                <th>#springMessage("reportdailycollection.paymt")</th>
                <th>#springMessage("reportdailycollection.capitalfirst")</th>
                <th>#springMessage("reportdailycollection.zestmoney")</th>
                <th>#springMessage("reportdailycollection.samsungsure")</th>
                <th>#springMessage("reportdailycollection.totalamount")</th>
               
                
            </tr>
            </thead>
            <tbody>
                #foreach($collectionSummary in $collectionSummaryList )
               <tr>
               <td>$collectionSummary.getDate().format($datehiphenFormatter)</td>
                <td>$collectionSummary.getReferenceType()</td>
                  <td>$collectionSummary.getCash()</td>
                   <td>$collectionSummary.getPinelabs()</td>
                    <td>$collectionSummary.getBajajFinserv()</td>
                     <td>$collectionSummary.getHomeCredit()</td>
                      <td>$collectionSummary.getPaytm()</td>
                      
                     <td>$collectionSummary.getCapitalFirst()</td>
                      <td>$collectionSummary.getZestMoney()</td>
                       <td>$collectionSummary.getSamsungSure()</td>
                     <td>$collectionSummary.getTotalAmount()</td>
                     
               </tr>
                #end

            </tbody>

        </table>
    </div>
        
</section>



<script>

        var dtable = $('#collectionSummaryTable').DataTable(
                {

                    "bPaginate": true,
                    "bLengthChange": true,
                    "bFilter": true,
                    "bInfo": false,
                    "bAutoWidth": false,
                   "pageLength": 20,
                     
     });
  
   
    
    </script>
#if($isAdmin)
<script type="text/javascript">
    $(function () {
        getPartnerAheadOptions($("#typeaheadpartner"), function (selectedPartner) {
            partnerId = selectedPartner.partnerId;

            console.log(partnerId);
        });
    });
    $(function () {
        $('#fofo-users').on('change', function () {
            var selectedFofoId = $(this).val();
            if (selectedFofoId) {
                partnerId = selectedFofoId;
                console.log("Partner ID set to:", partnerId);
            } else {
                alert("Please select a valid Partner ID.");
            }
        });
    });
</script>
+#end