Subversion Repositories SmartDukaan

Rev

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


<script  type="text/javascript">
  
        
   $(function () {
        getVendorAheadOptions($("#typeaheadVendor"), function (selectedVendor) {
                $('#vendorId').val(selectedVendor.id + "");
                
        });
        
        
        
        });
        
        
   $(document).ready(function () {
        
      var dtable = $('#open-invoices').DataTable({
           
            
       });
    
    }); 

       
</script>
        
<section class="wrapper">            
        <div class="row">
                <div class="col-lg-12">
                        <h3 class="page-header"><i class="icon_document_alt"></i>Receive New Invoice</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>Receive New Invoice</li>
                        </ol>
                </div>
        </div>
          <div  class="row">
  
  
                <div id="filter-details" style="background:white;background-color:white;padding:10px;">
                                <div class = "row">
                                
                                        <div class="col-lg-2 form-group">
                                            <label>Actual Invoice Date</label>  
                                       <input type="date" class="form-control" id="actualDate" autocomplete="off"  placeholder="Actual Date"/>
                                        </div>  
                                        
                                        <div class="col-lg-2 form-group">
                                            <label>Vendor</label>       
                       
                                      <input placeholder="Enter Vendor Name" type="text" class="typeahead form-control"
                                 id="typeaheadVendor" name="Item" data-provide="typeahead" value="" autocomplete="off">
                                  <input id="vendorId" type="hidden" /> 
                       </div>
              
                        
                                    <div class="col-lg-2 form-group">
                                        <label>Invoice Number</label>   
                       
                                       <input type="text" class="form-control" id="invoiceNumber" autocomplete="off" placeholder="Invoice Number"/>
                                        </div>  
                                        
                                        <div class="col-lg-2 form-group">
                                            <label>Warehouse</label>    
                                           
                                        <select class="form-control input-sm" id = "warehouseMap" name="warehouseMap" placeholder="Warehouse">
                                                        <option value="" disabled selected>Warehouse</option>
                                                                #foreach($wm in $warehouseMap.entrySet()))
                                                        <option value="$wm.getKey()">$wm.getValue()</option>
                                                  #end          
                                          </select>
          
                                        </div>  
                                        
                                        <div class="col-lg-2 form-group">
                                            <label>Number of items</label>      
                                       <input type="number" class="form-control" id="numberofItems" autocomplete="off"  placeholder="Number of Items"/>
                                        </div>  
                                        
                                        </div>
                                        
                                        <div class = "row">
                                
                                
                                        
                                        <div class="col-lg-2 form-group">
                                            <label>Total Value</label>  
                                       <input type="number" class="form-control" id="totalValue" autocomplete="off"  placeholder="Total Value"/>
                                        </div>  
                                        
                                        
                
                                     <div class="col-lg-2 form-group">
                                   <label>Invoice</label>       
                                        
                                    <input type="hidden" id"invoicehidden" value="">
                            <input type="file" id="invoice" placeholder="invoice"  name="invoice"
                                   value="">
                                   
                    </div>
                                        
                                    <div class="col-lg-2 form-group">
                                        <label>Action</label>   
                                  
                                                <input class="form-control btn btn-primary createReceiveInvoice" type="button" value="Receive"> 
                                        </div>
                                        
                                
                        
                         </div>
            </div>
           </div>
           
           
 <div class="row">

<div class="col-lg-12">
            <table id="open-invoices" class="table table-striped table-advance table-hover" >
              <thead>
                <tr>
                 <th> Date</th>
                 <th> Supplier</th>
                 <th>Warehouse</th>
                 <th> Invoice Number</th>  
                 <th> Num Items</th>  
                 <th> Invoice Date</th>  
                 <th> Received By</th>
                
                 <th> Status </th>
                 <th> Invoice </th>
                
                </tr>
              </thead> 
                
              <tbody> 
              
              
               #foreach($supplierInvoice in $supplierInvoices)
                <tr>
                <td>$supplierInvoice.getCreateDate().format($dateTimeFormatter)</td>
                <td>$supplierMap.get($supplierInvoice.getSupplierId()).getName()</td>
                <td>$warehouseMap.get($supplierInvoice.getWarehouseId()) </td>
                <td> <a  onclick="getInvoiceItems($supplierInvoice.getId())">$supplierInvoice.getInvoiceNumber() </a> </td>
                <td>$supplierInvoice.getNumItems()</td>     
                <td>$supplierInvoice.getInvoiceDate().format($dateTimeFormatter)</td>     
                <td>$supplierInvoice.getReceivedFrom()</td> 
                #if($grnRequestMap.get($supplierInvoice.getId()))
                <td>$grnRequestMap.get($supplierInvoice.getId()).getStatus() </td>  
                #else
                 <td> - </td>
                #end 
                <td>          <a href="${rc.contextPath}/download-attachment?documentId=$supplierInvoice.getInvoiceDocId()" class="download">Download Doc</a>
                      </td> 
            
               </tr>
               #end
                 
             </tbody>
           </table>
  </div>
  </div>
 <div class="row">
  
   <div class="col-lg-12">
    <div class="invoiceadditemcontainer">
  
  </div>
  </div>
  
  </div>   
 

        
</section>