[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" |
---|
[392] | 85 | value="${inventoryItemInstance?.inventoryLocation?.id}" |
---|
| 86 | optionValue="${{it.name+ ' in ' + it.inventoryStore}}"> |
---|
[382] | 87 | </g:select> |
---|
[116] | 88 | </td> |
---|
[175] | 89 | </tr> |
---|
[223] | 90 | |
---|
[175] | 91 | <tr class="prop"> |
---|
| 92 | <td valign="top" class="name"> |
---|
| 93 | <label for="isActive">Active:</label> |
---|
[116] | 94 | </td> |
---|
| 95 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isActive','errors')}"> |
---|
| 96 | <g:checkBox name="isActive" value="${inventoryItemInstance?.isActive}" ></g:checkBox> |
---|
| 97 | </td> |
---|
[223] | 98 | </tr> |
---|
| 99 | |
---|
[116] | 100 | <tr class="prop"> |
---|
| 101 | <td valign="top" class="name"> |
---|
[223] | 102 | <label for="reorderPoint">Reorder Point:</label> |
---|
[116] | 103 | </td> |
---|
[223] | 104 | <td valign="top"> |
---|
| 105 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}" |
---|
| 106 | type="text" id="reorderPoint" name="reorderPoint" |
---|
| 107 | value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" /> |
---|
| 108 | ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
[116] | 109 | </td> |
---|
[223] | 110 | </tr> |
---|
| 111 | |
---|
[116] | 112 | <tr class="prop"> |
---|
| 113 | <td valign="top" class="name"> |
---|
[223] | 114 | <label for="recommendedReorderPoint">Recommended Reorder Point:</label> |
---|
[116] | 115 | </td> |
---|
[223] | 116 | <td valign="top"> |
---|
| 117 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'recommendedReorderPoint','errors')}" |
---|
| 118 | type="text" id="recommendedReorderPoint" name="recommendedReorderPoint" |
---|
| 119 | value="${fieldValue(bean:inventoryItemInstance,field:'recommendedReorderPoint')}" /> |
---|
| 120 | ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
[116] | 121 | </td> |
---|
[223] | 122 | </tr> |
---|
| 123 | |
---|
[116] | 124 | <tr class="prop"> |
---|
| 125 | <td valign="top" class="name"> |
---|
[223] | 126 | <label for="enableReorder">Enable Reorder:</label> |
---|
[116] | 127 | </td> |
---|
[223] | 128 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'enableReorder','errors')}"> |
---|
| 129 | <g:checkBox name="enableReorder" value="${inventoryItemInstance?.enableReorder}" ></g:checkBox> |
---|
[116] | 130 | </td> |
---|
[175] | 131 | </tr> |
---|
[223] | 132 | |
---|
[116] | 133 | <tr class="prop"> |
---|
| 134 | <td valign="top" class="name"> |
---|
[223] | 135 | <label for="isObsolete">Obsolete:</label> |
---|
[116] | 136 | </td> |
---|
[223] | 137 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isObsolete','errors')}"> |
---|
| 138 | <g:checkBox name="isObsolete" value="${inventoryItemInstance?.isObsolete}" ></g:checkBox> |
---|
[116] | 139 | </td> |
---|
[175] | 140 | </tr> |
---|
[223] | 141 | |
---|
[116] | 142 | <tr class="prop"> |
---|
| 143 | <td valign="top" class="name"> |
---|
[175] | 144 | <label for="averageDeliveryTime">Average Delivery Time:</label> |
---|
[116] | 145 | </td> |
---|
[175] | 146 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryTime','errors')}"> |
---|
| 147 | <input type="text" id="averageDeliveryTime" name="averageDeliveryTime" value="${fieldValue(bean:inventoryItemInstance,field:'averageDeliveryTime')}" /> |
---|
[382] | 148 | <g:select optionKey="id" |
---|
| 149 | from="${Period.list()}" |
---|
| 150 | name="averageDeliveryPeriod.id" |
---|
| 151 | value="${inventoryItemInstance?.averageDeliveryPeriod?.id}" |
---|
| 152 | noSelection="['null':'--None--']"> |
---|
| 153 | </g:select> |
---|
[116] | 154 | </td> |
---|
[175] | 155 | </tr> |
---|
[223] | 156 | |
---|
[116] | 157 | <tr class="prop"> |
---|
| 158 | <td valign="top" class="name"> |
---|
[223] | 159 | <label for="suppliersPartNumber">Suppliers Part Number:</label> |
---|
[116] | 160 | </td> |
---|
[223] | 161 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}"> |
---|
| 162 | <input type="text" id="suppliersPartNumber" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/> |
---|
[116] | 163 | </td> |
---|
[175] | 164 | </tr> |
---|
[223] | 165 | |
---|
[116] | 166 | <tr class="prop"> |
---|
| 167 | <td valign="top" class="name"> |
---|
[223] | 168 | <label for="suppliers">Suppliers:</label> |
---|
[116] | 169 | </td> |
---|
[223] | 170 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliers','errors')}"> |
---|
| 171 | <g:select id="suppliers" name="suppliers" |
---|
[382] | 172 | from="${ Supplier.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
[223] | 173 | size="5" multiple="yes" optionKey="id" |
---|
| 174 | value="${inventoryItemInstance?.suppliers.id}" noSelection="['':'--None--']"/> |
---|
[116] | 175 | |
---|
[382] | 176 | <p><g:link controller="supplierDetailed" action="create">add Supplier</g:link></p> |
---|
[116] | 177 | </td> |
---|
[223] | 178 | </tr> |
---|
| 179 | |
---|
[116] | 180 | <tr class="prop"> |
---|
| 181 | <td valign="top" class="name"> |
---|
[223] | 182 | <label for="manufacturersPartNumber">Manufacturers Part Number:</label> |
---|
[116] | 183 | </td> |
---|
[223] | 184 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturersPartNumber','errors')}"> |
---|
| 185 | <input type="text" id="manufacturersPartNumber" name="manufacturersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'manufacturersPartNumber')}"/> |
---|
| 186 | </td> |
---|
| 187 | </tr> |
---|
[116] | 188 | |
---|
| 189 | <tr class="prop"> |
---|
| 190 | <td valign="top" class="name"> |
---|
| 191 | <label for="manufacturers">Manufacturers:</label> |
---|
| 192 | </td> |
---|
| 193 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturers','errors')}"> |
---|
[175] | 194 | <g:select id="manufacturers" name="manufacturers" |
---|
[382] | 195 | from="${ Manufacturer.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
[175] | 196 | size="5" multiple="yes" optionKey="id" |
---|
[223] | 197 | value="${inventoryItemInstance?.manufacturers.id}" noSelection="['':'--None--']"/> |
---|
[382] | 198 | |
---|
| 199 | <p><g:link controller="manufacturerDetailed" action="create">add Manufacturer</g:link></p> |
---|
[223] | 200 | </td> |
---|
| 201 | </tr> |
---|
[116] | 202 | |
---|
| 203 | <tr class="prop"> |
---|
| 204 | <td valign="top" class="name"> |
---|
| 205 | <label for="spareFor">Spare For:</label> |
---|
| 206 | </td> |
---|
| 207 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'spareFor','errors')}"> |
---|
| 208 | <g:select name="spareFor" |
---|
[382] | 209 | from="${ Asset.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
[223] | 210 | size="5" multiple="yes" optionKey="id" |
---|
[382] | 211 | value="${inventoryItemInstance?.spareFor.id}" noSelection="['':'--None--']"/> |
---|
[116] | 212 | |
---|
| 213 | </td> |
---|
[175] | 214 | </tr> |
---|
[223] | 215 | |
---|
[116] | 216 | <tr class="prop"> |
---|
| 217 | <td valign="top" class="name"> |
---|
[223] | 218 | <label for="alternateItems">Alternate Items:</label> |
---|
[116] | 219 | </td> |
---|
[223] | 220 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'alternateItems','errors')}"> |
---|
| 221 | <g:select name="alternateItems" |
---|
[382] | 222 | from="${ InventoryItem.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
[223] | 223 | size="5" multiple="yes" optionKey="id" |
---|
[382] | 224 | value="${inventoryItemInstance?.alternateItems.id}" noSelection="['':'--None--']"/> |
---|
[223] | 225 | |
---|
[116] | 226 | </td> |
---|
[175] | 227 | </tr> |
---|
[223] | 228 | |
---|
[116] | 229 | <tr class="prop"> |
---|
| 230 | <td valign="top" class="name"> |
---|
[223] | 231 | <label for="inventoryGroup">Inventory Group:</label> |
---|
[116] | 232 | </td> |
---|
[223] | 233 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryGroup','errors')}"> |
---|
| 234 | <g:select optionKey="id" from="${InventoryGroup.list()}" name="inventoryGroup.id" value="${inventoryItemInstance?.inventoryGroup?.id}" ></g:select> |
---|
| 235 | </td> |
---|
| 236 | </tr> |
---|
[116] | 237 | |
---|
[223] | 238 | <tr class="prop"> |
---|
| 239 | <td valign="top" class="name"> |
---|
| 240 | <label for="inventoryType">Inventory Type:</label> |
---|
[116] | 241 | </td> |
---|
[223] | 242 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}"> |
---|
| 243 | <g:select optionKey="id" from="${InventoryType.list()}" name="inventoryType.id" value="${inventoryItemInstance?.inventoryType?.id}" ></g:select> |
---|
| 244 | </td> |
---|
[175] | 245 | </tr> |
---|
[223] | 246 | |
---|
[116] | 247 | </tbody> |
---|
| 248 | </table> |
---|
| 249 | </div> |
---|
| 250 | <div class="buttons"> |
---|
| 251 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
[223] | 252 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[116] | 253 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 254 | </div> |
---|
| 255 | </g:form> |
---|
| 256 | </div> |
---|
| 257 | </body> |
---|
| 258 | </html> |
---|