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