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