Subversion Repositories SmartDukaan

Rev

Rev 34505 | 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>#springMessage("reportsmysales.franchiseereport")</h3>
                        <ol class="breadcrumb">
                                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">#springMessage("reportsmysales.home")</a></li>
                <li><i class="icon_document_alt"></i>#springMessage("reportsmysales.franchiseereport")</li>
                <!--Training Video -->
                <li><a href="#videoModal" class="btn btn-danger" data-toggle="modal" data-src="QkGug0dZ4hM"><span
                        class="glyphicon glyphicon-play-circle"></span> #springMessage("reportsmysales.playvideo")</a></li>
            </ol>
        </div>
    </div>
    <br>
    #if($isAdmin)
        #set($counter =0)
        #foreach($focoSaleReport in $focoSaleReportList )
            #if($counter==1)
                #break
            #end
            <h2 style="color:red;margin-top: 20px;margin-bottom: 10px;margin-left:auto">
                $focoSaleReport.getCode() - $focoSaleReport.getName()
            </h2>
            #set($counter =$counter+1)
        #end
        #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
    #if($analysis-dashboard)
        <div class="row col-lg-12" style="float: right;">


            #springMessage("reportsmysales.from") <input type="date" id="analysis-startDate-franchisee-sales"
                                                         placeholder="" name="" value="$startDate">

            #springMessage("reportsmysales.to") <input type="date" id="analysis-endDate-franchisee-sales" placeholder=""
                                                       value="$endDate">
            <button type="submit" class="analysis-franchisee-sales-fetch-report" data-fofoid="$fofoId">Fetch Report
            </button>
            <button type="submit" class="analysis-download-franchisee-sales" data-fofoid="$fofoId">#springMessage(
                "reportsmysales.downloadreport") </button>

        </div>
    #else

        <div class="row col-lg-12" style="float: right;">


            #springMessage("reportsmysales.from") <input type="date" id="startDate-franchisee-sales" placeholder=""
                                                         name="" value="$startDate">

            #springMessage("reportsmysales.to") <input type="date" id="endDate-franchisee-sales" placeholder=""
                                                       value="$endDate">
            <button type="submit" class="franchisee-sales-fetch-report">Fetch Report</button>
            <button type="submit" class="download-franchisee-sales">#springMessage(
                "reportsmysales.downloadreport") </button>

        </div>
    #end

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

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

            <tr style="color:black;">
                ##                    <th> #springMessage("reportsmysales.code")</th>
                ##                    <th> #springMessage("reportsmysales.name")</th>
                ##                       <th> #springMessage("reportsmysales.city")</th>
                ##                       <th> #springMessage("reportsmysales.state")</th>
                ##
                ##                       <th>  #springMessage("reportsmysales.region")</th>
                ##                         <th>  #springMessage("reportsmysales.itemid")</th>
                          <th>  #springMessage("reportsmysales.brand")</th>
                           <th>  #springMessage("reportsmysales.modelname")</th>
                           <th>  #springMessage("reportsmysales.modelnumber")</th>
                            <th>  #springMessage("reportsmysales.color")</th>
                            <th> #springMessage("reportsmysales.quantity")</th>
                <th> DP</th>
                <th> Selling Price</th>
                <th> MOP</th>
                          <th>  #springMessage("reportsmysales.serialnumber")</th>
                           <th>  #springMessage("reportsmysales.createdate")</th>
                         <th> #springMessage("reportsmysales.customername")</th>
                         <th> #springMessage("reportsmysales.customerphone")</th>
                        <th> #springMessage("reportsmysales.customercity")</th>
                        <th>  #springMessage("reportsmysales.customerpincode")</th>
                   <th>  #springMessage("reportsmysales.invoicenumber")</th>
                       <th> #springMessage("reportsmysales.purchasereference")</th>
                        <th> #springMessage("reportsmysales.customergstnumber")</th>
                      <th>  #springMessage("reportsmysales.cancelledtimestamp")</th>
                   <th>  #springMessage("reportsmysales.grncompletedate")</th>
                      <th>  #springMessage("reportsmysales.hygienerating")</th>
                        <th>  #springMessage("reportsmysales.rating")</th>
                        <th> #springMessage("reportsmysales.status")</th>
                         <th> #springMessage("reportsmysales.remark")</th>
                       <th>  #springMessage("reportsmysales.createdtimestamp")</th>
                   <th> #springMessage("reportsmysales.disposedtimestamp")</th>
                      <th>  #springMessage("reportsmysales.nexttimestamp")</th>
                   <th>  #springMessage("reportsmysales.activationtimestamp")</th>
                     <th> #springMessage("reportsmysales.createtimestamp")</th>
                       <th>#springMessage("reportsmysales.label")</th>
                
            </tr>
            </thead>
            <tbody>
                #foreach($focoSaleReport in $focoSaleReportList )
               <tr>
                   ##               <td>$focoSaleReport.getCode()</td>
                   ##                <td>$focoSaleReport.getName()</td>
                   ##                 <td>$focoSaleReport.getCity()</td>
                   ##                  <td>$focoSaleReport.getState()</td>
                   ##
                   ##
                   ##                   <td>$focoSaleReport.getRegion()</td>
                   ##                    <td>$focoSaleReport.getItemId()</td>
                   <td>$focoSaleReport.getBrand()</td>
                   <td>$focoSaleReport.getModelName()</td>

                   <td>$focoSaleReport.getModelNumber()</td>
                   <td>$focoSaleReport.getColor()</td>
                   <td>$focoSaleReport.getQuantity()</td>
                   <td><span class="currency">$focoSaleReport.getDp()</span></td>

                   <td><span class="currency">$focoSaleReport.getSellingPrice()</span></td>

                   <td><span class="currency">$focoSaleReport.getMop()</span></td>

                   #if($focoSaleReport.getSerialNumber())
                   <td>$focoSaleReport.getSerialNumber()</td>
                   #else
                       <td> --</td>
                   #end
                   <td>$focoSaleReport.getCreateDate().format($dateTimeFormatter)</td>
                   #if($focoSaleReport.getCustomerName())
                       <td>$focoSaleReport.getCustomerName()</td>
                   #else
                       <td>--</td>
                   #end
                   #if($focoSaleReport.getCustomerPhone())
                       <td>$focoSaleReport.getCustomerPhone()</td>
                   #else
                       <td>--</td>
                   #end

                   #if($focoSaleReport.getCustomerCity())
                       <td>$focoSaleReport.getCustomerCity()</td>
                   #else
                       <td>--</td>
                   #end
                   #if($focoSaleReport.getCustomerPincode())
                   <td>$focoSaleReport.getCustomerPincode()</td>
                   #else
                       <td>--</td>
                   #end

                   <td>$focoSaleReport.getInvoiceNumber()</td>
                   <td>$focoSaleReport.getPurchaseReference()</td>
                   <td>$focoSaleReport.getCustomerGstNumber()</td>

                   #if($focoSaleReport.getCancelledTimestamp())
                   <td>$focoSaleReport.getCancelledTimestamp()</td>
                   #else
                       <td> --</td>
                   #end
                   <td>$focoSaleReport.getGrnCompleteDate().format($datehiphenFormatter)</td>
                   #if($focoSaleReport.getHygieneRating())
                   <td>$focoSaleReport.getHygieneRating()</td>
                   #else
                   <td>0</td>
                   #end
                   #if($focoSaleReport.getRating())
                       <td>$focoSaleReport.getRating()</td>
                   #else
                       <td> --</td>
                   #end

                   #if($focoSaleReport.getStatus())
                       <td>$focoSaleReport.getStatus()</td>
                   #else
                       <td> --</td>
                   #end
                   #if($focoSaleReport.getRemark())
                   <td>$focoSaleReport.getRemark()</td>
                   #else
                       <td> --</td>
                   #end


                   #if($focoSaleReport.getCreatedTimestamp())
                       <td>$focoSaleReport.getCreatedTimestamp().format($datehiphenFormatter)</td>

                   #else
                       <td> --</td>
                   #end

                   #if($focoSaleReport.getDisposedTimestamp())
                       <td>$focoSaleReport.getDisposedTimestamp().format($datehiphenFormatter)</td>
                   #else
                       <td> --</td>
                   #end
                   #if($focoSaleReport.getNextTimestamp())
                   <td>$focoSaleReport.getNextTimestamp().format($datehiphenFormatter)</td>
                   #else
                       <td> --</td>
                   #end
                   #if($focoSaleReport.getActivationTimestamp())

                       <td>$focoSaleReport.getActivationTimestamp().format($datehiphenFormatter)</td>
                   #else
                       <td> --</td>
                   #end
                   #if($focoSaleReport.getActivationTimestamp())
                       <td>$focoSaleReport.getCreateTimestamp().format($datehiphenFormatter)</td>

                   #else
                       <td> --</td>
                   #end
                   <td>$focoSaleReport.getLabel()</td>


               </tr>
                #end

            </tbody>

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



<script>

        var dtable = $('#focoSaleReportTable').DataTable(
                {
                    "scrollX": true,
                    "bPaginate": true,
                    "bLengthChange": true,
                    "bFilter": true,
                    "bInfo": false,
                    "bAutoWidth": false,
                  
                     
     });
  
   
    
    </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