- Timestamp:
- Nov 25, 2010, 8:47:00 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/InventoryItemDetailedController.groovy
r647 r719 344 344 associatedPropertyValues.inventoryLocationList = InventoryLocation.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 345 345 associatedPropertyValues.assetList = Asset.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 346 associatedPropertyValues.manufacturerList = Manufacturer.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])347 346 associatedPropertyValues.supplierList = Supplier.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 348 347 … … 433 432 def possibleAlternateItems = inventoryItemService.getPossibleAlternateItems(result.inventoryItemInstance) 434 433 def suppliers = Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } 435 def manufacturers = Manufacturer.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }436 434 437 435 return [ inventoryItemInstance : result.inventoryItemInstance, 438 436 possibleAlternateItems: possibleAlternateItems, 439 suppliers: suppliers, 440 manufacturers: manufacturers] 437 suppliers: suppliers] 441 438 } 442 439 … … 462 459 def possibleAlternateItems = inventoryItemService.getPossibleAlternateItems(result.inventoryItemInstance) 463 460 def suppliers = Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } 464 def manufacturers = Manufacturer.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }465 461 render(view:'edit', model:[inventoryItemInstance: result.inventoryItemInstance.attach(), 466 462 possibleAlternateItems: possibleAlternateItems, 467 suppliers: suppliers, 468 manufacturers: manufacturers]) 463 suppliers: suppliers]) 469 464 } 470 465 … … 472 467 def result = inventoryItemService.create(params) 473 468 def suppliers = Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } 474 def manufacturers = Manufacturer.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }475 469 476 470 if(!result.error) 477 471 return [inventoryItemInstance: result.inventoryItemInstance, 478 suppliers: suppliers, 479 manufacturers: manufacturers] 472 suppliers: suppliers] 480 473 481 474 //flash.errorMessage = g.message(code: result.error.code, args: result.error.args) … … 493 486 494 487 def suppliers = Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } 495 def manufacturers = Manufacturer.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }496 488 497 489 //flash.errorMessage = g.message(code: result.error.code, args: result.error.args) 498 490 render(view:'create', model:[inventoryItemInstance: result.inventoryItemInstance, 499 suppliers: suppliers, 500 manufacturers: manufacturers]) 491 suppliers: suppliers]) 501 492 } 502 493
Note: See TracChangeset
for help on using the changeset viewer.