Subversion Repositories SmartDukaan

Rev

Rev 36447 | 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>SALE RETURNS</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>SALE RETURNS</li>
                        </ol>
                </div>
        </div>

        <div>
                <div class="row">
                        <div class="col-lg-3">
                                <input type="text" class="form-control" id="debit-note-number-input" placeholder="Enter Debit Note Number" value="" />
                        </div>
                        <div class="col-lg-1">
                                <button class="btn btn-primary" id="search-debit-note-btn" type="button">Search</button>
                        </div>
                        <div class="col-lg-3">
                                <input type="text" class="form-control" id="invoice-number-input" placeholder="Enter Invoice Number" value="" />
                        </div>
                        <div class="col-lg-1">
                                <button class="btn btn-primary" id="return-invoice-button" type="button">Search</button>
                        </div>
                </div>
                <div class="row" style="margin-top: 8px;">
                        <div class="col-lg-2">
                                <label style="font-size:12px;">From</label>
                                <input type="date" class="form-control" id="invoice-return-from-date" value="$!fromDate" />
                        </div>
                        <div class="col-lg-2">
                                <label style="font-size:12px;">To</label>
                                <input type="date" class="form-control" id="invoice-return-to-date" value="$!toDate" />
                        </div>
                        <div class="col-lg-1" style="margin-top: 21px;">
                                <button class="btn btn-default" id="invoice-return-date-apply" type="button">Apply</button>
                        </div>
                </div>
        </div>
        <div id="invoice-return-results" style="margin-top: 4%">

        </div>

        #if($recentOrders && $recentOrders.size() > 0)
        <div style="margin-top: 4%">
                <h4>Recently Received Debit Notes</h4>
                <table class="table table-striped table-condensed table-bordered">
                        <thead>
                                <tr>
                                        <th>DN Id</th>
                                        <th>Debit Note #</th>
                                        <th>Invoice</th>
                                        <th>Partner</th>
                                        <th>Warehouse</th>
                                        <th>Received By</th>
                                        <th>Received On</th>
                                        <th>Status</th>
                                        <th>Action</th>
                                </tr>
                        </thead>
                        <tbody>
                                #foreach($pro in $recentOrders)
                                #set($dn = $debitNoteMap.get($pro.getId()))
                                <tr>
                                        <td>#if($dn)$dn.getId()#else-#end</td>
                                        <td>
                                                #if($dn)
                                                <a href="javascript:void(0)" class="debit-note-details" data-debitnote-id="$dn.getId()">$dn.getDebitNoteNumber()</a>
                                                #else
                                                $pro.getDocumentReference()
                                                #end
                                        </td>
                                        <td>#if($invoiceMap.get($pro.getId()))<a href="${rc.contextPath}/purchase-invoice/$invoiceMap.get($pro.getId())" target="_blank">$invoiceMap.get($pro.getId())</a>#end</td>
                                        <td>$!partnerNameMap.get($pro.getFofoId())</td>
                                        <td>$!warehouseNameMap.get($pro.getWarehouseId())</td>
                                        <td>$!pro.getReceivedBy()</td>
                                        <td>$!pro.getFormattedReceiveTimestamp()</td>
                                        <td>
                                                #if($pro.getRejectTimestamp() && $pro.getRetailerAcknowledgeTimestamp())
                                                        <span class="label label-default">Cancelled</span>
                                                #elseif($pro.getRejectTimestamp())
                                                        <span class="label label-danger">Rejected - Pending Acknowledgment</span>
                                                #elseif($pro.getRefundTimestamp())
                                                        <span class="label label-success">Refunded</span>
                                                #elseif($pro.getReceiveTimestamp())
                                                        <span class="label label-info">Received - Pending Refund</span>
                                                #else
                                                        <span class="label label-warning">Pending Receive</span>
                                                #end
                                        </td>
                                        <td>
                                                #if($dn)
                                                        #if(!$pro.getReceiveTimestamp() && $canReceive)
                                                                <a href="javascript:void(0)" class="btn btn-xs btn-info receive-debit-note" data-debitnote-id="$dn.getId()">Receive</a>
                                                        #end
                                                        #if($pro.getReceiveTimestamp() && !$pro.getRefundTimestamp() && !$pro.getRejectTimestamp() && $canRefund)
                                                                <a href="javascript:void(0)" class="btn btn-xs btn-danger refund-debit-note" data-debitnote-id="$dn.getId()">Refund</a>
                                                        #end
                                                        #if($pro.getRejectTimestamp() && !$pro.getRetailerAcknowledgeTimestamp())
                                                                <a href="javascript:void(0)" class="btn btn-xs btn-warning acknowledge-rejected-return" data-debitnote-id="$dn.getId()">Acknowledge Receipt</a>
                                                        #end
                                                #else
                                                        #if($pro.getReceiveTimestamp() && !$pro.getRefundTimestamp() && !$pro.getRejectTimestamp() && $canApproveInvoiceReturn)
                                                                <a href="javascript:void(0)" class="btn btn-xs btn-danger approve-invoice-return" data-pro-id="$pro.getId()">Approve & Refund</a>
                                                                <a href="javascript:void(0)" class="btn btn-xs btn-warning reject-invoice-return" data-pro-id="$pro.getId()">Reject</a>
                                                        #end
                                                #end
                                        </td>
                                </tr>
                                #end
                        </tbody>
                </table>
        </div>
        #end

</section>