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