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