Subversion Repositories SmartDukaan

Rev

Rev 33438 | 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">#springMessage(
                    "modelwisemargin.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> #springMessage("modelwisemargin.checkmargins")</label>

                <div class="input-group top_search">
                    <input type="text" class="form-control"
                           id="scheme-imei-wise-search-text" autocomplete="off"
                        #if($searchImei)
                           value="$searchImei"
                        #end
                           placeholder="Search for Imei"/> <span class="input-group-btn">
                                                        <button class="btn btn-primary submit"
                                    id="scheme-imei-wise-search-button" type="button">#springMessage(
                                "modelwisemargin.go")</button>
                                                </span>
                </div>
            </div>
        </div>
        <br><br>

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


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


                </div>
            </div>
            <div class="col-lg-3">
                #if($schemeInOut)
                    <div style="padding: 12px">
                        <span> <b> Model Name - $item.getItemDescription()</b></span>

                    </div>
                #end
            </div>

        </div>

        <div class="row">
            <div class="col-lg-6">
                <h3 style="text-align:center; color:#4169e1;">Purchase Billing Summary</h3>
                <table class="table table-border table-condensed table-bordered">
                    <tr>
                        <th>Item Id</th>
                        <th>Invoice Number</th>
                        <th>Buy Price</th>
                        <th>Invoice Date</th>
                    </tr>

                    #if($itemPurchaseSummaryModels && !$itemPurchaseSummaryModels.isEmpty())
                        #foreach($itemPurchaseSummaryMode in $itemPurchaseSummaryModels)

                            <tr>
                                <td>$itemPurchaseSummaryMode.getItem().getId()</td>
                                <td>$itemPurchaseSummaryMode.getInvoiceNumber()</td>
                                <td>$itemPurchaseSummaryMode.getBuyPrice()</td>
                                <td>$itemPurchaseSummaryMode.getInvoiceDate().format($dateFormatter)</td>
                            </tr>
                        #end


                    #end
                </table>
            </div>
            <div class="col-lg-6">
                <h3 style="text-align:center; color:#4169e1;">Sales Billing Summary</h3>
                <table class="table table-border table-condensed table-bordered">
                    <tr>
                        <th>Invoice Number</th>
                        <th>Sale Price</th>
                        <th>Invoice Date</th>
                        <th>Activation Timestamp</th>
                    </tr>

                    #if($fofoOrders && !$fofoOrders.isEmpty())
                        #foreach($fo in $fofoOrders)
                            <tr>
                                <td>$fo.getInvoiceNumber()</td>
                                <td>$fo.getTotalAmount()</td>
                                <td>$fo.getCreateTimestamp().format($dateFormatter)</td>
                                #if($activatedImei.getActivationTimestamp())
                                    <td>$activatedImei.getActivationTimestamp().format($dateFormatter)</td>
                                #else
                                    <td> --</td>
                                #end
                            </tr>
                        #end
                    #end
                </table>
            </div>

        </div>

        #if($schemeInOut || $offerPayouts)
        <div class="row" style="margin: 0;">
        <div class="col-lg-12">
            <h3 style="text-align:center; color:#4169e1;">IMEI Wise Margin Status</h3>
            <div><h4 style="margin-left:10px;">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>
                <th>Start Date</th>
                <th>End Date</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
                    #if($schemeMap.get($sio.getSchemeId()).getFormattedStartDateTime())
                        <td>$schemeMap.get($sio.getSchemeId()).getStartDateTime().format($dateFormatter)</td>
                    #else
                        <td>-</td>
                    #end
                    #if($schemeMap.get($sio.getSchemeId()).getEndDateTime())
                        <td>$dateFormatter.format($schemeMap.get($sio.getSchemeId()).getEndDateTime())</td>
                    #else
                        <td>-</td>
                    #end
                #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>


        #if($searchImei.length() > 0)
            <div class="row">
                <div class="col-lg-6">
                    <h3 style="text-align:center; color:#4169e1;">Price Drop</h3>
                    <table class="table table-border table-condensed table-bordered"
                           id="offr-des">
                        <tr>
                            <th>Price Drop Id</th>
                            <th>Price Drop Date</th>
                            <th>Status</th>
                            <th>Amount</th>
                            <th>Credited On</th>
                            <th>Rejected On</th>
                            <th>Description</th>


                        </tr>
                        #if($priceDropImeis && !$priceDropImeis.isEmpty())
                            #foreach( $pdi in $priceDropImeis )
                                <tr class="priceDrop-details">
                                    <td>$pdi.getPriceDrop().getId()</td>
                                    <td>$pdi.getPriceDrop().getAffectedOn().format($dateFormatter)</td>
                                    <td>$pdi.getStatus()</td>
                                    <td>$pdi.getPriceDrop().getAmount()</td>
                                    #if($pdi.getCreditTimestamp().format($dateTimeFormatter))
                                        <td>$pdi.getCreditTimestamp().format($dateTimeFormatter)</td>
                                    #else
                                        <td>-</td>
                                    #end
                                    #if($pdi.getRejectTimestamp().format($dateTimeFormatter))
                                        <td>$pdi.getRejectTimestamp().format($dateFormatter)</td>
                                    #else
                                        <td>-</td>
                                    #end
                                    #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>

<div class="offer-margin-container">
    <div  class="modal  text-center" id="offerDescription">
        <div class="modal-dialog">
            <div class="modal-content">

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