Subversion Repositories SmartDukaan

Rev

Rev 30607 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style>
    .table-striped > tbody > tr:nth-child(odd) > td {
        background: white;
        background-color: white;
    }

    .table-striped > tbody > tr:nth-child(even) > td {
        background: white;
        background-color: white;
    }

    .table-striped > tbody > tr:hover > td,
    .table-striped > tbody > tr:hover {
        background-color: #e98c8f;
        color: white;
    }

    .btn:hover {
        color: grey;
        text-decoration: none;
    }

    .btn-primary:hover {
        color: grey;
        text-decoration: none;
    }

    .sale-details {
        cursor: pointer;
    }
</style>
<script>
    $(function () {

        let start = moment().subtract(29, 'days');
        let end = moment();
        $('#saleDuration').daterangepicker(getRangedDatePicker(true, start, end));
    });
</script>

<section class="wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><i class="icon_document_alt"></i>#springMessage("salehistory.salehistory")</h3>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">#springMessage("salehistory.home")</a></li>
                <li><i class="icon_document_alt"></i>#springMessage("salehistory.salehistory")</li>
            </ol>
        </div>
    </div>

    <div id="sale-history-search">
        <div class="row">
            <div class="col-lg-2 form-group">
                <select class="form-control" id="searchType" name="searchType" placeholder="#springMessage("salehistory.searchtype")">
                    <option value="" disabled selected>Search Type</option>
                    #foreach($searchType1 in $searchTypes)
                        #if($searchType.getValue()==$searchType1.getValue())
                            <option value="$searchType1" selected>$searchType1.getValue()</option>
                        #else
                            <option value="$searchType1">$searchType1.getValue()</option>
                        #end
                    #end
                </select>
            </div>
            #if($searchType.getValue()=="Date-Range")
                <div class="col-lg-3">
                    <div class="input-group">
                        <input class="form-control" placeholder="Sale Period" id="saleDuration" type="text"
                               value="$searchValue">
                    </div>
                </div>
            #elseif($searchType)
                <div class="col-lg-3">
                    <input type="text" class="form-control" id="sale-history-search-text" placeholder="#springMessage("salehistory.searchby")
                     $searchType.getValue()" value="$searchValue"/>
                </div>
            #else
                <div class="col-lg-3">
                    <input type="text" class="form-control" id="sale-history-search-text" placeholder="#springMessage("salehistory.searchby")"
                           value="$searchValue"/>
                </div>
            #end
            <div class="col-lg-1">
                <button class="btn btn-primary submit" id="sale-history-search-button" type="button">#springMessage("salehistory.search")</button>
            </div>
            <div class="col-lg-2">
                <button class="btn btn-primary submit" id="invoice-download-button" type="button">#springMessage("salehistory.downloadupto100invoices")
                </button>
            </div>

        </div>
    </div>
    <div id="sale-history-table">
        <div class="row">
            <div class="col-lg-12">
                <table class="table table-striped table-advance table-hover">
                    <tbody>
                    <tr>
                        <th>#springMessage("salehistory.invoicenumber")</th>
                        <th>#springMessage("salehistory.totalamount")</th>
                        <th>#springMessage("salehistory.createdon")</th>
                        <th>#springMessage("salehistory.viewdetails")</th>
                    </tr>
                        #if(!$saleHistories.isEmpty())
                            #foreach( $saleHistory in $saleHistories )
                            <tr class="sale-details" data="$saleHistory.getId()">
                                <td>$saleHistory.getInvoiceNumber()</td>
                                <td>$saleHistory.getTotalAmount()</td>
                                <td>$saleHistory.getFormattedDate()</td>
                                <td>
                                    <button class="btn btn-primary">View</button>
                                </td>
                            </tr>
                            #end
                        #else
                        <tr>
                            <td colspan="6" style="text-align:center;">#springMessage("salehistory.nomatchingdatafoundicritreria")</td>
                        </tr>
                        #end
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    #if(!$saleHistories.isEmpty())
        <div class="row" id="sale-history-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>
    #end
</section>
<div id="sale-details-container" style="background:white;background-color:white;">
</div>