Subversion Repositories SmartDukaan

Rev

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

Rev 32192 Rev 32256
Line 7... Line 7...
7
	    					<th>Po Id</th>
7
	    					<th>Po Id</th>
8
	    					<th>Item Id </th>
8
	    					<th>Item Id </th>
9
	    					<th>Item</th>
9
	    					<th>Item</th>
10
	    					<th>Type</th>
10
	    					<th>Type</th>
11
	    					<th>Qty </th>
11
	    					<th>Qty </th>
-
 
12
	    					<th>Excess Qty </th>
-
 
13
	    					<th>Price Mismatch</th>
12
	    					<th>Issue</th>
14
	    					<th>Issues</th>
13
	    				    <th>Imeis</th>
15
	    				    <th>Imeis</th>
14
	    								
16
	    								
15
	    								
17
	    								
16
	    				</tr>
18
	    				</tr>
17
	    			</thead>
19
	    			</thead>
Line 26... Line 28...
26
						<td class="itemType">Serialized</td>
28
						<td class="itemType">Serialized</td>
27
						#else
29
						#else
28
						<td class="itemType">Non Serialized</td>
30
						<td class="itemType">Non Serialized</td>
29
						#end
31
						#end
30
						<td class="qty"> $invoicePurchase.getQty() </td>
32
						<td class="qty"> $invoicePurchase.getQty() </td>
-
 
33
						
-
 
34
					   <td class="excessQty"> $invoicePurchase.getExcessQty() </td>
-
 
35
					   #if($invoicePurchase.getPriceMismatch())
-
 
36
					   <td class="priceMismatch"> $invoicePurchase.getPriceMismatch() </td>
-
 
37
					   #else
-
 
38
					   
-
 
39
					    <td>-</td>
-
 
40
					
-
 
41
					   #end
31
						#if($invoicePurchase.getIssue())
42
						#if(!$invoicePurchase.getIssues().isEmpty())
32
						<td> $invoicePurchase.getIssue()</td> 
43
						<td> $invoicePurchase.getIssues()</td> 
33
						#else
44
						#else
34
							<td>Validated</td> 
45
							<td>Validated</td> 
35
					
46
					
36
						#end
47
						#end
37
						#if($invoicePurchaseModel.isValidate() && $invoicePurchase.isSerialized())
48
						#if($invoicePurchaseModel.isValidate() && $invoicePurchase.isSerialized())
38
						 <td>   <div> <input type="text" class="imeis-to-grn" placeholder=""> </div></td>
49
						 <td> <input type="text" class="imeis-to-grn" placeholder=""> </td>
-
 
50
						#else
-
 
51
						<td> - </td>
-
 
52
						#end
-
 
53
						
-
 
54
					    #if($invoicePurchaseModel.isValidate() && $invoicePurchase.isSerialized() && $invoicePurchase.getExcessQty() > 0)
-
 
55
						 <td>  <input type="text" class="imeis-to-grn-return" placeholder=""> </td>
39
						#else
56
						#else
40
						<td> - </td>
57
						<td> - </td>
41
						#end
58
						#end
42
					 </tr> 
59
					 </tr> 
43
				    			  
60
				    			  
Line 50... Line 67...
50
	    	</div>
67
	    	</div>
51
	    </div>
68
	    </div>
52
	    
69
	    
53
	    <div class="row"> 
70
	    <div class="row"> 
54
	    
71
	    
-
 
72
	    #if($invoicePurchaseModel.getStatus() == "pending")
-
 
73
	    
-
 
74
	       <div class="col-lg-2 form-group">
-
 
75
	         	<input class="form-control btn btn-primary"   type="button" value="Grn">	
-
 
76
			</div>
-
 
77
	    
-
 
78
	    #else
55
	    	#if($invoicePurchaseModel.isValidate())
79
	    	#if($invoicePurchaseModel.isValidate())
56
      
80
      
57
	         <div class="col-lg-2 form-group">
81
	         <div class="col-lg-2 form-group">
58
	         	<input class="form-control btn btn-primary purchaseGrn" data-invoiceid = "$invoicePurchaseModel.getInvoiceId()"  type="button" value="Grn">	
82
	         	<input class="form-control btn btn-primary purchaseGrn" data-invoiceid = "$invoicePurchaseModel.getInvoiceId()"  type="button" value="Grn">	
59
			</div>
83
			</div>
60
			
84
			
-
 
85
			
-
 
86
			#else
-
 
87
			
-
 
88
			   <div class="col-lg-2 form-group">
-
 
89
	         	<input class="form-control btn btn-primary grnRequest" data-invoiceid = "$invoicePurchaseModel.getInvoiceId()"  type="button" value="Raise Grn Request">	
-
 
90
			</div>
-
 
91
			
-
 
92
			
61
			#end
93
			#end
-
 
94
	
-
 
95
	 #end
62
			
96
			
63
			
97
			
64
    </div>	
98
    </div>	
65
    
99
    
66
    
100
    
Line 72... Line 106...
72
		
106
		
73
		var qty = $(this).find(".qty").text();
107
		var qty = $(this).find(".qty").text();
74
		
108
		
75
		imeisToValidate = [];
109
		imeisToValidate = [];
76
        
110
        
-
 
111
        
77
        let imeiInputElem = $(".imeis-to-grn");
112
		let imeiInputElem = $(this).find(".imeis-to-grn");
78
        imeiInputElem.tagsinput({
113
		     imeiInputElem.tagsinput({
79
            maxTags:qty,
114
            maxTags:qty,
80
            trimValue: true,
115
            trimValue: true,
81
            allowDuplicates: false,
116
            allowDuplicates: false,
82
            confirmKeys: [13, 44, 188, 32],
117
            confirmKeys: [13, 44, 188, 32],
83
            delimiterRegex: ',',
118
            delimiterRegex: ',',
Line 101... Line 136...
101
            }
136
            }
102
        });
137
        });
103
		
138
		
104
		});
139
		});
105
        
140
        
-
 
141
   $("#invoice-purchase-validate > tbody > tr").each(function() {
106
        
142
	  
-
 
143
     var excessQty = $(this).find(".excessQty").text();
-
 
144
 
-
 
145
 
-
 
146
 
-
 
147
		imeisToValidate = [];
-
 
148
 
-
 
149
		let imeiInputElem = $(this).find(".imeis-to-grn-return");
-
 
150
		imeiInputElem.tagsinput({
-
 
151
			maxTags: excessQty,
-
 
152
			trimValue: true,
-
 
153
			allowDuplicates: false,
-
 
154
			confirmKeys: [13, 44, 188, 32],
-
 
155
			delimiterRegex: ',',
-
 
156
			trimValue: true,
-
 
157
			tagClass: function(item) {
-
 
158
				if (item.valid == null) return 'label label-primary';
-
 
159
				if (item.valid) {
-
 
160
					return 'label label-success';
-
 
161
				} else {
-
 
162
					return 'label label-danger';
-
 
163
				}
-
 
164
			},
-
 
165
		});
-
 
166
 
-
 
167
 
-
 
168
		imeiInputElem.on('beforeItemAdd', (event) => {
-
 
169
			if (event.item.indexOf(' ') > 0) {
-
 
170
				event.cancel = true;
-
 
171
				let strItem = event.item.replaceAll(' ', '');
-
 
172
				imeiInputElem.tagsinput('add', strItem);
-
 
173
			}
107
     
174
		});
-
 
175
		console.log(imeiInputElem);
-
 
176
 
-
 
177
 
-
 
178
		console.log(imeisToValidate);
108
 
179
 
109
     
180
     });
110
 
181
 
111
    });
182
    });
112
 
183
 
113
</script>
184
</script>
114
185