Subversion Repositories SmartDukaan

Rev

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

<script type="text/javascript">


    getAllImeiAheadOptions($("#scheme-imei-wise-search-text"), function (
            inventoryItem) {
        imei = inventoryItem;
        console.log(imei)
    });


</script>



<section class="wrapper">
    <div class="row">
        <div class="col-lg-12">
            <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>IMEI WISE MARGINS</li>
            </ol>
        </div>
    </div>
    <div class="row">

  
     
         <div class="form-inline col-lg-4">
            <div class="form-group">


                <label> Check Margins</label>

                <div class="input-group top_search">
                    <input type="text" class="form-control"
                           id="scheme-imei-wise-search-text" autocomplete="off"
                           placeholder="Search for Imei"/> <span class="input-group-btn">
                                                        <button class="btn btn-primary submit"
                                    id="scheme-imei-wise-search-button" type="button">Go!</button>
                                                </span>
                </div>
            </div>
        </div><br><br>
      
      
       <div class="form-inline col-lg-4">
            <div class="form-group">


                <label> #if($customRetailer) <span style="background-color:aquamarine; color:brown"> $customRetailer.getBusinessName() </span> #end</label>

        
            </div>
        </div>
    </div>
   <div id="schemes-table">
        <div class="row">
            <div class="col-lg-12">
                <table class="table table-border table-condensed table-bordered"
                       id="sch-des">
                    <tbody>
                    <tr>
                        <th>ID</th>
                        <th>Name</th>
                        <th>Description</th>
                        <th>Type</th>
                        <th>Amount</th>
                        <th>Start Date</th>
                        <th>End Date</th>
                    </tr>
                        #if($schemes && !$schemes.isEmpty()) #foreach( $scheme in
                            $schemes )
                            #if($scheme.getAmountModel())
                            <tr data="$scheme.getId()">
                                <td>$scheme.getId()</td>
                                <td>$scheme.getName()</td>
                                <td>$scheme.getDescription()</td>
                                <td>$scheme.getType()</td>
                                <td>$scheme.getAmountModel()</td>
                                <td>$scheme.getFormattedStartDateTime()</td>
                                <td>$dateTimeFormatter.format($scheme.getEndDateTime())</td>
                            </tr>
                            #end
                        #end #else $noData #end
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    #if($schemeInOut || $offerPayouts)
        <div class="row">
            <div class="col-lg-12">
                <h3 style="text-align:center; color:#4169e1;">IMEI Wise Margin Status</h3>
                <div><h4>Net Margin - $nf.format($netEarnings)</h4></div>
                <table class="table table-border table-condensed table-bordered">
                    <tr>
                        <th>ID</th>
                        <th>Name</th>
                        <th>Description</th>
                        <th>Type</th>
                        <th>Amount</th>
                        <th>Paid Amount</th>
                        <th>Status</th>
                        <th>Credit Timestamp</th>

                        <th>Description</th>

                    </tr>

                    #if(!$schemeInOut && $schemeInOut.isEmpty() && !$offerPayouts && $offerPayouts.isEmpty())
                        $noData
                    #end

                    #if($schemeInOut && !$schemeInOut.isEmpty())
                        #foreach( $sio in $schemeInOut )
                            <tr data="$schemeMap.get($sio.getSchemeId()).getId()">
                                <td>$schemeMap.get($sio.getSchemeId()).getId()</td>
                                <td>$schemeMap.get($sio.getSchemeId()).getName()</td>
                                <td>$schemeMap.get($sio.getSchemeId()).getDescription()</td>
                                <td>$schemeMap.get($sio.getSchemeId()).getType()</td>
                                <td>$schemeMap.get($sio.getSchemeId()).getAmountModel()</td>
                                <td>$sio.getAmount()</td>
                                <td>$sio.getStatus()</td>
                                #if($sio.getCreditTimestamp().format($dateTimeFormatter))
                                    <td>$sio.getCreditTimestamp().format($dateTimeFormatter)</td>
                                #else
                                    <td>-</td>
                                #end

                                #if($sio.getStatusDescription())
                                    <td>$sio.getStatusDescription()</td>
                                #else
                                    <td>-</td>
                                #end
                            </tr>
                        #end
                    #end

                    #if($offerPayouts && !$offerPayouts.isEmpty())
                        #foreach( $offerPayout in $offerPayouts )
                            <tr data-offerid="$offerPayout.getOfferId()">
                                <td colspan="3"><a href="javascript:void(0)"
                                                   class="mk_offer_detail">$offerPayout.getDescription()</td>
                                <td>$offerRequestMap.get($offerPayout.getOfferId().intValue()).getSchemeType()</td>
                                <td>$nf.format($inventoryItem.getMarginPercentage($offerPayout.getAmount()))%</td>
                                <td>$offerPayout.getAmount()</td>
                                <td>$offerPayout.getStatus()</td>
                                <td>$offerPayout.getCreateTimestamp().format($dateTimeFormatter)</td>
                                <td>-</td>

                            </tr>
                        #end
                    #end

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

    #end

    #if($searchImei.length() > 0)
        <div class="row">
            <div class="col-lg-6">
                <h4>Price Drop</h4>
                <table class="table table-border table-condensed table-bordered"
                       id="offr-des">
                    <tr>
                        <th>Status</th>
                        <th>Amount</th>
                        <th>Description</th>


                    </tr>
                    #if($priceDropImeis && !$priceDropImeis.isEmpty())
                        #foreach( $pdi in $priceDropImeis )
                            <tr class="priceDrop-details">
                                <td>$pdi.getStatus()</td>
                                <td>$pdi.getPriceDrop().getAmount()</td>
                                #if($pdi.getRejectionReason())
                                    <td>$pdi.getRejectionReason()</td>
                                #else
                                    <td>-</td>
                                #end

                            </tr>
                        #end
                    #else
                        $noData
                    #end
                </table>
            </div>
        </div>
    #end

    #if(!$schemeInOut)
        <div class="row">
            <div class="col-lg-12">
                <h3>Other Schemes</h3>
                <table class="table table-border table-condensed table-bordered"
                       id="offr-des">
                    <tr>
                        <th>Name</th>
                        <th>Margin Based On</th>
                        <th>Sale Criteria</th>
                        <th>Payout(Per pc)</th>
                    </tr>
                    #if(!$offers.isEmpty())
                        #foreach( $offer in $offers )
                            #set($itemCriteriaPayout = $offer.getTargetSlabs().get(0).getItemCriteriaPayouts().get(0))
                            #set($slab=$itemCriteriaPayout.getCurrentSlab())
                            #if(!$slab)
                                #set($slab=$itemCriteriaPayout.getNextSlab())
                            #end
                            <tr class="offer-details" data-offerid="$offer.getId()">
                                <td><a class="mk_offer_detail"
                                       href="javascript:void(0)">$offer.getName()</a>
                                <td>$offer.getSchemeType()</td>
                                <td>$itemCriteriaPayout.getItemCriteriaString()</td>
                                <td>Rs. <span
                                        class="currency">$offerSlabPayoutMap.get($offer.getId()).get($slab.getOnwardsAmount())</span>
                                </td>
                            </tr>
                        #end #else $noData #end
                </table>
            </div>
        </div>
    #end

    #if(!$schemeInOut)
        #if($schemes && !$schemes.isEmpty())
            <div class="row col-lg-12">
                <b>Hygiene Payout</b> - This is basis the customer details entered in
                the system, pls refer to hygiene meter in your Dashboard. <br> <b>Tertiary
                Payout</b> - This is basis the activation of the handset. <br> <b>Investment
                Payout</b> - Investments in stocks should be above 90% for minimum 12
                days in a month to earn 2%, between 8-11 days will earn 1%, less then
                8 days there will be no payout.
            </div>
        #end
    #end

</section>