[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>Show InventoryItem</title> |
---|
[139] | 8 | <nav:resources override="true"/> |
---|
[225] | 9 | <resource:tabView skin="tabviewCustom" /> |
---|
[182] | 10 | <g:render template="/shared/pictureHead" /> |
---|
[116] | 11 | </head> |
---|
| 12 | <body> |
---|
| 13 | <div class="nav"> |
---|
[139] | 14 | <nav:renderSubItems group="nav"/> |
---|
[116] | 15 | </div> |
---|
| 16 | <div class="body"> |
---|
[405] | 17 | <g:render template="/shared/messages" /> |
---|
[584] | 18 | <g:if test="${inventoryItemInstance.isObsolete || !inventoryItemInstance.isActive}" > |
---|
| 19 | <div class="errors"> |
---|
| 20 | <ul> |
---|
| 21 | <g:if test="${inventoryItemInstance.isObsolete}" > |
---|
| 22 | <li><g:message code="inventory.item.is.obsolete" /><li> |
---|
| 23 | </g:if> |
---|
| 24 | <g:if test="${!inventoryItemInstance.isActive}" > |
---|
| 25 | <li><g:message code="inventory.item.not.active" /><li> |
---|
| 26 | </g:if> |
---|
[610] | 27 | </ul> |
---|
[584] | 28 | </div> |
---|
| 29 | </g:if> |
---|
[616] | 30 | <g:if test="${!inventoryItemInstance.enableReorderListing}" > |
---|
[610] | 31 | <div class="message"> |
---|
| 32 | <g:message code="inventory.item.reorder.listing.disabled" /> |
---|
| 33 | </div> |
---|
| 34 | </g:if> |
---|
[225] | 35 | <g:hasErrors bean="${inventoryMovementInstance}"> |
---|
[405] | 36 | <div class="errors"> |
---|
| 37 | <g:renderErrors bean="${inventoryMovementInstance}" as="list" /> |
---|
| 38 | </div> |
---|
[225] | 39 | </g:hasErrors> |
---|
[175] | 40 | |
---|
[225] | 41 | <g:hasErrors bean="${inventoryItemInstance}"> |
---|
[405] | 42 | <div class="errors"> |
---|
| 43 | <g:renderErrors bean="${inventoryItemInstance}" as="list" /> |
---|
| 44 | </div> |
---|
[225] | 45 | </g:hasErrors> |
---|
| 46 | |
---|
[422] | 47 | <div class="tabHeader"> |
---|
[500] | 48 | <h1> |
---|
[422] | 49 | ${inventoryItemInstance.name} |
---|
| 50 | </h1> |
---|
| 51 | ${fieldValue(bean:inventoryItemInstance, field:'description')} |
---|
| 52 | </div> |
---|
| 53 | |
---|
| 54 | <br/> |
---|
| 55 | |
---|
[225] | 56 | <richui:tabView id="tabView"> |
---|
| 57 | |
---|
| 58 | <richui:tabLabels> |
---|
| 59 | <richui:tabLabel selected="${showTab.inventory}" title="Inventory Item" /> |
---|
| 60 | <richui:tabLabel selected="${showTab.detail}" title="Detail" /> |
---|
[575] | 61 | <g:if test="${!inventoryMovementList.isEmpty()}"> |
---|
| 62 | <richui:tabLabel selected="${showTab.movement}" title="Movement (${inventoryMovementList.size()})" /> |
---|
| 63 | </g:if> |
---|
| 64 | <g:else> |
---|
| 65 | <richui:tabLabel selected="${showTab.movement}" title="Movement" /> |
---|
| 66 | </g:else> |
---|
| 67 | <g:if test="${!inventoryItemPurchases.isEmpty()}"> |
---|
| 68 | <richui:tabLabel selected="${showTab.purchasing}" title="Purchasing (${inventoryItemPurchases.size()})" /> |
---|
| 69 | </g:if> |
---|
| 70 | <g:else> |
---|
| 71 | <richui:tabLabel selected="${showTab.purchasing}" title="Purchasing" /> |
---|
| 72 | </g:else> |
---|
[225] | 73 | </richui:tabLabels> |
---|
| 74 | |
---|
| 75 | <richui:tabContents> |
---|
| 76 | |
---|
| 77 | <!-- Start Inventory tab --> |
---|
| 78 | <richui:tabContent> |
---|
| 79 | |
---|
| 80 | <g:if test="${inventoryMovementInstance}" > |
---|
| 81 | |
---|
[453] | 82 | <div id="useInventoryItemDiv" style="display:inline"> <!-- inline required for IE --> |
---|
| 83 | <div class="pane_close" > |
---|
| 84 | <g:remoteLink action="clearUseInventoryItem" update="useInventoryItemDiv"> |
---|
| 85 | <img src="${resource(dir:'images/skin',file:'cross.png')}" alt="Clear" title="Clear"/> |
---|
| 86 | </g:remoteLink> |
---|
| 87 | </div> |
---|
[570] | 88 | <g:form controller="inventoryItemDetailed" action="useInventoryItem" method="post" > |
---|
[453] | 89 | <div class="dialog"> |
---|
| 90 | <table> |
---|
| 91 | <tbody> |
---|
| 92 | <g:hiddenField name="task.id" value="${inventoryMovementInstance.task.id}"/> |
---|
| 93 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}"/> |
---|
| 94 | <tr class="prop"> |
---|
| 95 | <td valign="top" class="name">Use on task:</td> |
---|
| 96 | <td valign="top" class="value"> |
---|
| 97 | <g:link controller="taskDetailed" action="show" id="${inventoryMovementInstance.task.id}" > |
---|
| 98 | ${Task.get(inventoryMovementInstance.task.id).encodeAsHTML()} |
---|
| 99 | </g:link> |
---|
| 100 | </td> |
---|
| 101 | </tr> |
---|
[225] | 102 | |
---|
[453] | 103 | <tr class="prop"> |
---|
| 104 | <td valign="top" class="name"> |
---|
| 105 | <label for="quantity">Quantity:</label> |
---|
| 106 | </td> |
---|
| 107 | <td valign="top"> |
---|
| 108 | <input class="medium ${hasErrors(bean:inventoryMovementInstance,field:'quantity','errors')}" |
---|
| 109 | type="text" id="quantity" name="quantity" |
---|
| 110 | value="${fieldValue(bean:inventoryMovementInstance,field:'quantity')}"/> |
---|
| 111 | ${inventoryItemInstance.unitOfMeasure?.encodeAsHTML()} |
---|
[225] | 112 | |
---|
[453] | 113 | <span class="buttons"> |
---|
| 114 | <g:actionSubmit action="useInventoryItem" class="save" value="${InventoryMovementType.read(1)}" /> |
---|
| 115 | </span> |
---|
[225] | 116 | |
---|
[453] | 117 | </td> |
---|
| 118 | </tr> |
---|
[225] | 119 | |
---|
[453] | 120 | </tbody> |
---|
| 121 | </table> |
---|
| 122 | </div> |
---|
| 123 | </g:form> |
---|
[225] | 124 | |
---|
[453] | 125 | <br /> |
---|
| 126 | </div> |
---|
[225] | 127 | |
---|
| 128 | </g:if> |
---|
| 129 | |
---|
| 130 | <div class="dialog"> |
---|
| 131 | <table> |
---|
| 132 | <tbody> |
---|
| 133 | |
---|
| 134 | <tr class="prop"> |
---|
| 135 | <td valign="top" class="name">Picture:</td> |
---|
| 136 | <td valign="top" class="value"> |
---|
| 137 | <g:if test="${inventoryItemInstance.picture}" > |
---|
| 138 | <span class='gallery'><wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" size="${Image.Medium}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" /></span> |
---|
| 139 | </g:if> |
---|
| 140 | <g:else> |
---|
| 141 | <g:link controller="pictureDetailed" |
---|
| 142 | params="['inventoryItem.id':inventoryItemInstance.id]" |
---|
| 143 | action="create"> |
---|
| 144 | Add Picture |
---|
| 145 | </g:link> |
---|
| 146 | </g:else> |
---|
| 147 | </td> |
---|
| 148 | </tr> |
---|
| 149 | |
---|
| 150 | <tr class="prop"> |
---|
[422] | 151 | <td valign="top" class="name">Comment:</td> |
---|
[225] | 152 | |
---|
[422] | 153 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'comment')}</td> |
---|
[225] | 154 | </tr> |
---|
| 155 | |
---|
| 156 | <tr class="prop"> |
---|
| 157 | <td valign="top" class="name">In Stock:</td> |
---|
| 158 | |
---|
| 159 | <td valign="top" class="value"> |
---|
| 160 | ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')} ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
| 161 | </td> |
---|
| 162 | </tr> |
---|
| 163 | |
---|
| 164 | <tr class="prop"> |
---|
| 165 | <td valign="top" class="name">Location:</td> |
---|
| 166 | |
---|
| 167 | <td valign="top" class="value"> |
---|
| 168 | <g:link controller="inventoryLocationDetailed" action="show" id="${inventoryItemInstance.inventoryLocation?.id}"> |
---|
| 169 | ${inventoryItemInstance.inventoryLocation?.encodeAsHTML()} |
---|
| 170 | </g:link> |
---|
[392] | 171 | in ${inventoryItemInstance.inventoryLocation?.inventoryStore.encodeAsHTML()} |
---|
[225] | 172 | </td> |
---|
| 173 | </tr> |
---|
| 174 | |
---|
| 175 | <tr class="prop"> |
---|
| 176 | <td valign="top" class="name">Active:</td> |
---|
| 177 | |
---|
| 178 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isActive')}</td> |
---|
| 179 | </tr> |
---|
| 180 | |
---|
| 181 | <tr class="prop"> |
---|
| 182 | <td valign="top" class="name">Alternate Items:</td> |
---|
| 183 | |
---|
| 184 | <td valign="top" style="text-align:left;" class="value"> |
---|
| 185 | <ul> |
---|
[425] | 186 | <g:each var="a" in="${ inventoryItemInstance.alternateItems.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
[225] | 187 | <li><g:link controller="inventoryItemDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
| 188 | </g:each> |
---|
| 189 | </ul> |
---|
| 190 | </td> |
---|
| 191 | </tr> |
---|
| 192 | |
---|
| 193 | <tr class="prop"> |
---|
| 194 | <td valign="top" class="name">Spare For:</td> |
---|
| 195 | |
---|
| 196 | <td valign="top" style="text-align:left;" class="value"> |
---|
| 197 | <ul> |
---|
[382] | 198 | <g:each var="s" in="${ inventoryItemInstance.spareFor.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
[225] | 199 | <li><g:link controller="assetDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
| 200 | </g:each> |
---|
| 201 | </ul> |
---|
| 202 | </td> |
---|
| 203 | </tr> |
---|
| 204 | |
---|
| 205 | </tbody> |
---|
| 206 | </table> |
---|
| 207 | </div> |
---|
| 208 | <div class="buttons"> |
---|
| 209 | <g:form> |
---|
| 210 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
| 211 | <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> |
---|
| 212 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 213 | </g:form> |
---|
| 214 | </div> |
---|
| 215 | |
---|
| 216 | <br /> |
---|
| 217 | |
---|
| 218 | </richui:tabContent> |
---|
| 219 | <!-- End Inventory tab --> |
---|
| 220 | |
---|
| 221 | <!-- Start Detail tab --> |
---|
| 222 | <richui:tabContent> |
---|
| 223 | |
---|
| 224 | <div class="dialog"> |
---|
| 225 | <table> |
---|
| 226 | <tbody> |
---|
| 227 | |
---|
| 228 | <tr class="prop"> |
---|
| 229 | <td valign="top" class="name">Id:</td> |
---|
| 230 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'id')}</td> |
---|
| 231 | </tr> |
---|
| 232 | |
---|
| 233 | <tr class="prop"> |
---|
| 234 | <td valign="top" class="name">Obsolete:</td> |
---|
| 235 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isObsolete')}</td> |
---|
| 236 | </tr> |
---|
| 237 | |
---|
| 238 | <tr class="prop"> |
---|
| 239 | <td valign="top" class="name">Inventory Group:</td> |
---|
| 240 | <td valign="top" class="value">${inventoryItemInstance.inventoryGroup?.encodeAsHTML()}</td> |
---|
| 241 | </tr> |
---|
| 242 | |
---|
| 243 | <tr class="prop"> |
---|
| 244 | <td valign="top" class="name">Inventory Type:</td> |
---|
| 245 | <td valign="top" class="value">${inventoryItemInstance.inventoryType?.encodeAsHTML()}</td> |
---|
| 246 | </tr> |
---|
| 247 | |
---|
| 248 | <tr class="prop"> |
---|
| 249 | <td valign="top" class="name">Reorder Point:</td> |
---|
| 250 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'reorderPoint')}</td> |
---|
| 251 | </tr> |
---|
| 252 | |
---|
| 253 | <tr class="prop"> |
---|
[610] | 254 | <td valign="top" class="name">Enable Reorder Listing:</td> |
---|
[616] | 255 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'enableReorderListing')}</td> |
---|
[225] | 256 | </tr> |
---|
| 257 | |
---|
| 258 | <tr class="prop"> |
---|
| 259 | <td valign="top" class="name">Recommended Reorder Point:</td> |
---|
| 260 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'recommendedReorderPoint')}</td> |
---|
| 261 | </tr> |
---|
| 262 | |
---|
| 263 | <tr class="prop"> |
---|
[405] | 264 | <td valign="top" class="name">Estimated Unit Price:</td> |
---|
| 265 | |
---|
| 266 | <td valign="top" class="value"> |
---|
| 267 | <g:if test="${inventoryItemInstance.estimatedUnitPriceAmount}"> |
---|
| 268 | ${inventoryItemInstance.estimatedUnitPriceAmount.encodeAsHTML()} |
---|
| 269 | ${inventoryItemInstance.estimatedUnitPriceCurrency.encodeAsHTML()} |
---|
| 270 | </g:if> |
---|
| 271 | </td> |
---|
| 272 | </tr> |
---|
| 273 | |
---|
| 274 | <tr class="prop"> |
---|
[225] | 275 | <td valign="top" class="name">Suppliers Part Number:</td> |
---|
| 276 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'suppliersPartNumber')}</td> |
---|
| 277 | </tr> |
---|
| 278 | |
---|
| 279 | <tr class="prop"> |
---|
[435] | 280 | <td valign="top" class="name">Preferred Supplier:</td> |
---|
[225] | 281 | |
---|
| 282 | <td valign="top" style="text-align:left;" class="value"> |
---|
[435] | 283 | <g:link controller="supplierDetailed" action="show" id="${inventoryItemInstance.preferredSupplier?.id}"> |
---|
| 284 | ${inventoryItemInstance.preferredSupplier?.encodeAsHTML()} |
---|
| 285 | </g:link> |
---|
| 286 | </td> |
---|
| 287 | </tr> |
---|
| 288 | |
---|
| 289 | <tr class="prop"> |
---|
| 290 | <td valign="top" class="name">Alternate Suppliers:</td> |
---|
| 291 | |
---|
| 292 | <td valign="top" style="text-align:left;" class="value"> |
---|
[225] | 293 | <ul> |
---|
[435] | 294 | <g:each var="s" in="${ inventoryItemInstance.alternateSuppliers.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
[225] | 295 | <li><g:link controller="supplierDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
| 296 | </g:each> |
---|
| 297 | </ul> |
---|
| 298 | </td> |
---|
| 299 | </tr> |
---|
| 300 | |
---|
| 301 | <tr class="prop"> |
---|
| 302 | <td valign="top" class="name">Average Delivery Time:</td> |
---|
| 303 | <td valign="top" class="value"> |
---|
| 304 | ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryTime')} |
---|
| 305 | ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryPeriod')} |
---|
| 306 | </td> |
---|
| 307 | </tr> |
---|
| 308 | |
---|
| 309 | <tr class="prop"> |
---|
| 310 | <td valign="top" class="name">Manufacturers Part Number:</td> |
---|
| 311 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'manufacturersPartNumber')}</td> |
---|
| 312 | </tr> |
---|
| 313 | |
---|
| 314 | <tr class="prop"> |
---|
[435] | 315 | <td valign="top" class="name">Preferred Manufacturer:</td> |
---|
[225] | 316 | |
---|
| 317 | <td valign="top" style="text-align:left;" class="value"> |
---|
[435] | 318 | <g:link controller="manufacturerDetailed" action="show" id="${inventoryItemInstance.preferredManufacturer?.id}"> |
---|
| 319 | ${inventoryItemInstance.preferredManufacturer?.encodeAsHTML()} |
---|
| 320 | </g:link> |
---|
| 321 | </td> |
---|
| 322 | </tr> |
---|
| 323 | |
---|
| 324 | <tr class="prop"> |
---|
| 325 | <td valign="top" class="name">Alternate Manufacturers:</td> |
---|
| 326 | |
---|
| 327 | <td valign="top" style="text-align:left;" class="value"> |
---|
[225] | 328 | <ul> |
---|
[435] | 329 | <g:each var="m" in="${ inventoryItemInstance.alternateManufacturers.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
[225] | 330 | <li><g:link controller="manufacturerDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
| 331 | </g:each> |
---|
| 332 | </ul> |
---|
| 333 | </td> |
---|
| 334 | </tr> |
---|
| 335 | |
---|
| 336 | |
---|
| 337 | </tbody> |
---|
| 338 | </table> |
---|
| 339 | </div> |
---|
| 340 | <div class="buttons"> |
---|
| 341 | <g:form> |
---|
| 342 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
| 343 | <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> |
---|
| 344 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 345 | </g:form> |
---|
| 346 | </div> |
---|
| 347 | </richui:tabContent> |
---|
| 348 | <!-- End Detail tab --> |
---|
| 349 | |
---|
| 350 | <!-- Start Movement tab --> |
---|
| 351 | <richui:tabContent> |
---|
| 352 | |
---|
| 353 | <g:if test="${inventoryMovementList.isEmpty()}"> |
---|
| 354 | <br /> |
---|
| 355 | No Inventory Movements. |
---|
| 356 | <br /> |
---|
| 357 | <br /> |
---|
| 358 | |
---|
| 359 | <div class="buttons"> |
---|
| 360 | <g:form controller="inventoryMovementDetailed"> |
---|
[226] | 361 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
[225] | 362 | <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> |
---|
| 363 | </g:form> |
---|
| 364 | </div> |
---|
| 365 | |
---|
| 366 | </g:if> |
---|
| 367 | <g:else> |
---|
| 368 | |
---|
| 369 | <div class="list"> |
---|
| 370 | <table> |
---|
| 371 | <thead> |
---|
| 372 | <tr> |
---|
| 373 | <th>Quantity</th> |
---|
| 374 | <th>Movement Type</th> |
---|
| 375 | <th>Date</th> |
---|
| 376 | <th>Person</th> |
---|
| 377 | <th></th> |
---|
| 378 | </tr> |
---|
| 379 | </thead> |
---|
| 380 | <tbody> |
---|
| 381 | <g:each in="${inventoryMovementList}" status="i" var="movements"> |
---|
[498] | 382 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/> |
---|
[225] | 383 | |
---|
[498] | 384 | <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'> |
---|
| 385 | ${fieldValue(bean:movements, field:'quantity')} |
---|
| 386 | </td> |
---|
| 387 | <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'> |
---|
| 388 | ${fieldValue(bean:movements, field:'inventoryMovementType')} |
---|
| 389 | </td> |
---|
| 390 | <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'> |
---|
| 391 | <g:formatDate date="${movements.date}" format="EEE, dd-MMM-yyyy"/> |
---|
| 392 | </td> |
---|
| 393 | <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'> |
---|
| 394 | ${fieldValue(bean:movements, field:'person')} |
---|
| 395 | </td> |
---|
| 396 | |
---|
| 397 | <td class="notClickable"> |
---|
[225] | 398 | <g:link controller="inventoryMovementDetailed" action="show" id="${movements.id}"> |
---|
| 399 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
| 400 | </g:link> |
---|
| 401 | </td> |
---|
| 402 | |
---|
| 403 | </tr> |
---|
| 404 | </g:each> |
---|
| 405 | </tbody> |
---|
| 406 | </table> |
---|
| 407 | </div> |
---|
| 408 | |
---|
| 409 | <div class="buttons"> |
---|
| 410 | <g:form controller="inventoryMovementDetailed"> |
---|
[226] | 411 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
[225] | 412 | <g:if test="${inventoryMovementListTotal > inventoryMovementListMax}"> |
---|
| 413 | Showing ${inventoryMovementListMax} of ${inventoryMovementListTotal} |
---|
| 414 | <br /> |
---|
| 415 | </g:if> |
---|
| 416 | <g:else> |
---|
| 417 | Total ${inventoryMovementListTotal} |
---|
| 418 | <br /> |
---|
| 419 | </g:else> |
---|
| 420 | <span class="button"><g:actionSubmit action="listInventoryMovements" class="table" value="List" /></span> |
---|
| 421 | <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> |
---|
| 422 | </g:form> |
---|
| 423 | </div> |
---|
| 424 | |
---|
| 425 | </g:else> |
---|
| 426 | |
---|
| 427 | </richui:tabContent> |
---|
| 428 | <!-- End Movement tab --> |
---|
| 429 | |
---|
[441] | 430 | <!-- Start Purchases tab --> |
---|
| 431 | <richui:tabContent> |
---|
| 432 | |
---|
| 433 | <g:if test="${inventoryItemPurchases.isEmpty()}"> |
---|
| 434 | <br /> |
---|
| 435 | No Inventory Purchases. |
---|
| 436 | <br /> |
---|
| 437 | <br /> |
---|
| 438 | |
---|
| 439 | <div class="buttons"> |
---|
[610] | 440 | <!--Fake button to prevent ordering disabled inventory items--> |
---|
| 441 | <g:if test="${inventoryItemInstance.isObsolete || !inventoryItemInstance.isActive}" > |
---|
| 442 | <g:form controller="inventoryItemDetailed"> |
---|
| 443 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
[617] | 444 | <span class="button"> |
---|
| 445 | <g:actionSubmit action="show" class="add" value="${g.message(code:'inventory.item.reorder.not.allowed')}" /> |
---|
| 446 | </span> |
---|
| 447 | <span class="button"> |
---|
[619] | 448 | <input type="button" class="search" value="Search" |
---|
| 449 | onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/search"' /> |
---|
[617] | 450 | </span> |
---|
[610] | 451 | </g:form> |
---|
| 452 | </g:if> |
---|
| 453 | <g:else><!--Real order button.--> |
---|
| 454 | <g:form controller="inventoryItemPurchaseDetailed"> |
---|
| 455 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
[617] | 456 | <span class="button"> |
---|
| 457 | <g:actionSubmit action="create" class="add" value="Order" /> |
---|
| 458 | </span> |
---|
| 459 | <span class="button"> |
---|
| 460 | <g:actionSubmit action="search" class="search" value="Search" /> |
---|
| 461 | </span> |
---|
[610] | 462 | </g:form> |
---|
| 463 | </g:else> |
---|
[441] | 464 | </div> |
---|
| 465 | |
---|
| 466 | </g:if> |
---|
| 467 | <g:else> |
---|
| 468 | |
---|
| 469 | <div class="list"> |
---|
| 470 | <table> |
---|
| 471 | <thead> |
---|
| 472 | <tr> |
---|
| 473 | <g:sortableColumn action="show" property="purchaseOrderNumber" |
---|
| 474 | title="Order #" params="[paginate: 'purchases']" /> |
---|
[605] | 475 | <g:sortableColumn action="show" property="date" |
---|
[441] | 476 | title="Date" params="[paginate: 'purchases']" /> |
---|
| 477 | <g:sortableColumn action="show" property="costCode" |
---|
| 478 | title="Cost Code" params="[paginate: 'purchases']" /> |
---|
| 479 | <g:sortableColumn action="show" property="quantity" |
---|
| 480 | title="Quantity" params="[paginate: 'purchases']" /> |
---|
| 481 | <g:sortableColumn action="show" property="orderValueAmount" |
---|
| 482 | title="Order \$" params="[paginate: 'purchases']" /> |
---|
| 483 | <g:sortableColumn action="show" property="invoiceNumber" |
---|
| 484 | title="Invoice Number" params="[paginate: 'purchases']" /> |
---|
| 485 | <g:sortableColumn action="show" property="inventoryItemPurchaseType" |
---|
| 486 | title="Type" params="[paginate: 'purchases']" /> |
---|
| 487 | <th> |
---|
| 488 | <img src="${resource(dir:'images/skin',file:'database_go_grey.png')}" alt="Show" title="Show" /> |
---|
| 489 | </th> |
---|
| 490 | <th> |
---|
| 491 | <img src="${resource(dir:'images/skin',file:'basket_put_grey.png')}" alt="Receive" title="Receive" /> |
---|
| 492 | </th> |
---|
| 493 | <th> |
---|
| 494 | <img src="${resource(dir:'images/skin',file:'tick_grey.png')}" alt="Approve" title="Approve Payment" /> |
---|
| 495 | </th> |
---|
| 496 | </tr> |
---|
| 497 | </thead> |
---|
| 498 | <tbody> |
---|
| 499 | <g:each in="${inventoryItemPurchases}" status="i" var="purchase"> |
---|
| 500 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/> |
---|
| 501 | |
---|
| 502 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 503 | ${fieldValue(bean:purchase, field:'purchaseOrderNumber')} |
---|
| 504 | </td> |
---|
| 505 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
[605] | 506 | <g:formatDate date="${purchase.date}" format="EEE, dd-MMM-yyyy"/> |
---|
[441] | 507 | </td> |
---|
| 508 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 509 | ${fieldValue(bean:purchase, field:'costCode')} |
---|
| 510 | </td> |
---|
| 511 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 512 | ${fieldValue(bean:purchase, field:'quantity')} |
---|
| 513 | </td> |
---|
| 514 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 515 | ${fieldValue(bean:purchase, field:'orderValueAmount')} |
---|
| 516 | ${fieldValue(bean:purchase, field:'orderValueCurrency')} |
---|
| 517 | </td> |
---|
| 518 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 519 | ${fieldValue(bean:purchase, field:'invoiceNumber')} |
---|
| 520 | </td> |
---|
| 521 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 522 | ${fieldValue(bean:purchase, field:'inventoryItemPurchaseType')} |
---|
| 523 | </td> |
---|
[498] | 524 | <td class="notClickable"> |
---|
[441] | 525 | <g:link controller="inventoryItemPurchaseDetailed" action="show" id="${purchase.id}"> |
---|
| 526 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" title="Show" /> |
---|
| 527 | </g:link> |
---|
| 528 | </td> |
---|
[595] | 529 | |
---|
[441] | 530 | <g:if test="${purchase.inventoryItemPurchaseType.id == 1}"> |
---|
| 531 | <g:if test="${!purchase.receivedComplete}"> |
---|
[498] | 532 | <td class="notClickable"> |
---|
[595] | 533 | <g:link controller="inventoryItemPurchaseDetailed" action="receive" params="[id: purchase.id, returnTo: 'inventoryItem']"> |
---|
[441] | 534 | <img src="${resource(dir:'images/skin',file:'basket_put.png')}" alt="Receive" title="Receive" /> |
---|
| 535 | </g:link> |
---|
| 536 | </td> |
---|
[595] | 537 | <td class="notClickable"> |
---|
| 538 | </td> |
---|
[441] | 539 | </g:if> |
---|
| 540 | <g:else> |
---|
[498] | 541 | <td class="notClickable"> |
---|
[441] | 542 | </td> |
---|
[595] | 543 | <td class="notClickable"> |
---|
| 544 | </td> |
---|
[441] | 545 | </g:else> |
---|
[595] | 546 | </g:if> |
---|
| 547 | <g:elseif test="${(purchase.inventoryItemPurchaseType.id == 2)||(purchase.inventoryItemPurchaseType.id == 3)}"> |
---|
[441] | 548 | <g:if test="${!purchase.invoicePaymentApproved}"> |
---|
[498] | 549 | <td class="notClickable"> |
---|
[595] | 550 | </td> |
---|
| 551 | <td class="notClickable"> |
---|
| 552 | <g:link controller="inventoryItemPurchaseDetailed" action="approveInvoicePayment" params="[id: purchase.id, returnTo: 'inventoryItem']"> |
---|
[441] | 553 | <img src="${resource(dir:'images/skin',file:'tick.png')}" alt="Approve" title="Approve Payment" /> |
---|
| 554 | </g:link> |
---|
| 555 | </td> |
---|
| 556 | </g:if> |
---|
| 557 | <g:else> |
---|
[498] | 558 | <td class="notClickable"> |
---|
[441] | 559 | </td> |
---|
[595] | 560 | <td class="notClickable"> |
---|
| 561 | </td> |
---|
[441] | 562 | </g:else> |
---|
[595] | 563 | </g:elseif> |
---|
[441] | 564 | <g:else> |
---|
[498] | 565 | <td class="notClickable"> |
---|
[441] | 566 | </td> |
---|
[498] | 567 | <td class="notClickable"> |
---|
[441] | 568 | </td> |
---|
| 569 | </g:else> |
---|
| 570 | |
---|
| 571 | </tr> |
---|
| 572 | </g:each> |
---|
| 573 | </tbody> |
---|
| 574 | </table> |
---|
| 575 | </div> |
---|
| 576 | |
---|
| 577 | <div class="buttons"> |
---|
[610] | 578 | <!--Fake button to prevent ordering disabled inventory items--> |
---|
| 579 | <g:if test="${inventoryItemInstance.isObsolete || !inventoryItemInstance.isActive}" > |
---|
| 580 | <g:form controller="inventoryItemDetailed"> |
---|
| 581 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
| 582 | Results: ${inventoryItemPurchases.size()} / ${inventoryItemPurchasesTotal} |
---|
| 583 | <span class="button"> |
---|
| 584 | <g:actionSubmit action="show" class="add" value="${g.message(code:'inventory.item.reorder.not.allowed')}" /> |
---|
| 585 | </span> |
---|
[617] | 586 | <span class="button"> |
---|
[619] | 587 | <input type="button" class="search" value="Search" |
---|
| 588 | onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/search"' /> |
---|
[617] | 589 | </span> |
---|
[610] | 590 | </g:form> |
---|
| 591 | </g:if> |
---|
| 592 | <g:else><!--Real order button.--> |
---|
| 593 | <g:form controller="inventoryItemPurchaseDetailed"> |
---|
| 594 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
| 595 | Results: ${inventoryItemPurchases.size()} / ${inventoryItemPurchasesTotal} |
---|
[617] | 596 | <span class="button"> |
---|
| 597 | <g:actionSubmit action="create" class="add" value="Order" /> |
---|
| 598 | </span> |
---|
| 599 | <span class="button"> |
---|
| 600 | <g:actionSubmit action="search" class="search" value="Search" /> |
---|
| 601 | </span> |
---|
[610] | 602 | </g:form> |
---|
| 603 | </g:else> |
---|
[441] | 604 | </div> |
---|
| 605 | |
---|
| 606 | <div class="paginateButtons"> |
---|
| 607 | <g:paginate action="show" |
---|
| 608 | id="${inventoryItemInstance?.id}" |
---|
| 609 | total="${inventoryItemPurchasesTotal}" |
---|
| 610 | params="[paginate: 'purchases']" /> |
---|
| 611 | </div> |
---|
| 612 | |
---|
| 613 | </g:else> |
---|
| 614 | |
---|
| 615 | </richui:tabContent> |
---|
| 616 | <!-- End Movement tab --> |
---|
| 617 | |
---|
[225] | 618 | </richui:tabContents> |
---|
| 619 | </richui:tabView> |
---|
| 620 | |
---|
[116] | 621 | </div> |
---|
| 622 | </body> |
---|
| 623 | </html> |
---|