Subversion Repositories SmartDukaan

Rev

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

<script type="text/javascript">
        var customRetailers = ${customRetailers};
        $("#FofoId").typeahead({
          source: customRetailers,
          autoSelect: true,
          displayText:function(item){return item.businessName + "-" + item.address.city;},
          afterSelect:  function(currentItem){
                                                currentFofoId = currentItem.partnerId;
                                        }
        });
        
        $('#businessDate').daterangepicker(getSingleDatePicker(true), dateRangeCallback);
        
        $('button.btnuploadcns').on('click', function() {
                var fileSelector = $('#uploadcns')[0];
                if(fileSelector != undefined && fileSelector.files[0] != undefined) {
                        if(confirm("Confirm Upload?")) {
                                doAjaxUploadRequestHandler("${rc.contextPath}/wallet/upload", "POST", fileSelector.files[0], function(response){
                                        if(response) {
                                                alert("Content updated successfully");
                                        }
                                });
                        }
                } else {
                        alert("Please upload file!");
                }
                return false;
        });
        
</script>

<section class="wrapper">            
        <div class="row">
                <div class="col-lg-12">
                        <h3 class="page-header"><i class="icon_document_alt"></i>Wallet-Edit</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>CREDIT/DEBIT</li>
                        </ol>
                </div>
        </div>
        
        <div style="background:white;background-color:white;padding:10px;">
                <form class="form-horizontal" style="display:inline-block">
                                <label class="control-label col-sm-2" for="excelfile">Bulk Credit/Debit:</label>
                            <div class="col-lg-3">
                                <div class="input-group">
                                        <input class="form-control" type="file" id="uploadcns" name="uploadcns" value="Upload File">
                                        <span class="input-group-btn">
                                                <button class="btn btn-default btnuploadcns">
                                                            Uplaod
                                                        </button>
                                                </span>
                                        </div>
                            </div>
                        <!--<div class="col-lg-2">
                                <a class="btn btn-default" href="/content/template.csv">
                                            Download Tempate
                                        </a>-->
                        </div>
                    </form>
        </div>
        <div style="background:white;background-color:white;padding:10px;">
                <h4 class="modelHeaderCustom" style="font-size:22px;">Credit/Debit</h4>
                <form id = "wallet-form" >
                        <div class = "row">
                                <div class="col-lg-2 form-group">
                                <input id="FofoId" type="text" class="typeahead form-control form-control-sm" placeholder="Partner Name" data-provide="typeahead" 
                                 #if(${retailerName}) value="${retailerName}" #end
                                 autocomplete="off"/>

                            </div>
                            <div class="col-lg-2 form-group">
                                        <button class="btn btn-primary fetchTransactions" type="button">Search Transactions</button>
                                </div>
                        </div>
                        
                        <div class = "row">
                                <div class="col-lg-2 form-group">
                                        <select class="form-control input-sm" id = "reference-type" name = "reference-type" placeholder="Reference Type">
                                                <option value="" disabled selected>Reference Type</option>
                                                #foreach($referenceType in $referenceTypes)
                                        <option value="${referenceType.getValue()}">$referenceType</option>
                                #end
                        </select>
                                </div>
                                
                                <div class="col-lg-2 form-group">
                                        <input placeholder="Reference Id" id="reference_id" name="reference_id" type="text" value="" class="form-control input-sm">
                                </div>
                                
                                <div class="col-lg-2 form-group">
                                        <button class="btn btn-primary referenceSearch" type="button">Search</button>
                                </div>
                        </div>
                
                        <div class = "row">
                                <div class="col-lg-1 form-group">
                                        <select class="form-control input-sm" id = "transaction-type" name = "transaction-type" placeholder="Transaction Type">
                                                <option value="" disabled selected>Transaction Type</option>
                                                #foreach($transactionType in $transactionTypes)
                                        <option value="$transactionType">$transactionType</option>
                                #end
                        </select>
                                </div>
                                
                                <div class="col-lg-1 form-group">
                                        <input placeholder="Amount" id="amount" name="amount" type="text" value="" class="form-control input-sm">
                                </div>
                                
                                
                                <div class="col-lg-1 form-group">
                                        <input placeholder="Business date" id="businessDate" name="businessDate" type="text" value="" class="form-control input-sm">
                                </div>
                                
                                <div class="col-lg-2 form-group">
                                        <input placeholder="Description" id="description" name="description" type="text" value="" class="form-control input-sm">
                                </div>
                                
                                
                                <div class="col-lg-1 form-group">
                                        <button class="btn btn-primary transactionSubmit" type="button">Submit</button>
                                </div>
                                </div>
                </div>
        </div>
        </div>
        </form>
        
             <div class="wallet-history-container">
                </div>   
</section>