1 | |
---|
2 | |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
6 | <meta name="layout" content="main" /> |
---|
7 | <title>Show InventoryItem</title> |
---|
8 | <nav:resources override="true"/> |
---|
9 | <resource:tabView skin="tabviewCustom" /> |
---|
10 | <g:render template="/shared/pictureHead" /> |
---|
11 | </head> |
---|
12 | <body> |
---|
13 | <div class="nav"> |
---|
14 | <nav:renderSubItems group="nav"/> |
---|
15 | </div> |
---|
16 | <div class="body"> |
---|
17 | <g:hasErrors bean="${inventoryMovementInstance}"> |
---|
18 | <div class="errors"> |
---|
19 | <g:renderErrors bean="${inventoryMovementInstance}" as="list" /> |
---|
20 | </div> |
---|
21 | </g:hasErrors> |
---|
22 | <g:if test="${flash.message}"> |
---|
23 | <div class="message">${flash.message}</div> |
---|
24 | </g:if> |
---|
25 | |
---|
26 | <g:hasErrors bean="${inventoryItemInstance}"> |
---|
27 | <div class="errors"> |
---|
28 | <g:renderErrors bean="${inventoryItemInstance}" as="list" /> |
---|
29 | </div> |
---|
30 | </g:hasErrors> |
---|
31 | |
---|
32 | <richui:tabView id="tabView"> |
---|
33 | |
---|
34 | <richui:tabLabels> |
---|
35 | <richui:tabLabel selected="${showTab.inventory}" title="Inventory Item" /> |
---|
36 | <richui:tabLabel selected="${showTab.detail}" title="Detail" /> |
---|
37 | <richui:tabLabel selected="${showTab.movement}" title="Movement" /> |
---|
38 | </richui:tabLabels> |
---|
39 | |
---|
40 | <richui:tabContents> |
---|
41 | |
---|
42 | <!-- Start Inventory tab --> |
---|
43 | <richui:tabContent> |
---|
44 | |
---|
45 | <g:if test="${inventoryMovementInstance}" > |
---|
46 | |
---|
47 | <g:form controller="inventoryItemDetailed" method="post" > |
---|
48 | <div class="dialog"> |
---|
49 | <table> |
---|
50 | <tbody> |
---|
51 | <g:hiddenField name="task.id" value="${inventoryMovementInstance.task.id}"/> |
---|
52 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}"/> |
---|
53 | <tr class="prop"> |
---|
54 | <td valign="top" class="name">Use on task:</td> |
---|
55 | <td valign="top" class="value"> |
---|
56 | <g:link controller="taskDetailed" action="show" id="${inventoryMovementInstance.task.id}" > |
---|
57 | ${Task.get(inventoryMovementInstance.task.id).encodeAsHTML()} |
---|
58 | </g:link> |
---|
59 | </td> |
---|
60 | </tr> |
---|
61 | |
---|
62 | <tr class="prop"> |
---|
63 | <td valign="top" class="name"> |
---|
64 | <label for="quantity">Quantity:</label> |
---|
65 | </td> |
---|
66 | <td valign="top"> |
---|
67 | <input class="medium ${hasErrors(bean:inventoryMovementInstance,field:'quantity','errors')}" |
---|
68 | type="text" id="quantity" name="quantity" |
---|
69 | value="${fieldValue(bean:inventoryMovementInstance,field:'quantity')}"/> |
---|
70 | ${inventoryItemInstance.unitOfMeasure?.encodeAsHTML()} |
---|
71 | |
---|
72 | <span class="buttons"> |
---|
73 | <g:actionSubmit action="useInventoryItem" class="save" value="${InventoryMovementType.get(1)}" /> |
---|
74 | </span> |
---|
75 | |
---|
76 | </td> |
---|
77 | </tr> |
---|
78 | |
---|
79 | </tbody> |
---|
80 | </table> |
---|
81 | </div> |
---|
82 | </g:form> |
---|
83 | |
---|
84 | <br /> |
---|
85 | |
---|
86 | </g:if> |
---|
87 | |
---|
88 | <div class="dialog"> |
---|
89 | <table> |
---|
90 | <tbody> |
---|
91 | |
---|
92 | <tr class="prop"> |
---|
93 | <td valign="top" class="name">Picture:</td> |
---|
94 | <td valign="top" class="value"> |
---|
95 | <g:if test="${inventoryItemInstance.picture}" > |
---|
96 | <span class='gallery'><wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" size="${Image.Medium}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" /></span> |
---|
97 | </g:if> |
---|
98 | <g:else> |
---|
99 | <g:link controller="pictureDetailed" |
---|
100 | params="['inventoryItem.id':inventoryItemInstance.id]" |
---|
101 | action="create"> |
---|
102 | Add Picture |
---|
103 | </g:link> |
---|
104 | </g:else> |
---|
105 | </td> |
---|
106 | </tr> |
---|
107 | |
---|
108 | <tr class="prop"> |
---|
109 | <td valign="top" class="name">Name:</td> |
---|
110 | |
---|
111 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'name')}</td> |
---|
112 | </tr> |
---|
113 | |
---|
114 | <tr class="prop"> |
---|
115 | <td valign="top" class="name">Description:</td> |
---|
116 | |
---|
117 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'description')}</td> |
---|
118 | </tr> |
---|
119 | |
---|
120 | <tr class="prop"> |
---|
121 | <td valign="top" class="name">In Stock:</td> |
---|
122 | |
---|
123 | <td valign="top" class="value"> |
---|
124 | ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')} ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
125 | </td> |
---|
126 | </tr> |
---|
127 | |
---|
128 | <tr class="prop"> |
---|
129 | <td valign="top" class="name">Location:</td> |
---|
130 | |
---|
131 | <td valign="top" class="value"> |
---|
132 | <g:link controller="inventoryLocationDetailed" action="show" id="${inventoryItemInstance.inventoryLocation?.id}"> |
---|
133 | ${inventoryItemInstance.inventoryLocation?.encodeAsHTML()} |
---|
134 | </g:link> |
---|
135 | </td> |
---|
136 | </tr> |
---|
137 | |
---|
138 | <tr class="prop"> |
---|
139 | <td valign="top" class="name">Active:</td> |
---|
140 | |
---|
141 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isActive')}</td> |
---|
142 | </tr> |
---|
143 | |
---|
144 | <tr class="prop"> |
---|
145 | <td valign="top" class="name">Alternate Items:</td> |
---|
146 | |
---|
147 | <td valign="top" style="text-align:left;" class="value"> |
---|
148 | <ul> |
---|
149 | <g:each var="a" in="${inventoryItemInstance.alternateItems}"> |
---|
150 | <li><g:link controller="inventoryItemDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
151 | </g:each> |
---|
152 | </ul> |
---|
153 | </td> |
---|
154 | </tr> |
---|
155 | |
---|
156 | <tr class="prop"> |
---|
157 | <td valign="top" class="name">Spare For:</td> |
---|
158 | |
---|
159 | <td valign="top" style="text-align:left;" class="value"> |
---|
160 | <ul> |
---|
161 | <g:each var="s" in="${ inventoryItemInstance.spareFor.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
162 | <li><g:link controller="assetDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
163 | </g:each> |
---|
164 | </ul> |
---|
165 | </td> |
---|
166 | </tr> |
---|
167 | |
---|
168 | </tbody> |
---|
169 | </table> |
---|
170 | </div> |
---|
171 | <div class="buttons"> |
---|
172 | <g:form> |
---|
173 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
174 | <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> |
---|
175 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
176 | </g:form> |
---|
177 | </div> |
---|
178 | |
---|
179 | <br /> |
---|
180 | |
---|
181 | </richui:tabContent> |
---|
182 | <!-- End Inventory tab --> |
---|
183 | |
---|
184 | <!-- Start Detail tab --> |
---|
185 | <richui:tabContent> |
---|
186 | |
---|
187 | <div class="dialog"> |
---|
188 | <table> |
---|
189 | <tbody> |
---|
190 | |
---|
191 | <tr class="prop"> |
---|
192 | <td valign="top" class="name">Id:</td> |
---|
193 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'id')}</td> |
---|
194 | </tr> |
---|
195 | |
---|
196 | <tr class="prop"> |
---|
197 | <td valign="top" class="name">Obsolete:</td> |
---|
198 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isObsolete')}</td> |
---|
199 | </tr> |
---|
200 | |
---|
201 | <tr class="prop"> |
---|
202 | <td valign="top" class="name">Inventory Group:</td> |
---|
203 | <td valign="top" class="value">${inventoryItemInstance.inventoryGroup?.encodeAsHTML()}</td> |
---|
204 | </tr> |
---|
205 | |
---|
206 | <tr class="prop"> |
---|
207 | <td valign="top" class="name">Inventory Type:</td> |
---|
208 | <td valign="top" class="value">${inventoryItemInstance.inventoryType?.encodeAsHTML()}</td> |
---|
209 | </tr> |
---|
210 | |
---|
211 | <tr class="prop"> |
---|
212 | <td valign="top" class="name">Reorder Point:</td> |
---|
213 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'reorderPoint')}</td> |
---|
214 | </tr> |
---|
215 | |
---|
216 | <tr class="prop"> |
---|
217 | <td valign="top" class="name">Enable Reorder:</td> |
---|
218 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'enableReorder')}</td> |
---|
219 | </tr> |
---|
220 | |
---|
221 | <tr class="prop"> |
---|
222 | <td valign="top" class="name">Recommended Reorder Point:</td> |
---|
223 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'recommendedReorderPoint')}</td> |
---|
224 | </tr> |
---|
225 | |
---|
226 | <tr class="prop"> |
---|
227 | <td valign="top" class="name">Suppliers Part Number:</td> |
---|
228 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'suppliersPartNumber')}</td> |
---|
229 | </tr> |
---|
230 | |
---|
231 | <tr class="prop"> |
---|
232 | <td valign="top" class="name">Suppliers:</td> |
---|
233 | |
---|
234 | <td valign="top" style="text-align:left;" class="value"> |
---|
235 | <ul> |
---|
236 | <g:each var="s" in="${ inventoryItemInstance.suppliers.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
237 | <li><g:link controller="supplierDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
238 | </g:each> |
---|
239 | </ul> |
---|
240 | </td> |
---|
241 | </tr> |
---|
242 | |
---|
243 | <tr class="prop"> |
---|
244 | <td valign="top" class="name">Average Delivery Time:</td> |
---|
245 | <td valign="top" class="value"> |
---|
246 | ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryTime')} |
---|
247 | ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryPeriod')} |
---|
248 | </td> |
---|
249 | </tr> |
---|
250 | |
---|
251 | <tr class="prop"> |
---|
252 | <td valign="top" class="name">Manufacturers Part Number:</td> |
---|
253 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'manufacturersPartNumber')}</td> |
---|
254 | </tr> |
---|
255 | |
---|
256 | <tr class="prop"> |
---|
257 | <td valign="top" class="name">Manufacturers:</td> |
---|
258 | |
---|
259 | <td valign="top" style="text-align:left;" class="value"> |
---|
260 | <ul> |
---|
261 | <g:each var="m" in="${ inventoryItemInstance.manufacturers.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
262 | <li><g:link controller="manufacturerDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
263 | </g:each> |
---|
264 | </ul> |
---|
265 | </td> |
---|
266 | </tr> |
---|
267 | |
---|
268 | |
---|
269 | </tbody> |
---|
270 | </table> |
---|
271 | </div> |
---|
272 | <div class="buttons"> |
---|
273 | <g:form> |
---|
274 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
275 | <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> |
---|
276 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
277 | </g:form> |
---|
278 | </div> |
---|
279 | </richui:tabContent> |
---|
280 | <!-- End Detail tab --> |
---|
281 | |
---|
282 | <!-- Start Movement tab --> |
---|
283 | <richui:tabContent> |
---|
284 | |
---|
285 | <g:if test="${inventoryMovementList.isEmpty()}"> |
---|
286 | <br /> |
---|
287 | No Inventory Movements. |
---|
288 | <br /> |
---|
289 | <br /> |
---|
290 | |
---|
291 | <div class="buttons"> |
---|
292 | <g:form controller="inventoryMovementDetailed"> |
---|
293 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
294 | <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> |
---|
295 | </g:form> |
---|
296 | </div> |
---|
297 | |
---|
298 | </g:if> |
---|
299 | <g:else> |
---|
300 | |
---|
301 | <div class="list"> |
---|
302 | <table> |
---|
303 | <thead> |
---|
304 | <tr> |
---|
305 | <th>Quantity</th> |
---|
306 | <th>Movement Type</th> |
---|
307 | <th>Date</th> |
---|
308 | <th>Person</th> |
---|
309 | <th></th> |
---|
310 | </tr> |
---|
311 | </thead> |
---|
312 | <tbody> |
---|
313 | <g:each in="${inventoryMovementList}" status="i" var="movements"> |
---|
314 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'/> |
---|
315 | |
---|
316 | <td>${fieldValue(bean:movements, field:'quantity')}</td> |
---|
317 | <td>${fieldValue(bean:movements, field:'inventoryMovementType')}</td> |
---|
318 | <td><g:formatDate date="${movements.date}" format="EEE, dd-MMM-yyyy"/></td> |
---|
319 | <td>${fieldValue(bean:movements, field:'person')}</td> |
---|
320 | <td> |
---|
321 | <g:link controller="inventoryMovementDetailed" action="show" id="${movements.id}"> |
---|
322 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
323 | </g:link> |
---|
324 | </td> |
---|
325 | |
---|
326 | </tr> |
---|
327 | </g:each> |
---|
328 | </tbody> |
---|
329 | </table> |
---|
330 | </div> |
---|
331 | |
---|
332 | <div class="buttons"> |
---|
333 | <g:form controller="inventoryMovementDetailed"> |
---|
334 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
335 | <g:if test="${inventoryMovementListTotal > inventoryMovementListMax}"> |
---|
336 | Showing ${inventoryMovementListMax} of ${inventoryMovementListTotal} |
---|
337 | <br /> |
---|
338 | </g:if> |
---|
339 | <g:else> |
---|
340 | Total ${inventoryMovementListTotal} |
---|
341 | <br /> |
---|
342 | </g:else> |
---|
343 | <span class="button"><g:actionSubmit action="listInventoryMovements" class="table" value="List" /></span> |
---|
344 | <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> |
---|
345 | </g:form> |
---|
346 | </div> |
---|
347 | |
---|
348 | </g:else> |
---|
349 | |
---|
350 | </richui:tabContent> |
---|
351 | <!-- End Movement tab --> |
---|
352 | |
---|
353 | </richui:tabContents> |
---|
354 | </richui:tabView> |
---|
355 | |
---|
356 | |
---|
357 | </div> |
---|
358 | </body> |
---|
359 | </html> |
---|