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