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 | </head> |
---|
9 | <body> |
---|
10 | <div class="nav"> |
---|
11 | <span class="menuButton"><a class="home" href="${resource(dir:'')}">Home</a></span> |
---|
12 | <span class="menuButton"><g:link class="list" action="list">InventoryItem List</g:link></span> |
---|
13 | <span class="menuButton"><g:link class="create" action="create">New InventoryItem</g:link></span> |
---|
14 | </div> |
---|
15 | <div class="body"> |
---|
16 | <h1>Edit InventoryItem</h1> |
---|
17 | <g:if test="${flash.message}"> |
---|
18 | <div class="message">${flash.message}</div> |
---|
19 | </g:if> |
---|
20 | <g:hasErrors bean="${inventoryItemInstance}"> |
---|
21 | <div class="errors"> |
---|
22 | <g:renderErrors bean="${inventoryItemInstance}" as="list" /> |
---|
23 | </div> |
---|
24 | </g:hasErrors> |
---|
25 | <g:form method="post" > |
---|
26 | <input type="hidden" name="id" value="${inventoryItemInstance?.id}" /> |
---|
27 | <input type="hidden" name="version" value="${inventoryItemInstance?.version}" /> |
---|
28 | <div class="dialog"> |
---|
29 | <table> |
---|
30 | <tbody> |
---|
31 | |
---|
32 | <tr class="prop"> |
---|
33 | <td valign="top" class="name"> |
---|
34 | <label for="name">Name:</label> |
---|
35 | </td> |
---|
36 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'name','errors')}"> |
---|
37 | <input type="text" maxlength="75" id="name" name="name" value="${fieldValue(bean:inventoryItemInstance,field:'name')}"/> |
---|
38 | </td> |
---|
39 | </tr> |
---|
40 | |
---|
41 | <tr class="prop"> |
---|
42 | <td valign="top" class="name"> |
---|
43 | <label for="description">Description:</label> |
---|
44 | </td> |
---|
45 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}"> |
---|
46 | <input type="text" id="description" name="description" value="${fieldValue(bean:inventoryItemInstance,field:'description')}"/> |
---|
47 | </td> |
---|
48 | </tr> |
---|
49 | |
---|
50 | <tr class="prop"> |
---|
51 | <td valign="top" class="name"> |
---|
52 | <label for="reorderPoint">Reorder Point:</label> |
---|
53 | </td> |
---|
54 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}"> |
---|
55 | <input type="text" id="reorderPoint" name="reorderPoint" value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" /> |
---|
56 | </td> |
---|
57 | </tr> |
---|
58 | |
---|
59 | <tr class="prop"> |
---|
60 | <td valign="top" class="name"> |
---|
61 | <label for="enableReorder">Enable Reorder:</label> |
---|
62 | </td> |
---|
63 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'enableReorder','errors')}"> |
---|
64 | <g:checkBox name="enableReorder" value="${inventoryItemInstance?.enableReorder}" ></g:checkBox> |
---|
65 | </td> |
---|
66 | </tr> |
---|
67 | |
---|
68 | <tr class="prop"> |
---|
69 | <td valign="top" class="name"> |
---|
70 | <label for="isActive">Is Active:</label> |
---|
71 | </td> |
---|
72 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isActive','errors')}"> |
---|
73 | <g:checkBox name="isActive" value="${inventoryItemInstance?.isActive}" ></g:checkBox> |
---|
74 | </td> |
---|
75 | </tr> |
---|
76 | |
---|
77 | <tr class="prop"> |
---|
78 | <td valign="top" class="name"> |
---|
79 | <label for="isObsolete">Is Obsolete:</label> |
---|
80 | </td> |
---|
81 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isObsolete','errors')}"> |
---|
82 | <g:checkBox name="isObsolete" value="${inventoryItemInstance?.isObsolete}" ></g:checkBox> |
---|
83 | </td> |
---|
84 | </tr> |
---|
85 | |
---|
86 | <tr class="prop"> |
---|
87 | <td valign="top" class="name"> |
---|
88 | <label for="inventoryGroup">Inventory Group:</label> |
---|
89 | </td> |
---|
90 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryGroup','errors')}"> |
---|
91 | <g:select optionKey="id" from="${InventoryGroup.list()}" name="inventoryGroup.id" value="${inventoryItemInstance?.inventoryGroup?.id}" ></g:select> |
---|
92 | </td> |
---|
93 | </tr> |
---|
94 | |
---|
95 | <tr class="prop"> |
---|
96 | <td valign="top" class="name"> |
---|
97 | <label for="inventoryType">Inventory Type:</label> |
---|
98 | </td> |
---|
99 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}"> |
---|
100 | <g:select optionKey="id" from="${InventoryType.list()}" name="inventoryType.id" value="${inventoryItemInstance?.inventoryType?.id}" ></g:select> |
---|
101 | </td> |
---|
102 | </tr> |
---|
103 | |
---|
104 | <tr class="prop"> |
---|
105 | <td valign="top" class="name"> |
---|
106 | <label for="unitOfMeasure">Unit Of Measure:</label> |
---|
107 | </td> |
---|
108 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'unitOfMeasure','errors')}"> |
---|
109 | <g:select optionKey="id" from="${UnitOfMeasure.list()}" name="unitOfMeasure.id" value="${inventoryItemInstance?.unitOfMeasure?.id}" ></g:select> |
---|
110 | </td> |
---|
111 | </tr> |
---|
112 | |
---|
113 | <tr class="prop"> |
---|
114 | <td valign="top" class="name"> |
---|
115 | <label for="manufacturersPartNumber">Manufacturers Part Number:</label> |
---|
116 | </td> |
---|
117 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturersPartNumber','errors')}"> |
---|
118 | <input type="text" id="manufacturersPartNumber" name="manufacturersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'manufacturersPartNumber')}"/> |
---|
119 | </td> |
---|
120 | </tr> |
---|
121 | |
---|
122 | <tr class="prop"> |
---|
123 | <td valign="top" class="name"> |
---|
124 | <label for="suppliersPartNumber">Suppliers Part Number:</label> |
---|
125 | </td> |
---|
126 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}"> |
---|
127 | <input type="text" id="suppliersPartNumber" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/> |
---|
128 | </td> |
---|
129 | </tr> |
---|
130 | |
---|
131 | <tr class="prop"> |
---|
132 | <td valign="top" class="name"> |
---|
133 | <label for="recommendedReorderPoint">Recommended Reorder Point:</label> |
---|
134 | </td> |
---|
135 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'recommendedReorderPoint','errors')}"> |
---|
136 | <input type="text" id="recommendedReorderPoint" name="recommendedReorderPoint" value="${fieldValue(bean:inventoryItemInstance,field:'recommendedReorderPoint')}" /> |
---|
137 | </td> |
---|
138 | </tr> |
---|
139 | |
---|
140 | <tr class="prop"> |
---|
141 | <td valign="top" class="name"> |
---|
142 | <label for="averageDeliveryTime">Average Delivery Time:</label> |
---|
143 | </td> |
---|
144 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryTime','errors')}"> |
---|
145 | <input type="text" id="averageDeliveryTime" name="averageDeliveryTime" value="${fieldValue(bean:inventoryItemInstance,field:'averageDeliveryTime')}" /> |
---|
146 | </td> |
---|
147 | </tr> |
---|
148 | |
---|
149 | <tr class="prop"> |
---|
150 | <td valign="top" class="name"> |
---|
151 | <label for="alternateItems">Alternate Items:</label> |
---|
152 | </td> |
---|
153 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'alternateItems','errors')}"> |
---|
154 | <g:select name="alternateItems" |
---|
155 | from="${InventoryItem.list()}" |
---|
156 | size="5" multiple="yes" optionKey="id" |
---|
157 | value="${inventoryItemInstance?.alternateItems}" /> |
---|
158 | |
---|
159 | </td> |
---|
160 | </tr> |
---|
161 | |
---|
162 | <tr class="prop"> |
---|
163 | <td valign="top" class="name"> |
---|
164 | <label for="inventoryMovements">Inventory Movements:</label> |
---|
165 | </td> |
---|
166 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryMovements','errors')}"> |
---|
167 | |
---|
168 | <ul> |
---|
169 | <g:each var="i" in="${inventoryItemInstance?.inventoryMovements?}"> |
---|
170 | <li><g:link controller="inventoryMovement" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li> |
---|
171 | </g:each> |
---|
172 | </ul> |
---|
173 | <g:link controller="inventoryMovement" params="['inventoryItem.id':inventoryItemInstance?.id]" action="create">Add InventoryMovement</g:link> |
---|
174 | |
---|
175 | </td> |
---|
176 | </tr> |
---|
177 | |
---|
178 | <tr class="prop"> |
---|
179 | <td valign="top" class="name"> |
---|
180 | <label for="manufacturers">Manufacturers:</label> |
---|
181 | </td> |
---|
182 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturers','errors')}"> |
---|
183 | <g:select name="manufacturers" |
---|
184 | from="${Manufacturer.list()}" |
---|
185 | size="5" multiple="yes" optionKey="id" |
---|
186 | value="${inventoryItemInstance?.manufacturers}" /> |
---|
187 | |
---|
188 | </td> |
---|
189 | </tr> |
---|
190 | |
---|
191 | <tr class="prop"> |
---|
192 | <td valign="top" class="name"> |
---|
193 | <label for="spareFor">Spare For:</label> |
---|
194 | </td> |
---|
195 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'spareFor','errors')}"> |
---|
196 | <g:select name="spareFor" |
---|
197 | from="${Asset.list()}" |
---|
198 | size="5" multiple="yes" optionKey="id" |
---|
199 | value="${inventoryItemInstance?.spareFor}" /> |
---|
200 | |
---|
201 | </td> |
---|
202 | </tr> |
---|
203 | |
---|
204 | <tr class="prop"> |
---|
205 | <td valign="top" class="name"> |
---|
206 | <label for="storedItems">Stored Items:</label> |
---|
207 | </td> |
---|
208 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'storedItems','errors')}"> |
---|
209 | |
---|
210 | <ul> |
---|
211 | <g:each var="s" in="${inventoryItemInstance?.storedItems?}"> |
---|
212 | <li><g:link controller="storedItem" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
213 | </g:each> |
---|
214 | </ul> |
---|
215 | <g:link controller="storedItem" params="['inventoryItem.id':inventoryItemInstance?.id]" action="create">Add StoredItem</g:link> |
---|
216 | |
---|
217 | </td> |
---|
218 | </tr> |
---|
219 | |
---|
220 | <tr class="prop"> |
---|
221 | <td valign="top" class="name"> |
---|
222 | <label for="suppliers">Suppliers:</label> |
---|
223 | </td> |
---|
224 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliers','errors')}"> |
---|
225 | <g:select name="suppliers" |
---|
226 | from="${Supplier.list()}" |
---|
227 | size="5" multiple="yes" optionKey="id" |
---|
228 | value="${inventoryItemInstance?.suppliers}" /> |
---|
229 | |
---|
230 | </td> |
---|
231 | </tr> |
---|
232 | |
---|
233 | </tbody> |
---|
234 | </table> |
---|
235 | </div> |
---|
236 | <div class="buttons"> |
---|
237 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
238 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
239 | </div> |
---|
240 | </g:form> |
---|
241 | </div> |
---|
242 | </body> |
---|
243 | </html> |
---|