| 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> |
|---|
| 8 | <nav:resources override="true"/> |
|---|
| 9 | <g:render template="/shared/pictureHead" /> |
|---|
| 10 | </head> |
|---|
| 11 | <body> |
|---|
| 12 | <div class="nav"> |
|---|
| 13 | <nav:renderSubItems group="nav"/> |
|---|
| 14 | </div> |
|---|
| 15 | <div class="body"> |
|---|
| 16 | <g:render template="/shared/messages" /> |
|---|
| 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> |
|---|
| 28 | |
|---|
| 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> |
|---|
| 43 | |
|---|
| 44 | <tr class="prop"> |
|---|
| 45 | <td valign="top" class="name"> |
|---|
| 46 | <label for="name">Name:</label> |
|---|
| 47 | </td> |
|---|
| 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')}"/> |
|---|
| 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"> |
|---|
| 60 | <input class="description ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}" |
|---|
| 61 | type="text" id="description" name="description" |
|---|
| 62 | value="${fieldValue(bean:inventoryItemInstance,field:'description')}"/> |
|---|
| 63 | </td> |
|---|
| 64 | </tr> |
|---|
| 65 | |
|---|
| 66 | <tr class="prop"> |
|---|
| 67 | <td valign="top" class="name"> |
|---|
| 68 | <label for="unitsInStock">In Stock:</label> |
|---|
| 69 | </td> |
|---|
| 70 | <td valign="top" class="value"> |
|---|
| 71 | ${inventoryItemInstance.unitsInStock} ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
|---|
| 72 | </td> |
|---|
| 73 | </tr> |
|---|
| 74 | |
|---|
| 75 | <tr class="prop"> |
|---|
| 76 | <td valign="top" class="name"> |
|---|
| 77 | <label for="inventoryLocation">Location:</label> |
|---|
| 78 | </td> |
|---|
| 79 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}"> |
|---|
| 80 | <g:select optionKey="id" |
|---|
| 81 | from="${ InventoryLocation.list().sort { p1, p2 -> p1.toString().compareToIgnoreCase(p2.toString()) } }" |
|---|
| 82 | name="inventoryLocation.id" |
|---|
| 83 | value="${inventoryItemInstance?.inventoryLocation?.id}" |
|---|
| 84 | optionValue="${{it.name+ ' in ' + it.inventoryStore}}"> |
|---|
| 85 | </g:select> |
|---|
| 86 | </td> |
|---|
| 87 | </tr> |
|---|
| 88 | |
|---|
| 89 | <tr class="prop"> |
|---|
| 90 | <td valign="top" class="name"> |
|---|
| 91 | <label for="isActive">Active:</label> |
|---|
| 92 | </td> |
|---|
| 93 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isActive','errors')}"> |
|---|
| 94 | <g:checkBox name="isActive" value="${inventoryItemInstance?.isActive}" ></g:checkBox> |
|---|
| 95 | </td> |
|---|
| 96 | </tr> |
|---|
| 97 | |
|---|
| 98 | <tr class="prop"> |
|---|
| 99 | <td valign="top" class="name"> |
|---|
| 100 | <label for="reorderPoint">Reorder Point:</label> |
|---|
| 101 | </td> |
|---|
| 102 | <td valign="top"> |
|---|
| 103 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}" |
|---|
| 104 | type="text" id="reorderPoint" name="reorderPoint" |
|---|
| 105 | value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" /> |
|---|
| 106 | ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
|---|
| 107 | </td> |
|---|
| 108 | </tr> |
|---|
| 109 | |
|---|
| 110 | <tr class="prop"> |
|---|
| 111 | <td valign="top" class="name"> |
|---|
| 112 | <label for="recommendedReorderPoint">Recommended Reorder Point:</label> |
|---|
| 113 | </td> |
|---|
| 114 | <td valign="top"> |
|---|
| 115 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'recommendedReorderPoint','errors')}" |
|---|
| 116 | type="text" id="recommendedReorderPoint" name="recommendedReorderPoint" |
|---|
| 117 | value="${fieldValue(bean:inventoryItemInstance,field:'recommendedReorderPoint')}" /> |
|---|
| 118 | ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
|---|
| 119 | </td> |
|---|
| 120 | </tr> |
|---|
| 121 | |
|---|
| 122 | <tr class="prop"> |
|---|
| 123 | <td valign="top" class="name"> |
|---|
| 124 | <label for="enableReorder">Enable Reorder:</label> |
|---|
| 125 | </td> |
|---|
| 126 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'enableReorder','errors')}"> |
|---|
| 127 | <g:checkBox name="enableReorder" value="${inventoryItemInstance?.enableReorder}" ></g:checkBox> |
|---|
| 128 | </td> |
|---|
| 129 | </tr> |
|---|
| 130 | |
|---|
| 131 | <tr class="prop"> |
|---|
| 132 | <td valign="top" class="name"> |
|---|
| 133 | <label for="isObsolete">Obsolete:</label> |
|---|
| 134 | </td> |
|---|
| 135 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isObsolete','errors')}"> |
|---|
| 136 | <g:checkBox name="isObsolete" value="${inventoryItemInstance?.isObsolete}" ></g:checkBox> |
|---|
| 137 | </td> |
|---|
| 138 | </tr> |
|---|
| 139 | |
|---|
| 140 | <tr class="prop"> |
|---|
| 141 | <td valign="top" class="name"> |
|---|
| 142 | <label for="averageDeliveryTime">Average Delivery Time:</label> |
|---|
| 143 | </td> |
|---|
| 144 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryTime','errors')}"> |
|---|
| 145 | <input type="text" id="averageDeliveryTime" name="averageDeliveryTime" value="${fieldValue(bean:inventoryItemInstance,field:'averageDeliveryTime')}" /> |
|---|
| 146 | <g:select optionKey="id" |
|---|
| 147 | from="${Period.list()}" |
|---|
| 148 | name="averageDeliveryPeriod.id" |
|---|
| 149 | value="${inventoryItemInstance?.averageDeliveryPeriod?.id}" |
|---|
| 150 | noSelection="['null':'--None--']"> |
|---|
| 151 | </g:select> |
|---|
| 152 | </td> |
|---|
| 153 | </tr> |
|---|
| 154 | |
|---|
| 155 | <tr class="prop"> |
|---|
| 156 | <td valign="top" class="name"> |
|---|
| 157 | <label for="averageDeliveryTime">Estimated Unit Price:</label> |
|---|
| 158 | </td> |
|---|
| 159 | <td valign="top"> |
|---|
| 160 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'estimatedUnitPriceAmount','errors')}" |
|---|
| 161 | type="text" id="estimatedUnitPriceAmount" name="estimatedUnitPriceAmount" |
|---|
| 162 | value="${inventoryItemInstance.estimatedUnitPriceAmount}" /> |
|---|
| 163 | <g:currencySelect name="estimatedUnitPriceCurrency" |
|---|
| 164 | value="${inventoryItemInstance.estimatedUnitPriceCurrency}" /> |
|---|
| 165 | </td> |
|---|
| 166 | </tr> |
|---|
| 167 | |
|---|
| 168 | <tr class="prop"> |
|---|
| 169 | <td valign="top" class="name"> |
|---|
| 170 | <label for="suppliersPartNumber">Suppliers Part Number:</label> |
|---|
| 171 | </td> |
|---|
| 172 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}"> |
|---|
| 173 | <input type="text" id="suppliersPartNumber" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/> |
|---|
| 174 | </td> |
|---|
| 175 | </tr> |
|---|
| 176 | |
|---|
| 177 | <tr class="prop"> |
|---|
| 178 | <td valign="top" class="name"> |
|---|
| 179 | <label for="suppliers">Suppliers:</label> |
|---|
| 180 | </td> |
|---|
| 181 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliers','errors')}"> |
|---|
| 182 | <g:select id="suppliers" name="suppliers" |
|---|
| 183 | from="${ Supplier.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
|---|
| 184 | size="5" multiple="yes" optionKey="id" |
|---|
| 185 | value="${inventoryItemInstance?.suppliers.id}" noSelection="['':'--None--']"/> |
|---|
| 186 | |
|---|
| 187 | <p><g:link controller="supplierDetailed" action="create">+Add Supplier</g:link></p> |
|---|
| 188 | </td> |
|---|
| 189 | </tr> |
|---|
| 190 | |
|---|
| 191 | <tr class="prop"> |
|---|
| 192 | <td valign="top" class="name"> |
|---|
| 193 | <label for="manufacturersPartNumber">Manufacturers Part Number:</label> |
|---|
| 194 | </td> |
|---|
| 195 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturersPartNumber','errors')}"> |
|---|
| 196 | <input type="text" id="manufacturersPartNumber" name="manufacturersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'manufacturersPartNumber')}"/> |
|---|
| 197 | </td> |
|---|
| 198 | </tr> |
|---|
| 199 | |
|---|
| 200 | <tr class="prop"> |
|---|
| 201 | <td valign="top" class="name"> |
|---|
| 202 | <label for="manufacturers">Manufacturers:</label> |
|---|
| 203 | </td> |
|---|
| 204 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturers','errors')}"> |
|---|
| 205 | <g:select id="manufacturers" name="manufacturers" |
|---|
| 206 | from="${ Manufacturer.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
|---|
| 207 | size="5" multiple="yes" optionKey="id" |
|---|
| 208 | value="${inventoryItemInstance?.manufacturers.id}" noSelection="['':'--None--']"/> |
|---|
| 209 | |
|---|
| 210 | <p><g:link controller="manufacturerDetailed" action="create">+Add Manufacturer</g:link></p> |
|---|
| 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().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
|---|
| 221 | size="5" multiple="yes" optionKey="id" |
|---|
| 222 | value="${inventoryItemInstance?.spareFor.id}" noSelection="['':'--None--']"/> |
|---|
| 223 | |
|---|
| 224 | </td> |
|---|
| 225 | </tr> |
|---|
| 226 | |
|---|
| 227 | <tr class="prop"> |
|---|
| 228 | <td valign="top" class="name"> |
|---|
| 229 | <label for="alternateItems">Alternate Items:</label> |
|---|
| 230 | </td> |
|---|
| 231 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'alternateItems','errors')}"> |
|---|
| 232 | <g:select name="alternateItems" |
|---|
| 233 | from="${ InventoryItem.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
|---|
| 234 | size="5" multiple="yes" optionKey="id" |
|---|
| 235 | value="${inventoryItemInstance?.alternateItems.id}" noSelection="['':'--None--']"/> |
|---|
| 236 | |
|---|
| 237 | </td> |
|---|
| 238 | </tr> |
|---|
| 239 | |
|---|
| 240 | <tr class="prop"> |
|---|
| 241 | <td valign="top" class="name"> |
|---|
| 242 | <label for="inventoryGroup">Inventory Group:</label> |
|---|
| 243 | </td> |
|---|
| 244 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryGroup','errors')}"> |
|---|
| 245 | <g:select optionKey="id" from="${InventoryGroup.list()}" name="inventoryGroup.id" value="${inventoryItemInstance?.inventoryGroup?.id}" ></g:select> |
|---|
| 246 | </td> |
|---|
| 247 | </tr> |
|---|
| 248 | |
|---|
| 249 | <tr class="prop"> |
|---|
| 250 | <td valign="top" class="name"> |
|---|
| 251 | <label for="inventoryType">Inventory Type:</label> |
|---|
| 252 | </td> |
|---|
| 253 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}"> |
|---|
| 254 | <g:select optionKey="id" from="${InventoryType.list()}" name="inventoryType.id" value="${inventoryItemInstance?.inventoryType?.id}" ></g:select> |
|---|
| 255 | </td> |
|---|
| 256 | </tr> |
|---|
| 257 | |
|---|
| 258 | </tbody> |
|---|
| 259 | </table> |
|---|
| 260 | </div> |
|---|
| 261 | <div class="buttons"> |
|---|
| 262 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
|---|
| 263 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
|---|
| 264 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
|---|
| 265 | </div> |
|---|
| 266 | </g:form> |
|---|
| 267 | </div> |
|---|
| 268 | </body> |
|---|
| 269 | </html> |
|---|