Subversion Repositories SmartDukaan

Rev

Rev 32311 | Rev 32377 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32311 Rev 32349
Line -... Line 1...
-
 
1
<script type="text/javascript">
-
 
2
    $(function () {
-
 
3
        getVendorAheadOptions($("#typeaheadVendor"), function (selectedVendor) {
-
 
4
            $('#vendorId').val(selectedVendor.id + "");
1
 
5
 
2
<script  type="text/javascript">
-
 
3
  
-
 
4
        
-
 
5
   $(function () {
-
 
6
	getVendorAheadOptions($("#typeaheadVendor"), function (selectedVendor) {
-
 
7
		$('#vendorId').val(selectedVendor.id + "");
-
 
8
		
-
 
9
	});
-
 
10
	
-
 
11
	
-
 
12
	
-
 
13
	});
-
 
14
	
-
 
15
	
-
 
16
   $(document).ready(function () {
-
 
17
    	
-
 
18
      var dtable = $('#open-invoices').DataTable({
-
 
19
           
-
 
20
            
-
 
21
       });
6
        });
22
    
-
 
23
    }); 
-
 
24
 
7
 
-
 
8
 
25
       
9
    });
-
 
10
 
-
 
11
    $(document).ready(function () {
-
 
12
 
-
 
13
        var dtable = $('#open-invoices').DataTable({});
-
 
14
 
-
 
15
    });
26
</script>
16
</script>
27
	
17
 
28
<section class="wrapper">            
18
<section class="wrapper">
29
	<div class="row">
19
    <div class="row">
30
		<div class="col-lg-12">
20
        <div class="col-lg-12">
31
			<h3 class="page-header"><i class="icon_document_alt"></i>Receive New Invoice</h3>
21
            <h3 class="page-header"><i class="icon_document_alt"></i>Receive New Invoice</h3>
32
			<ol class="breadcrumb">
22
            <ol class="breadcrumb">
33
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
23
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
34
				<li><i class="icon_document_alt"></i>Receive New Invoice</li>
24
                <li><i class="icon_document_alt"></i>Receive New Invoice</li>
35
			</ol>
25
            </ol>
36
		</div>
26
        </div>
37
	</div>
27
    </div>
38
	  <div  class="row">
28
    <div class="row">
39
  
29
 
40
  
30
 
41
		<div id="filter-details" style="background:white;background-color:white;padding:10px;">
31
        <div id="filter-details" style="background:white;background-color:white;padding:10px;">
42
				<div class = "row">
32
            <div class="row">
43
				
33
 
44
					<div class="col-lg-2 form-group">
34
                <div class="col-lg-2 form-group">
45
					    <label>Actual Invoice Date</label>	
35
                    <label>Actual Invoice Date</label>
46
				       <input type="date" class="form-control" id="actualDate" autocomplete="off"  placeholder="Actual Date"/>
36
                    <input type="date" class="form-control" id="actualDate" autocomplete="off"
-
 
37
                           placeholder="Actual Date"/>
47
					</div>	
38
                </div>
48
					
39
 
49
					<div class="col-lg-2 form-group">
40
                <div class="col-lg-2 form-group">
50
					    <label>Vendor</label>	
41
                    <label>Vendor</label>
51
                       
-
 
-
 
42
 
52
				      <input placeholder="Enter Vendor Name" type="text" class="typeahead form-control"
43
                    <input placeholder="Enter Vendor Name" type="text" class="typeahead form-control"
53
                                 id="typeaheadVendor" name="Item" data-provide="typeahead" value="" autocomplete="off">
44
                           id="typeaheadVendor" name="Item" data-provide="typeahead" value="" autocomplete="off">
54
                                  <input id="vendorId" type="hidden" /> 
45
                    <input id="vendorId" type="hidden"/>
55
  	               </div>
46
                </div>
56
  	      
47
 
57
			
48
 
58
				    <div class="col-lg-2 form-group">
49
                <div class="col-lg-2 form-group">
59
				        <label>Invoice Number</label>	
50
                    <label>Invoice Number</label>
60
                       
-
 
-
 
51
 
61
				       <input type="text" class="form-control" id="invoiceNumber" autocomplete="off" placeholder="Invoice Number"/>
52
                    <input type="text" class="form-control" id="invoiceNumber" autocomplete="off"
-
 
53
                           placeholder="Invoice Number"/>
62
					</div>	
54
                </div>
63
					
55
 
64
					<div class="col-lg-2 form-group">
56
                <div class="col-lg-2 form-group">
65
					    <label>Warehouse</label>	
57
                    <label>Warehouse</label>
66
				     	   
58
 
67
				     	<select class="form-control input-sm" id = "warehouseMap" name="warehouseMap" placeholder="Warehouse">
59
                    <select class="form-control input-sm" id="warehouseMap" name="warehouseMap" placeholder="Warehouse">
68
							<option value="" disabled selected>Warehouse</option>
60
                        <option value="" disabled selected>Warehouse</option>
69
								#foreach($wm in $warehouseMap.entrySet()))
61
                        #foreach($wm in $warehouseMap.entrySet()))
70
				             		<option value="$wm.getKey()">$wm.getValue()</option>
62
                            <option value="$wm.getKey()">$wm.getValue()</option>
71
				             	  #end   	
63
                        #end
72
				          </select>
64
                    </select>
-
 
65
 
73
          
66
                </div>
74
					</div>	
-
 
75
					
67
 
76
					<div class="col-lg-2 form-group">
68
                <div class="col-lg-2 form-group">
77
					    <label>Number of items</label>	
69
                    <label>Number of items</label>
78
				       <input type="number" class="form-control" id="numberofItems" autocomplete="off"  placeholder="Number of Items"/>
70
                    <input type="number" class="form-control" id="numberofItems" autocomplete="off"
-
 
71
                           placeholder="Number of Items"/>
79
					</div>	
72
                </div>
80
					
73
 
81
					</div>
74
            </div>
82
					
75
 
83
					<div class = "row">
76
            <div class="row">
84
				
77
 
85
				
78
 
86
					
-
 
87
					<div class="col-lg-2 form-group">
79
                <div class="col-lg-2 form-group">
88
					    <label>Total Value</label>	
80
                    <label>Total Value</label>
89
				       <input type="number" class="form-control" id="totalValue" autocomplete="off"  placeholder="Total Value"/>
81
                    <input type="number" class="form-control" id="totalValue" autocomplete="off"
-
 
82
                           placeholder="Total Value"/>
90
					</div>	
83
                </div>
91
					
-
 
92
					
84
 
93
		
85
 
94
				     <div class="col-lg-2 form-group">
86
                <div class="col-lg-2 form-group">
95
				   <label>Invoice</label>	
87
                    <label>Invoice</label>
96
				      	
88
 
97
				    <input type="hidden" id"invoicehidden" value="">
89
                    <input type="hidden" id=invoicehidden" value=""/>
98
                            <input type="file" id="invoice" placeholder="invoice"  name="invoice"
90
                    <input type="file" id="invoice" placeholder="invoice" name="invoice"
99
                                   value="">
91
                           value="">
100
                                   
-
 
-
 
92
 
101
                    </div>
93
                </div>
102
					
94
 
103
				    <div class="col-lg-2 form-group">
95
                <div class="col-lg-2 form-group">
104
				        <label>Action</label>	
96
                    <label>Action</label>
105
				  
97
 
106
						<input class="form-control btn btn-primary createReceiveInvoice" type="button" value="Receive">	
98
                    <input class="form-control btn btn-primary createReceiveInvoice" type="button" value="Receive">
107
					</div>
99
                </div>
108
					
-
 
109
				
100
 
110
			
101
 
111
			 </div>
102
            </div>
112
	    </div>
103
        </div>
113
	   </div>
104
    </div>
114
	   
105
 
115
	   
106
 
116
 <div class="row">
107
    <div class="row">
117
 
108
 
118
<div class="col-lg-12">
109
        <div class="col-lg-12">
119
            <table id="open-invoices" class="table table-striped table-advance table-hover" >
110
            <table id="open-invoices" class="table table-striped table-advance table-hover">
120
              <thead>
111
                <thead>
121
                <tr>
112
                <tr>
122
                 <th> Date</th>
113
                    <th>Date</th>
123
                 <th> Supplier</th>
114
                    <th>Supplier</th>
124
                 <th>Warehouse</th>
115
                    <th>Warehouse</th>
125
                 <th> Invoice Number</th>  
116
                    <th>Invoice Number</th>
126
                 <th> Num Items</th>  
117
                    <th>Num Items</th>
127
                 <th> Invoice Date</th>  
118
                    <th>Total Value</th>
128
                 <th> Received By</th>
119
                    <th>Invoice Date</th>
129
                
120
                    <th>Received By</th>
-
 
121
 
130
                 <th> Status </th>
122
                    <th> Status</th>
131
                 <th> Invoice </th>
123
                    <th> Invoice</th>
132
                
124
 
133
                </tr>
125
                </tr>
134
              </thead> 
126
                </thead>
135
                
-
 
-
 
127
 
136
              <tbody> 
128
                <tbody>
137
              
129
 
138
              
130
 
139
               #foreach($supplierInvoice in $supplierInvoices)
131
                    #foreach($supplierInvoice in $supplierInvoices)
140
                <tr>
132
                    <tr>
141
                <td>$supplierInvoice.getCreateDate().format($dateTimeFormatter)</td>
133
                        <td>$supplierInvoice.getCreateDate().format($dateTimeFormatter)</td>
142
                <td>$supplierMap.get($supplierInvoice.getSupplierId()).getName()</td>
134
                        <td>$supplierMap.get($supplierInvoice.getSupplierId()).getName()</td>
143
                <td>$warehouseMap.get($supplierInvoice.getWarehouseId()) </td>
135
                        <td>$warehouseMap.get($supplierInvoice.getWarehouseId()) </td>
-
 
136
                        <td>
144
                <td> <a  onclick="getInvoiceItems($supplierInvoice.getId())">$supplierInvoice.getInvoiceNumber() </a> </td>
137
                            <a onclick="getInvoiceItems($supplierInvoice.getId())">$supplierInvoice.getInvoiceNumber() </a>
-
 
138
                        </td>
145
                <td>$supplierInvoice.getNumItems()</td>     
139
                        <td>$supplierInvoice.getNumItems()</td>
-
 
140
                        <td>$supplierInvoice.getTotalValue()</td>
146
                <td>$supplierInvoice.getInvoiceDate().format($dateTimeFormatter)</td>     
141
                        <td>$supplierInvoice.getInvoiceDate().format($dateTimeFormatter)</td>
147
                <td>$supplierInvoice.getReceivedFrom()</td> 
142
                        <td>$supplierInvoice.getReceivedFrom()</td>
148
                #if($grnRequestMap.get($supplierInvoice.getId()))
143
                        #if($grnRequestMap.get($supplierInvoice.getId()))
149
                <td>$grnRequestMap.get($supplierInvoice.getId()).getStatus() </td>  
144
                            <td>$grnRequestMap.get($supplierInvoice.getId()).getStatus() </td>
150
                #else
145
                        #else
151
                 <td> - </td>
146
                            <td> -</td>
152
                #end 
147
                        #end
-
 
148
                        <td>
153
                <td>          <a href="${rc.contextPath}/download-attachment?documentId=$supplierInvoice.getInvoiceDocId()" class="download">Download Doc</a>
149
                            <a href="${rc.contextPath}/download-attachment?documentId=$supplierInvoice.getInvoiceDocId()"
154
                      </td> 
150
                               class="download">Download Doc</a>
155
            
-
 
156
               </tr>
151
                        </td>
-
 
152
 
157
               #end
153
                    </tr>
158
                 
154
                    #end
-
 
155
 
159
             </tbody>
156
                </tbody>
160
           </table>
157
            </table>
161
  </div>
158
        </div>
162
  </div>
159
    </div>
163
 <div class="row">
160
    <div class="row">
164
  
161
        <p></p>
165
   <div class="col-lg-12">
162
        <div class="col-lg-12">
166
    <div class="invoiceadditemcontainer">
163
            <div class="invoiceadditemcontainer">
167
  
164
 
168
  </div>
165
            </div>
169
  </div>
166
        </div>
170
  
167
 
171
  </div>   
168
    </div>
172
 
169
 
173
 
170
 
174
	
-
 
175
</section>
171
</section>
176
172