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