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