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>Edit InventoryItem</title> |
---|
8 | <nav:resources override="true"/> |
---|
9 | <g:render template="/shared/pictureHead" /> |
---|
10 | </head> |
---|
11 | <body> |
---|
12 | <div class="nav"> |
---|
13 | <nav:renderSubItems group="nav"/> |
---|
14 | </div> |
---|
15 | <div class="body"> |
---|
16 | <g:render template="/shared/messages" /> |
---|
17 | <g:hasErrors bean="${inventoryItemInstance}"> |
---|
18 | <div class="errors"> |
---|
19 | <g:renderErrors bean="${inventoryItemInstance}" as="list" /> |
---|
20 | </div> |
---|
21 | </g:hasErrors> |
---|
22 | <g:form method="post" > |
---|
23 | <input type="hidden" name="id" value="${inventoryItemInstance?.id}" /> |
---|
24 | <input type="hidden" name="version" value="${inventoryItemInstance?.version}" /> |
---|
25 | <div class="dialog"> |
---|
26 | <table> |
---|
27 | <tbody> |
---|
28 | |
---|
29 | <tr class="prop"> |
---|
30 | <td valign="top" class="groupHeader"> |
---|
31 | <label>Inventory Item</label> |
---|
32 | </td> |
---|
33 | <td valign="top" class="value"> |
---|
34 | </td> |
---|
35 | </tr> |
---|
36 | |
---|
37 | <tr class="prop"> |
---|
38 | <td valign="top" class="groupName"> |
---|
39 | <label for="name">Name:</label> |
---|
40 | </td> |
---|
41 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'name','errors')}"> |
---|
42 | <input type="text" |
---|
43 | class="description" |
---|
44 | maxlength="50" |
---|
45 | id="name" |
---|
46 | name="name" |
---|
47 | value="${fieldValue(bean:inventoryItemInstance,field:'name')}"/> |
---|
48 | <g:helpBalloon class="helpballoon" code="inventory.item.name" /> |
---|
49 | </td> |
---|
50 | </tr> |
---|
51 | |
---|
52 | <tr class="prop"> |
---|
53 | <td valign="top" class="groupName">Picture:</td> |
---|
54 | <td valign="top" class="value"> |
---|
55 | <g:if test="${inventoryItemInstance.picture}" > |
---|
56 | <span class='gallery'> |
---|
57 | <wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" size="${Image.Small}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" /> |
---|
58 | </span> |
---|
59 | <br /> |
---|
60 | <g:link controller="pictureDetailed" action="edit" id="${inventoryItemInstance.picture.id}" > |
---|
61 | Edit Picture |
---|
62 | </g:link> |
---|
63 | </g:if> |
---|
64 | </td> |
---|
65 | </tr> |
---|
66 | |
---|
67 | <tr class="prop"> |
---|
68 | <td valign="top" class="groupName"> |
---|
69 | <label for="description">Description:</label> |
---|
70 | </td> |
---|
71 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}"> |
---|
72 | <textarea rows="5" cols="40" name="description">${fieldValue(bean:inventoryItemInstance, field:'description')}</textarea> |
---|
73 | <g:helpBalloon class="helpballoon" code="inventory.item.description" /> |
---|
74 | </td> |
---|
75 | </tr> |
---|
76 | |
---|
77 | <tr class="prop"> |
---|
78 | <td valign="top" class="groupName"> |
---|
79 | <label for="comment">Comment:</label> |
---|
80 | </td> |
---|
81 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'comment','errors')}"> |
---|
82 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemInstance, field:'comment')}</textarea> |
---|
83 | <g:helpBalloon class="helpballoon" code="inventory.item.comment" /> |
---|
84 | </td> |
---|
85 | </tr> |
---|
86 | |
---|
87 | <tr class="prop"> |
---|
88 | <td valign="top" class="groupName"> |
---|
89 | <label for="unitsInStock">In Stock:</label> |
---|
90 | </td> |
---|
91 | <td valign="top" class="value"> |
---|
92 | ${inventoryItemInstance.unitsInStock} ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
93 | <g:helpBalloon class="helpballoon" code="inventory.item.units.in.stock" /> |
---|
94 | </td> |
---|
95 | </tr> |
---|
96 | |
---|
97 | <tr class="prop"> |
---|
98 | <td valign="top" class="groupName"> |
---|
99 | <label for="inventoryLocation">Location:</label> |
---|
100 | </td> |
---|
101 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}"> |
---|
102 | <g:select optionKey="id" |
---|
103 | from="${ InventoryLocation.findAllByIsActive(true).sort { p1, p2 -> p1.toString().compareToIgnoreCase(p2.toString()) } }" |
---|
104 | name="inventoryLocation.id" |
---|
105 | value="${inventoryItemInstance?.inventoryLocation?.id}" |
---|
106 | optionValue="${{it.name+ ' in ' + it.inventoryStore}}"> |
---|
107 | </g:select> |
---|
108 | <g:helpBalloon class="helpballoon" code="inventory.item.inventory.location" /> |
---|
109 | </td> |
---|
110 | </tr> |
---|
111 | |
---|
112 | <tr class="prop"> |
---|
113 | <td valign="top" class="groupName"> |
---|
114 | <label for="inventoryGroup">Inventory Group:</label> |
---|
115 | </td> |
---|
116 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryGroup','errors')}"> |
---|
117 | <g:select optionKey="id" |
---|
118 | from="${InventoryGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
119 | name="inventoryGroup.id" |
---|
120 | value="${inventoryItemInstance?.inventoryGroup?.id}" > |
---|
121 | </g:select> |
---|
122 | <g:helpBalloon class="helpballoon" code="inventory.item.inventory.group" /> |
---|
123 | </td> |
---|
124 | </tr> |
---|
125 | |
---|
126 | <tr class="prop"> |
---|
127 | <td valign="top" class="groupName"> |
---|
128 | <label for="inventoryType">Inventory Type:</label> |
---|
129 | </td> |
---|
130 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}"> |
---|
131 | <g:select optionKey="id" |
---|
132 | from="${InventoryType.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
133 | name="inventoryType.id" |
---|
134 | value="${inventoryItemInstance?.inventoryType?.id}" > |
---|
135 | </g:select> |
---|
136 | <g:helpBalloon class="helpballoon" code="inventory.item.inventory.type" /> |
---|
137 | </td> |
---|
138 | </tr> |
---|
139 | |
---|
140 | <tr class="prop"> |
---|
141 | <td valign="top" class="groupHeader"> |
---|
142 | <label for="name">Reorder Details</label> |
---|
143 | </td> |
---|
144 | <td valign="top" class="value"> |
---|
145 | </td> |
---|
146 | </tr> |
---|
147 | |
---|
148 | <tr class="prop"> |
---|
149 | <td valign="top" class="groupName"> |
---|
150 | <label for="isActive">Active:</label> |
---|
151 | </td> |
---|
152 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isActive','errors')}"> |
---|
153 | <g:checkBox name="isActive" value="${inventoryItemInstance?.isActive}" ></g:checkBox> |
---|
154 | <g:helpBalloon class="helpballoon" code="inventory.item.is.active" /> |
---|
155 | </td> |
---|
156 | </tr> |
---|
157 | |
---|
158 | <tr class="prop"> |
---|
159 | <td valign="top" class="groupName"> |
---|
160 | <label for="isObsolete">Obsolete:</label> |
---|
161 | </td> |
---|
162 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isObsolete','errors')}"> |
---|
163 | <g:checkBox name="isObsolete" value="${inventoryItemInstance?.isObsolete}" ></g:checkBox> |
---|
164 | <g:helpBalloon class="helpballoon" code="inventory.item.is.obsolete" /> |
---|
165 | </td> |
---|
166 | </tr> |
---|
167 | |
---|
168 | <tr class="prop"> |
---|
169 | <td valign="top" class="groupName"> |
---|
170 | <label for="enableReorderListing">Enable Reorder Listing:</label> |
---|
171 | </td> |
---|
172 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'enableReorderListing','errors')}"> |
---|
173 | <g:checkBox name="enableReorderListing" value="${inventoryItemInstance?.enableReorderListing}" ></g:checkBox> |
---|
174 | <g:helpBalloon class="helpballoon" code="inventory.item.enable.reorder.listing" /> |
---|
175 | </td> |
---|
176 | </tr> |
---|
177 | |
---|
178 | <tr class="prop"> |
---|
179 | <td valign="top" class="groupName"> |
---|
180 | <label for="reorderPoint">Reorder Point:</label> |
---|
181 | </td> |
---|
182 | <td valign="top"> |
---|
183 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}" |
---|
184 | type="text" id="reorderPoint" name="reorderPoint" |
---|
185 | value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" /> |
---|
186 | ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
187 | <g:helpBalloon class="helpballoon" code="inventory.item.reorder.point" /> |
---|
188 | </td> |
---|
189 | </tr> |
---|
190 | |
---|
191 | <tr class="prop"> |
---|
192 | <td valign="top" class="groupName"> |
---|
193 | <label for="reorderQuantity">Reorder Quantity:</label> |
---|
194 | </td> |
---|
195 | <td valign="top"> |
---|
196 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'reorderQuantity','errors')}" |
---|
197 | type="text" id="reorderQuantity" name="reorderQuantity" |
---|
198 | value="${fieldValue(bean:inventoryItemInstance,field:'reorderQuantity')}" /> |
---|
199 | ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
200 | <g:helpBalloon class="helpballoon" code="inventory.item.reorder.quantity" /> |
---|
201 | </td> |
---|
202 | </tr> |
---|
203 | |
---|
204 | <tr class="prop"> |
---|
205 | <td valign="top" class="groupName"> |
---|
206 | <label for="estimatedUnitPriceAmount">Estimated Unit Price:</label> |
---|
207 | </td> |
---|
208 | <td valign="top" class="value"> |
---|
209 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'estimatedUnitPriceAmount','errors')}" |
---|
210 | type="text" id="estimatedUnitPriceAmount" name="estimatedUnitPriceAmount" |
---|
211 | value="${inventoryItemInstance.estimatedUnitPriceAmount}" /> |
---|
212 | <g:currencySelect name="estimatedUnitPriceCurrency" |
---|
213 | value="${inventoryItemInstance?.estimatedUnitPriceCurrency}" |
---|
214 | from="${grailsApplication.config.currencyList}"> |
---|
215 | </g:currencySelect> |
---|
216 | <g:helpBalloon class="helpballoon" code="inventory.item.estimated.unit.price.amount" /> |
---|
217 | </td> |
---|
218 | </tr> |
---|
219 | |
---|
220 | <tr class="prop"> |
---|
221 | <td valign="top" class="groupName"> |
---|
222 | <label for="suppliersPartNumber">Suppliers Part Number:</label> |
---|
223 | </td> |
---|
224 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}"> |
---|
225 | <input type="text" id="suppliersPartNumber" maxlength="50" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/> |
---|
226 | <g:helpBalloon class="helpballoon" code="inventory.item.suppliers.part.number" /> |
---|
227 | </td> |
---|
228 | </tr> |
---|
229 | |
---|
230 | <tr class="prop"> |
---|
231 | <td valign="top" class="groupName"> |
---|
232 | <label for="preferredSupplier">Preferred Supplier:</label> |
---|
233 | </td> |
---|
234 | <td valign="top"> |
---|
235 | <g:select optionKey="id" |
---|
236 | from="${suppliers}" |
---|
237 | name="preferredSupplier.id" |
---|
238 | value="${inventoryItemInstance.preferredSupplier?.id}" |
---|
239 | noSelection="['null':'--None--']"> |
---|
240 | </g:select> |
---|
241 | <g:helpBalloon class="helpballoon" code="inventory.item.preferred.supplier" /> |
---|
242 | <p><g:link controller="supplierDetailed" action="create">+Add Supplier</g:link></p> |
---|
243 | </td> |
---|
244 | </tr> |
---|
245 | |
---|
246 | <tr class="prop"> |
---|
247 | <td valign="top" class="groupName"> |
---|
248 | <label for="alternateSuppliers">Alternate Suppliers:</label> |
---|
249 | </td> |
---|
250 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'alternateSuppliers','errors')}"> |
---|
251 | <g:helpBalloon class="helpballoon" code="inventory.item.alternate.suppliers" /> |
---|
252 | <custom:checkBoxList name="alternateSuppliers" |
---|
253 | from="${suppliers}" |
---|
254 | value="${inventoryItemInstance?.alternateSuppliers?.collect{it.id}}" |
---|
255 | optionKey="id" |
---|
256 | linkController="supplierDetailed" |
---|
257 | linkAction="show"/> |
---|
258 | <g:link controller="supplierDetailed" action="create">+Add Supplier</g:link> |
---|
259 | </td> |
---|
260 | </tr> |
---|
261 | |
---|
262 | <tr class="prop"> |
---|
263 | <td valign="top" class="groupHeader"> |
---|
264 | <label for="name">Spare For</label> |
---|
265 | </td> |
---|
266 | <td valign="top" class="value"> |
---|
267 | </td> |
---|
268 | </tr> |
---|
269 | |
---|
270 | <tr class="prop"> |
---|
271 | <td valign="top" class="groupName"> |
---|
272 | <label for="spareFor">Assets:</label> |
---|
273 | </td> |
---|
274 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'spareFor','errors')}"> |
---|
275 | <g:helpBalloon class="helpballoon" code="inventory.item.spare.for" /> |
---|
276 | <custom:checkBoxList name="spareFor" |
---|
277 | from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
278 | value="${inventoryItemInstance?.spareFor?.collect{it.id}}" |
---|
279 | optionKey="id" |
---|
280 | sortBy="name" |
---|
281 | linkController="assetDetailed" |
---|
282 | linkAction="show"/> |
---|
283 | <g:link controller="assetDetailed" action="create">+Add Asset</g:link> |
---|
284 | </td> |
---|
285 | </tr> |
---|
286 | |
---|
287 | </tbody> |
---|
288 | </table> |
---|
289 | </div> |
---|
290 | <div class="buttons"> |
---|
291 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
292 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
293 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
294 | </div> |
---|
295 | </g:form> |
---|
296 | </div> |
---|
297 | </body> |
---|
298 | </html> |
---|