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 | in ${inventoryItemInstance.inventoryLocation?.inventoryStore.encodeAsHTML()} |
---|
136 | </td> |
---|
137 | </tr> |
---|
138 | |
---|
139 | <tr class="prop"> |
---|
140 | <td valign="top" class="name">Active:</td> |
---|
141 | |
---|
142 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isActive')}</td> |
---|
143 | </tr> |
---|
144 | |
---|
145 | <tr class="prop"> |
---|
146 | <td valign="top" class="name">Alternate Items:</td> |
---|
147 | |
---|
148 | <td valign="top" style="text-align:left;" class="value"> |
---|
149 | <ul> |
---|
150 | <g:each var="a" in="${inventoryItemInstance.alternateItems}"> |
---|
151 | <li><g:link controller="inventoryItemDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
152 | </g:each> |
---|
153 | </ul> |
---|
154 | </td> |
---|
155 | </tr> |
---|
156 | |
---|
157 | <tr class="prop"> |
---|
158 | <td valign="top" class="name">Spare For:</td> |
---|
159 | |
---|
160 | <td valign="top" style="text-align:left;" class="value"> |
---|
161 | <ul> |
---|
162 | <g:each var="s" in="${inventoryItemInstance.spareFor}"> |
---|
163 | <li><g:link controller="assetDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
164 | </g:each> |
---|
165 | </ul> |
---|
166 | </td> |
---|
167 | </tr> |
---|
168 | |
---|
169 | </tbody> |
---|
170 | </table> |
---|
171 | </div> |
---|
172 | <div class="buttons"> |
---|
173 | <g:form> |
---|
174 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
175 | <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> |
---|
176 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
177 | </g:form> |
---|
178 | </div> |
---|
179 | |
---|
180 | <br /> |
---|
181 | |
---|
182 | </richui:tabContent> |
---|
183 | <!-- End Inventory tab --> |
---|
184 | |
---|
185 | <!-- Start Detail tab --> |
---|
186 | <richui:tabContent> |
---|
187 | |
---|
188 | <div class="dialog"> |
---|
189 | <table> |
---|
190 | <tbody> |
---|
191 | |
---|
192 | <tr class="prop"> |
---|
193 | <td valign="top" class="name">Id:</td> |
---|
194 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'id')}</td> |
---|
195 | </tr> |
---|
196 | |
---|
197 | <tr class="prop"> |
---|
198 | <td valign="top" class="name">Obsolete:</td> |
---|
199 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isObsolete')}</td> |
---|
200 | </tr> |
---|
201 | |
---|
202 | <tr class="prop"> |
---|
203 | <td valign="top" class="name">Inventory Group:</td> |
---|
204 | <td valign="top" class="value">${inventoryItemInstance.inventoryGroup?.encodeAsHTML()}</td> |
---|
205 | </tr> |
---|
206 | |
---|
207 | <tr class="prop"> |
---|
208 | <td valign="top" class="name">Inventory Type:</td> |
---|
209 | <td valign="top" class="value">${inventoryItemInstance.inventoryType?.encodeAsHTML()}</td> |
---|
210 | </tr> |
---|
211 | |
---|
212 | <tr class="prop"> |
---|
213 | <td valign="top" class="name">Reorder Point:</td> |
---|
214 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'reorderPoint')}</td> |
---|
215 | </tr> |
---|
216 | |
---|
217 | <tr class="prop"> |
---|
218 | <td valign="top" class="name">Enable Reorder:</td> |
---|
219 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'enableReorder')}</td> |
---|
220 | </tr> |
---|
221 | |
---|
222 | <tr class="prop"> |
---|
223 | <td valign="top" class="name">Recommended Reorder Point:</td> |
---|
224 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'recommendedReorderPoint')}</td> |
---|
225 | </tr> |
---|
226 | |
---|
227 | <tr class="prop"> |
---|
228 | <td valign="top" class="name">Suppliers Part Number:</td> |
---|
229 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'suppliersPartNumber')}</td> |
---|
230 | </tr> |
---|
231 | |
---|
232 | <tr class="prop"> |
---|
233 | <td valign="top" class="name">Suppliers:</td> |
---|
234 | |
---|
235 | <td valign="top" style="text-align:left;" class="value"> |
---|
236 | <ul> |
---|
237 | <g:each var="s" in="${inventoryItemInstance.suppliers}"> |
---|
238 | <li><g:link controller="supplierDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
239 | </g:each> |
---|
240 | </ul> |
---|
241 | </td> |
---|
242 | </tr> |
---|
243 | |
---|
244 | <tr class="prop"> |
---|
245 | <td valign="top" class="name">Average Delivery Time:</td> |
---|
246 | <td valign="top" class="value"> |
---|
247 | ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryTime')} |
---|
248 | ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryPeriod')} |
---|
249 | </td> |
---|
250 | </tr> |
---|
251 | |
---|
252 | <tr class="prop"> |
---|
253 | <td valign="top" class="name">Manufacturers Part Number:</td> |
---|
254 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'manufacturersPartNumber')}</td> |
---|
255 | </tr> |
---|
256 | |
---|
257 | <tr class="prop"> |
---|
258 | <td valign="top" class="name">Manufacturers:</td> |
---|
259 | |
---|
260 | <td valign="top" style="text-align:left;" class="value"> |
---|
261 | <ul> |
---|
262 | <g:each var="m" in="${inventoryItemInstance.manufacturers}"> |
---|
263 | <li><g:link controller="manufacturerDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
264 | </g:each> |
---|
265 | </ul> |
---|
266 | </td> |
---|
267 | </tr> |
---|
268 | |
---|
269 | |
---|
270 | </tbody> |
---|
271 | </table> |
---|
272 | </div> |
---|
273 | <div class="buttons"> |
---|
274 | <g:form> |
---|
275 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
276 | <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> |
---|
277 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
278 | </g:form> |
---|
279 | </div> |
---|
280 | </richui:tabContent> |
---|
281 | <!-- End Detail tab --> |
---|
282 | |
---|
283 | <!-- Start Movement tab --> |
---|
284 | <richui:tabContent> |
---|
285 | |
---|
286 | <g:if test="${inventoryMovementList.isEmpty()}"> |
---|
287 | <br /> |
---|
288 | No Inventory Movements. |
---|
289 | <br /> |
---|
290 | <br /> |
---|
291 | |
---|
292 | <div class="buttons"> |
---|
293 | <g:form controller="inventoryMovementDetailed"> |
---|
294 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
295 | <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> |
---|
296 | </g:form> |
---|
297 | </div> |
---|
298 | |
---|
299 | </g:if> |
---|
300 | <g:else> |
---|
301 | |
---|
302 | <div class="list"> |
---|
303 | <table> |
---|
304 | <thead> |
---|
305 | <tr> |
---|
306 | <th>Quantity</th> |
---|
307 | <th>Movement Type</th> |
---|
308 | <th>Date</th> |
---|
309 | <th>Person</th> |
---|
310 | <th></th> |
---|
311 | </tr> |
---|
312 | </thead> |
---|
313 | <tbody> |
---|
314 | <g:each in="${inventoryMovementList}" status="i" var="movements"> |
---|
315 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'/> |
---|
316 | |
---|
317 | <td>${fieldValue(bean:movements, field:'quantity')}</td> |
---|
318 | <td>${fieldValue(bean:movements, field:'inventoryMovementType')}</td> |
---|
319 | <td><g:formatDate date="${movements.date}" format="EEE, dd-MMM-yyyy"/></td> |
---|
320 | <td>${fieldValue(bean:movements, field:'person')}</td> |
---|
321 | <td> |
---|
322 | <g:link controller="inventoryMovementDetailed" action="show" id="${movements.id}"> |
---|
323 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
324 | </g:link> |
---|
325 | </td> |
---|
326 | |
---|
327 | </tr> |
---|
328 | </g:each> |
---|
329 | </tbody> |
---|
330 | </table> |
---|
331 | </div> |
---|
332 | |
---|
333 | <div class="buttons"> |
---|
334 | <g:form controller="inventoryMovementDetailed"> |
---|
335 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
336 | <g:if test="${inventoryMovementListTotal > inventoryMovementListMax}"> |
---|
337 | Showing ${inventoryMovementListMax} of ${inventoryMovementListTotal} |
---|
338 | <br /> |
---|
339 | </g:if> |
---|
340 | <g:else> |
---|
341 | Total ${inventoryMovementListTotal} |
---|
342 | <br /> |
---|
343 | </g:else> |
---|
344 | <span class="button"><g:actionSubmit action="listInventoryMovements" class="table" value="List" /></span> |
---|
345 | <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> |
---|
346 | </g:form> |
---|
347 | </div> |
---|
348 | |
---|
349 | </g:else> |
---|
350 | |
---|
351 | </richui:tabContent> |
---|
352 | <!-- End Movement tab --> |
---|
353 | |
---|
354 | </richui:tabContents> |
---|
355 | </richui:tabView> |
---|
356 | |
---|
357 | |
---|
358 | </div> |
---|
359 | </body> |
---|
360 | </html> |
---|