Subversion Repositories SmartDukaan

Rev

Rev 36080 | 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(
                "reportswalletstatement.walletstatement")</h3>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">#springMessage(
                    "reportswalletstatement.home")</a></li>
                <li><i class="icon_document_alt"></i>#springMessage("reportswalletstatement.walletstatement")</li>
            </ol>
        </div>
    </div>
    <div class="row col-lg-12" style="float: right;">


        #if($isAdmin)
            #set($counter =0)
            #foreach($walletSummary in $walletSummaryList )
                #if($counter==1)
                    #break
                #end
                <h4 style="color:#055fb7;margin-top: 20px;margin-bottom: 10px;margin-left:auto:">
                    $walletSummary.getCode() - $walletSummary.getName()(
                    $walletSummary.getPhone()-$walletSummary.getEmail()
                    ) (
                    #if($userWallet.getAmount())
                        Wallet Amount : $userWallet.getAmount()
                    #end)
                </h4>
                #set($counter =$counter+1)
            #end
            #if($isRBM)
                <div style="float: left;"
                     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: -9px">
                            <input id="partnerId" type="hidden">
                            <br>
                        </div>
                    </div>
                </div>
            #end
        #end
        #if(!$isAnalysis)
            #springMessage("reportswalletstatement.from") <input type="date" id="startDate-wallet-summary-report"
                                                                 placeholder="" name="" value="$startDate">

            #springMessage("reportswalletstatement.to") <input type="date" id="endDate-wallet-summary-report"
                                                               placeholder=""
                                                               value="$endDate">
            <button type="submit" class="wallet-summary-fetch-report">Fetch Report</button>
            <button type="submit" class="download-wallet-summary-report">#springMessage(
                "reportswalletstatement.downloadreport") </button>
        #else
            #springMessage("reportswalletstatement.from") <input type="date"
                                                                 id="analysis-startDate-wallet-summary-report"
                                                                 placeholder="" name="" value="$startDate">

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

    </div>


    <div class="col-lg-12">


        <table class="table table-border table-condensed table-bordered" id="walletSummaryReport" style="width:100%">

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

            <tr style="color:black;">

                <th> #springMessage("reportswalletstatement.amount")</th>
                <th>  #springMessage("reportswalletstatement.reference")</th>
                <th>  #springMessage("reportswalletstatement.referencetype")</th>
                <th>Running Balance</th>
                <th> Created On</th>
                <th> #springMessage("reportswalletstatement.description")</th>


            </tr>
            </thead>
            <tbody>
                #foreach($walletSummary in $walletSummaryList )
                <tr>
                    <td>$walletSummary.getAmount()</td>
                    <td>$walletSummary.getReference()</td>
                    <td>$walletSummary.getReferenceType()</td>
                    <td>$walletSummary.getRunningBalance()</td>
                    <td>$walletSummary.getTimestamp().format($datehiphenFormatter)</td>
                    <td>$walletSummary.getDescription()</td>
                </tr>
                #end

            </tbody>

        </table>
    </div>

</section>


<script>

    var dtable = $('#walletSummaryReport').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