Subversion Repositories SmartDukaan

Rev

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

<style>
.table {
        background-image:
                url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='100px' width='100px'><text transform='translate(20, 100) rotate(-45)' fill='rgb(211,211,211)' font-size='20'>$partnerCode</text></svg>");
}
</style>

<script type="text/javascript">
        $('input[name="extendDatetime"]').daterangepicker(getSingleDatePicker(),
                        dateRangeCallback);

        getItemAheadOptions($("#scheme-item-search-text"), false, function(
                        selectedItem) {
                currentItem = selectedItem;
        });
        
                getImeiAheadOptions($("#scheme-imei-search-text"), $fofoId, function(
                        inventoryItem) {
                imei = inventoryItem;
                console.log(imei)
        });


        $(document).ready(function() {
                console.log('$partnerType')
                $('#partner-category').val('$partnerType');
                $('body').bind('cut copy paste', function(e) {
                        return false;
                });
                $('#offr-des').contextmenu(function() {
                        return false;
                });

                $('#sch-des').contextmenu(function() {
                        return false;
                });

        });
</script>
<body>
        <section class="wrapper">
                <div class="row">
                        <div class="col-lg-12">
                                <h3 class="page-header">
                                        <i class="icon_document_alt"></i>MARGINS
                                </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>MARGINS</li>
                                </ol>
                        </div>
                </div>
                <div class="row">
                        <div class="col-lg-3"></div>
                        
                        <div class="col-lg-3">
                                #if($schemeInOut)
                                <div style="padding: 12px">
                                        <span> <b> Model Name - $item.getItemDescriptionNoColor() </b><span>
                                                        
                                </div>
                                #end
                        </div>
                        <div class="col-lg-3">
                                #if($searchItem > 0)
                                <div style="padding: 12px">
                                        <span> DP - <span class="currency">$dp</span>,&nbsp;&nbsp; <span>
                                                        MOP - <span class="currency">$mop</span>&nbsp;&nbsp; <span>
                                                        NLC - <span class="currency">$nlc</span>
                                </div>
                                #elseif($searchItem > 0)
                                <div style="padding: 12px">
                                        <span> DP - <span class="currency">0</span>,&nbsp;&nbsp; <span>
                                                        MOP - <span class="currency">0</span>
                                </div>
                                #end
                        </div>
                        
        
                        
                        <div class="form-inline col-lg-8">
                                <div class="form-group">
                           
                                        <div class="input-group">
                                                <input type="date" class="form-control schemes-date"
                                                        value="${date}" />
                                        </div>
                                         
                                        <div class="input-group top_search">
                                          
                                                <input type="text" class="form-control"
                                                        id="scheme-item-search-text" autocomplete="off"
                                                        placeholder="Search for Item" /> <span class="input-group-btn">
                                                        <button class="btn btn-primary submit"
                                                                id="scheme-item-search-button" type="button">Go!</button>
                                                </span>
                                        </div>
                                          
                                          
                                
                                </div>
                        </div>
                        
                        <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-search-text" autocomplete="off"
                                                        placeholder="Search for Imei" /> <span class="input-group-btn">
                                                        <button class="btn btn-primary submit"
                                                                id="scheme-imei-search-button" type="button">Go!</button>
                                                </span>
                                        </div>
                                </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)
                #if($schemes && !$schemes.isEmpty())
                <div class="row" id="schemes-paginated">
                        <div class="col-lg-9">
                                <p>
                                        Showing <span class="start">$start</span> to <span class="end">$end</span>
                                        of <span class="size">$size</span> items
                                </p>
                        </div>
                        <div class="col-lg-3" style="text-align: right;">
                                <div class="btn-group" style="width: 40%">
                                        <button class="btn btn-primary previous" disabled="disabled"
                                                style="width: 100%">Previous</button>
                                </div>
                                <div class="btn-group" style="width: 40%">
                                        #if($end >= $size)
                                        <button class="btn btn-primary next" style="width: 100%"
                                                disabled="disabled">Next</button>
                                        #else
                                        <button class="btn btn-primary next" style="width: 100%">Next</button>
                                        #end
                                </div>
                        </div>
                </div>
                <div class="col-lg-12">
                        <h5>Note</h5>
                        <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
                
                #if($schemeInOut)
                        <div class="row">
                        <div class="col-lg-12">
                                <h3 style = "text-align:center; color:#4169e1;">IMEI Wise Margin Status</h3>
                                <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()) #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 #else $noData #end
                                        
                                        
                                </table>
                        </div>
                </div>
                
                #end
                
                
                #if(!$priceDropImeis.isEmpty())
                        <div class="row">
                        <div class="col-lg-6">
                                <h3>Price Drop</h3>
                                <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.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>Sale Target</th>
                                                <th>Payout</th>
                                        </tr>
                                        #if(!$offers.isEmpty()) #foreach( $offer in $offers )
                                        #set($size=$offer.getTargetSlabs().size()+1)
                                        <tr class="offer-details" data-offerid="$offer.getId()">
                                                <td rowspan="$size"><a class="mk_offer_detail"
                                                        href="javascript:void(0)">$offer.getName()</a>
                                                <td rowspan="$size">$offer.getSchemeType()</td>
                                        </tr>
                                        #foreach($targetSlab in $offer.getTargetSlabs())
                                        #foreach($itemCriteriaPayout in
                                        $targetSlab.getItemCriteriaPayouts())
                                        <tr>
                                                <td>$offer.getItemCriteriaString()</td>
                                                <td>$targetSlab.getOnwardsAmount()</td>
                                                <td>$itemCriteriaPayout.getPayoutSlabs().get(0).getPayoutAmount()
                                                        #if($itemCriteriaPayout.get(0).getAmountType().toString()=="PERCENTAGE")
                                                        % #end</td>
                                        </tr>
                                        #end #end #end #else $noData #end
                                </table>
                        </div>
                </div>
                #end
                
        
        </section>
</body>