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