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