[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"> |
---|
[727] | 30 | <td valign="top" class="groupHeader"> |
---|
| 31 | <label>Inventory Item</label> |
---|
| 32 | </td> |
---|
[182] | 33 | <td valign="top" class="value"> |
---|
[727] | 34 | </td> |
---|
| 35 | </tr> |
---|
| 36 | |
---|
| 37 | <tr class="prop"> |
---|
| 38 | <td valign="top" class="groupName"> |
---|
| 39 | <label for="name">Name:</label> |
---|
| 40 | </td> |
---|
| 41 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'name','errors')}"> |
---|
| 42 | <input type="text" |
---|
| 43 | class="description" |
---|
| 44 | maxlength="50" |
---|
| 45 | id="name" |
---|
| 46 | name="name" |
---|
| 47 | value="${fieldValue(bean:inventoryItemInstance,field:'name')}"/> |
---|
| 48 | <g:helpBalloon class="helpballoon" code="inventory.item.name" /> |
---|
| 49 | </td> |
---|
| 50 | </tr> |
---|
| 51 | |
---|
| 52 | <tr class="prop"> |
---|
| 53 | <td valign="top" class="groupName">Picture:</td> |
---|
| 54 | <td valign="top" class="value"> |
---|
[182] | 55 | <g:if test="${inventoryItemInstance.picture}" > |
---|
| 56 | <span class='gallery'> |
---|
[727] | 57 | <wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" size="${Image.Small}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" /> |
---|
[182] | 58 | </span> |
---|
| 59 | <br /> |
---|
| 60 | <g:link controller="pictureDetailed" action="edit" id="${inventoryItemInstance.picture.id}" > |
---|
| 61 | Edit Picture |
---|
| 62 | </g:link> |
---|
| 63 | </g:if> |
---|
| 64 | </td> |
---|
| 65 | </tr> |
---|
[223] | 66 | |
---|
[116] | 67 | <tr class="prop"> |
---|
[727] | 68 | <td valign="top" class="groupName"> |
---|
[116] | 69 | <label for="description">Description:</label> |
---|
| 70 | </td> |
---|
[422] | 71 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}"> |
---|
| 72 | <textarea rows="5" cols="40" name="description">${fieldValue(bean:inventoryItemInstance, field:'description')}</textarea> |
---|
[716] | 73 | <g:helpBalloon class="helpballoon" code="inventory.item.description" /> |
---|
[116] | 74 | </td> |
---|
[223] | 75 | </tr> |
---|
| 76 | |
---|
[116] | 77 | <tr class="prop"> |
---|
[727] | 78 | <td valign="top" class="groupName"> |
---|
[422] | 79 | <label for="comment">Comment:</label> |
---|
| 80 | </td> |
---|
| 81 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'comment','errors')}"> |
---|
| 82 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemInstance, field:'comment')}</textarea> |
---|
[716] | 83 | <g:helpBalloon class="helpballoon" code="inventory.item.comment" /> |
---|
[422] | 84 | </td> |
---|
| 85 | </tr> |
---|
| 86 | |
---|
| 87 | <tr class="prop"> |
---|
[727] | 88 | <td valign="top" class="groupName"> |
---|
[223] | 89 | <label for="unitsInStock">In Stock:</label> |
---|
[175] | 90 | </td> |
---|
[182] | 91 | <td valign="top" class="value"> |
---|
[223] | 92 | ${inventoryItemInstance.unitsInStock} ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
[716] | 93 | <g:helpBalloon class="helpballoon" code="inventory.item.units.in.stock" /> |
---|
[175] | 94 | </td> |
---|
| 95 | </tr> |
---|
[223] | 96 | |
---|
[175] | 97 | <tr class="prop"> |
---|
[727] | 98 | <td valign="top" class="groupName"> |
---|
[223] | 99 | <label for="inventoryLocation">Location:</label> |
---|
[116] | 100 | </td> |
---|
[223] | 101 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}"> |
---|
[382] | 102 | <g:select optionKey="id" |
---|
[727] | 103 | from="${ InventoryLocation.findAllByIsActive(true).sort { p1, p2 -> p1.toString().compareToIgnoreCase(p2.toString()) } }" |
---|
[382] | 104 | name="inventoryLocation.id" |
---|
[392] | 105 | value="${inventoryItemInstance?.inventoryLocation?.id}" |
---|
| 106 | optionValue="${{it.name+ ' in ' + it.inventoryStore}}"> |
---|
[382] | 107 | </g:select> |
---|
[716] | 108 | <g:helpBalloon class="helpballoon" code="inventory.item.inventory.location" /> |
---|
[116] | 109 | </td> |
---|
[175] | 110 | </tr> |
---|
[223] | 111 | |
---|
[175] | 112 | <tr class="prop"> |
---|
[727] | 113 | <td valign="top" class="groupName"> |
---|
| 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" |
---|
| 118 | from="${InventoryGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 119 | name="inventoryGroup.id" |
---|
| 120 | value="${inventoryItemInstance?.inventoryGroup?.id}" > |
---|
| 121 | </g:select> |
---|
| 122 | <g:helpBalloon class="helpballoon" code="inventory.item.inventory.group" /> |
---|
| 123 | </td> |
---|
| 124 | </tr> |
---|
| 125 | |
---|
| 126 | <tr class="prop"> |
---|
| 127 | <td valign="top" class="groupName"> |
---|
| 128 | <label for="inventoryType">Inventory Type:</label> |
---|
| 129 | </td> |
---|
| 130 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}"> |
---|
| 131 | <g:select optionKey="id" |
---|
| 132 | from="${InventoryType.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 133 | name="inventoryType.id" |
---|
| 134 | value="${inventoryItemInstance?.inventoryType?.id}" > |
---|
| 135 | </g:select> |
---|
| 136 | <g:helpBalloon class="helpballoon" code="inventory.item.inventory.type" /> |
---|
| 137 | </td> |
---|
| 138 | </tr> |
---|
| 139 | |
---|
| 140 | <tr class="prop"> |
---|
| 141 | <td valign="top" class="groupHeader"> |
---|
| 142 | <label for="name">Reorder Details</label> |
---|
| 143 | </td> |
---|
| 144 | <td valign="top" class="value"> |
---|
| 145 | </td> |
---|
| 146 | </tr> |
---|
| 147 | |
---|
| 148 | <tr class="prop"> |
---|
| 149 | <td valign="top" class="groupName"> |
---|
[175] | 150 | <label for="isActive">Active:</label> |
---|
[116] | 151 | </td> |
---|
| 152 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isActive','errors')}"> |
---|
| 153 | <g:checkBox name="isActive" value="${inventoryItemInstance?.isActive}" ></g:checkBox> |
---|
[716] | 154 | <g:helpBalloon class="helpballoon" code="inventory.item.is.active" /> |
---|
[116] | 155 | </td> |
---|
[223] | 156 | </tr> |
---|
| 157 | |
---|
[116] | 158 | <tr class="prop"> |
---|
[727] | 159 | <td valign="top" class="groupName"> |
---|
| 160 | <label for="isObsolete">Obsolete:</label> |
---|
| 161 | </td> |
---|
| 162 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isObsolete','errors')}"> |
---|
| 163 | <g:checkBox name="isObsolete" value="${inventoryItemInstance?.isObsolete}" ></g:checkBox> |
---|
| 164 | <g:helpBalloon class="helpballoon" code="inventory.item.is.obsolete" /> |
---|
| 165 | </td> |
---|
| 166 | </tr> |
---|
| 167 | |
---|
| 168 | <tr class="prop"> |
---|
| 169 | <td valign="top" class="groupName"> |
---|
| 170 | <label for="enableReorderListing">Enable Reorder Listing:</label> |
---|
| 171 | </td> |
---|
| 172 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'enableReorderListing','errors')}"> |
---|
| 173 | <g:checkBox name="enableReorderListing" value="${inventoryItemInstance?.enableReorderListing}" ></g:checkBox> |
---|
| 174 | <g:helpBalloon class="helpballoon" code="inventory.item.enable.reorder.listing" /> |
---|
| 175 | </td> |
---|
| 176 | </tr> |
---|
| 177 | |
---|
| 178 | <tr class="prop"> |
---|
| 179 | <td valign="top" class="groupName"> |
---|
[223] | 180 | <label for="reorderPoint">Reorder Point:</label> |
---|
[116] | 181 | </td> |
---|
[223] | 182 | <td valign="top"> |
---|
| 183 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}" |
---|
| 184 | type="text" id="reorderPoint" name="reorderPoint" |
---|
| 185 | value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" /> |
---|
[716] | 186 | ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
| 187 | <g:helpBalloon class="helpballoon" code="inventory.item.reorder.point" /> |
---|
[116] | 188 | </td> |
---|
[223] | 189 | </tr> |
---|
| 190 | |
---|
[116] | 191 | <tr class="prop"> |
---|
[727] | 192 | <td valign="top" class="groupName"> |
---|
[715] | 193 | <label for="reorderQuantity">Reorder Quantity:</label> |
---|
[116] | 194 | </td> |
---|
[223] | 195 | <td valign="top"> |
---|
[715] | 196 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'reorderQuantity','errors')}" |
---|
| 197 | type="text" id="reorderQuantity" name="reorderQuantity" |
---|
| 198 | value="${fieldValue(bean:inventoryItemInstance,field:'reorderQuantity')}" /> |
---|
[223] | 199 | ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
[716] | 200 | <g:helpBalloon class="helpballoon" code="inventory.item.reorder.quantity" /> |
---|
[116] | 201 | </td> |
---|
[223] | 202 | </tr> |
---|
| 203 | |
---|
[116] | 204 | <tr class="prop"> |
---|
[727] | 205 | <td valign="top" class="groupName"> |
---|
[718] | 206 | <label for="estimatedUnitPriceAmount">Estimated Unit Price:</label> |
---|
[116] | 207 | </td> |
---|
[441] | 208 | <td valign="top" class="value"> |
---|
[405] | 209 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'estimatedUnitPriceAmount','errors')}" |
---|
| 210 | type="text" id="estimatedUnitPriceAmount" name="estimatedUnitPriceAmount" |
---|
| 211 | value="${inventoryItemInstance.estimatedUnitPriceAmount}" /> |
---|
| 212 | <g:currencySelect name="estimatedUnitPriceCurrency" |
---|
[604] | 213 | value="${inventoryItemInstance?.estimatedUnitPriceCurrency}" |
---|
| 214 | from="${grailsApplication.config.currencyList}"> |
---|
| 215 | </g:currencySelect> |
---|
[716] | 216 | <g:helpBalloon class="helpballoon" code="inventory.item.estimated.unit.price.amount" /> |
---|
[405] | 217 | </td> |
---|
| 218 | </tr> |
---|
[223] | 219 | |
---|
[116] | 220 | <tr class="prop"> |
---|
[727] | 221 | <td valign="top" class="groupName"> |
---|
[223] | 222 | <label for="suppliersPartNumber">Suppliers Part Number:</label> |
---|
[116] | 223 | </td> |
---|
[223] | 224 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}"> |
---|
[727] | 225 | <input type="text" id="suppliersPartNumber" maxlength="50" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/> |
---|
[716] | 226 | <g:helpBalloon class="helpballoon" code="inventory.item.suppliers.part.number" /> |
---|
[116] | 227 | </td> |
---|
[175] | 228 | </tr> |
---|
[223] | 229 | |
---|
[116] | 230 | <tr class="prop"> |
---|
[727] | 231 | <td valign="top" class="groupName"> |
---|
[435] | 232 | <label for="preferredSupplier">Preferred Supplier:</label> |
---|
[116] | 233 | </td> |
---|
[435] | 234 | <td valign="top"> |
---|
[727] | 235 | <g:select optionKey="id" |
---|
| 236 | from="${suppliers}" |
---|
| 237 | name="preferredSupplier.id" |
---|
| 238 | value="${inventoryItemInstance.preferredSupplier?.id}" |
---|
| 239 | noSelection="['null':'--None--']"> |
---|
| 240 | </g:select> |
---|
[716] | 241 | <g:helpBalloon class="helpballoon" code="inventory.item.preferred.supplier" /> |
---|
[435] | 242 | <p><g:link controller="supplierDetailed" action="create">+Add Supplier</g:link></p> |
---|
[116] | 243 | </td> |
---|
[223] | 244 | </tr> |
---|
| 245 | |
---|
[116] | 246 | <tr class="prop"> |
---|
[727] | 247 | <td valign="top" class="groupName"> |
---|
[435] | 248 | <label for="alternateSuppliers">Alternate Suppliers:</label> |
---|
| 249 | </td> |
---|
| 250 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'alternateSuppliers','errors')}"> |
---|
[716] | 251 | <g:helpBalloon class="helpballoon" code="inventory.item.alternate.suppliers" /> |
---|
[727] | 252 | <custom:checkBoxList name="alternateSuppliers" |
---|
| 253 | from="${suppliers}" |
---|
| 254 | value="${inventoryItemInstance?.alternateSuppliers?.collect{it.id}}" |
---|
| 255 | optionKey="id" |
---|
| 256 | linkController="supplierDetailed" |
---|
| 257 | linkAction="show"/> |
---|
| 258 | <g:link controller="supplierDetailed" action="create">+Add Supplier</g:link> |
---|
[435] | 259 | </td> |
---|
| 260 | </tr> |
---|
| 261 | |
---|
| 262 | <tr class="prop"> |
---|
[727] | 263 | <td valign="top" class="groupHeader"> |
---|
| 264 | <label for="name">Spare For</label> |
---|
[116] | 265 | </td> |
---|
[727] | 266 | <td valign="top" class="value"> |
---|
[116] | 267 | </td> |
---|
[175] | 268 | </tr> |
---|
[223] | 269 | |
---|
[116] | 270 | <tr class="prop"> |
---|
[727] | 271 | <td valign="top" class="groupName"> |
---|
| 272 | <label for="spareFor">Assets:</label> |
---|
[116] | 273 | </td> |
---|
[727] | 274 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'spareFor','errors')}"> |
---|
| 275 | <g:helpBalloon class="helpballoon" code="inventory.item.spare.for" /> |
---|
| 276 | <custom:checkBoxList name="spareFor" |
---|
| 277 | from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 278 | value="${inventoryItemInstance?.spareFor?.collect{it.id}}" |
---|
| 279 | optionKey="id" |
---|
| 280 | sortBy="name" |
---|
| 281 | linkController="assetDetailed" |
---|
| 282 | linkAction="show"/> |
---|
| 283 | <g:link controller="assetDetailed" action="create">+Add Asset</g:link> |
---|
[223] | 284 | </td> |
---|
| 285 | </tr> |
---|
[116] | 286 | |
---|
| 287 | </tbody> |
---|
| 288 | </table> |
---|
| 289 | </div> |
---|
| 290 | <div class="buttons"> |
---|
| 291 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
[223] | 292 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[116] | 293 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 294 | </div> |
---|
| 295 | </g:form> |
---|
| 296 | </div> |
---|
| 297 | </body> |
---|
| 298 | </html> |
---|