Subversion Repositories SmartDukaan

Rev

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

<style>
    .orangeBg {
        background-color: rgba(255, 165, 0, 0.66);
    }

    .redBg {
        background-color: rgba(255, 0, 0, 0.49);
    }

    .greenBg {
        background-color: rgba(0, 128, 0, 0.56);
    }
    #transactionList_wrapper .col-sm-6 {
        padding: 2px !important;
    }

    .active-tr {
        background-color: #f8f8a7;
    }

    #transactionList_length, #transactionList_filter {
        padding: 8px !important;
    }


    .nav > li > a {
        padding: 4px 8px !important;
    }

</style>
<section class="wrapper" style="font-size: 12px;">
    <div class="row">
        <div class="col-lg-12">

            <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>Warehouse Management</li>
                <input type="hidden" id="firstTxnId" value="$firstTransactionId">
            </ol>
        </div>
    </div>


    <div class="col-lg-4">
        <div class="row">
            <div class="well" style="padding: 10px; max-height: 800px;overflow-y: auto;">
                <div class="row">
                    <div class="col-md-6">
                        <ul class="nav nav-pills">
                            <li class="active"><a data-toggle="pill" href="#readyToBill">Ready to Bill</a></li>
                            <li><a data-toggle="pill" href="#ooStock">Out of stock</a></li>
                        </ul>

                    </div>
                    <div class="col-md-6">
                        <div id="authWarehousesList">
                        </div>
                    </div>
                </div>
                <div style="max-height: 600px;overflow-y: auto;">
                    <div class="tab-content">
                        <div id="readyToBill" class="tab-pane fade in active">
                            <table class="table table-bordered" id="transactionList">
                                <thead>
                                <tr>
                                    <th>Txn Id</th>
                                    <th>Retailer Name</th>
                                    <th>Created</th>
                                </tr>
                                </thead>
                                <tbody>
                                    #foreach($perTransactionOrder in $perTransactionAvailableOrders)
                                        #set($hasOutOfStock = false)
                                        #set($hasInStock = false)
                                        #foreach($order in $orderTransactionMap.get($perTransactionOrder.getTransactionId()))
                                            #if($oosItemIds.contains($order.getLineItem().getItemId()))

                                                #set($hasOutOfStock = true)
                                            #else
                                                #set($hasInStock = true)
                                            #end
                                        #end
                                        #if($hasOutOfStock && $hasInStock)
                                        <tr class="order_by_transaction orangeBg"
                                            data-transaction="$perTransactionOrder.getTransactionId()">

                                        #elseif($hasInStock)
                                        <tr class="order_by_transaction greenBg"
                                            data-transaction="$perTransactionOrder.getTransactionId()">
                                        #end
                                        <td>$perTransactionOrder.getTransactionId()</td>
                                        <td>
                                    <span>
                                        #if($perTransactionOrder.getRetailerName())
                                            $perTransactionOrder.getRetailerName()
                                        #end
                                        #if($perTransactionOrder.getRetailerCity() && $perTransactionOrder.getRetailerState())
                                            ($perTransactionOrder.getRetailerCity()
                                            , $perTransactionOrder.getRetailerState())
                                        #end
                                    </span>
                                        </td>
                                        <td>$perTransactionOrder.getCreateTimestamp().format($dateFormatter)</td>
                                    </tr>

                                    #end
                                </tbody>

                            </table>
                        </div>
                        <div id="ooStock" class="tab-pane fade">
                            <table class="table table-bordered" id="ooStransactionList">
                                <thead>
                                <tr>
                                    <th>Txn Id</th>
                                    <th>Retailer Name</th>
                                    <th>Created</th>
                                </tr>
                                </thead>
                                <tbody>
                                    #foreach($perTransactionOrder in $perTransactionOOSOrders)

                                    <tr class="order_by_transaction redBg"
                                        data-transaction="$perTransactionOrder.getTransactionId()">
                                        <td>$perTransactionOrder.getTransactionId()</td>
                                        <td>
                                            <span>
                                                #if($perTransactionOrder.getRetailerName())
                                                    $perTransactionOrder.getRetailerName()
                                                #end
                                                #if($perTransactionOrder.getRetailerCity() && $perTransactionOrder.getRetailerState())
                                                    ($perTransactionOrder.getRetailerCity()
                                                    , $perTransactionOrder.getRetailerState())
                                                #end
                                            </span>
                                        </td>
                                        <td>$perTransactionOrder.getCreateTimestamp().format($dateFormatter)</td>
                                    </tr>

                                    #end
                                </tbody>

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


                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-8" id="transaction-detail-container">
        <div class="row" id="transaction-detail-container">

        </div>
    </div>


</section>


<script>
    $(document).ready(function () {
        $('#transactionList').DataTable(
                {
                    "bPaginate": true,
                    "pageLength": 50,
                    "bLengthChange": true,
                    "bFilter": true,
                    "bInfo": false,
                    "bAutoWidth": false
                }
        )
        ;$('#ooStransactionList').DataTable(
                {
                    "bPaginate": true,
                    "pageLength": 50,
                    "bLengthChange": true,
                    "bFilter": true,
                    "bInfo": false,
                    "bAutoWidth": false
                }
        );

    });
</script>