Changeset 614
- Timestamp:
- Jun 28, 2010, 12:04:31 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/InventoryItemPurchaseDetailedController.groovy
r610 r614 97 97 98 98 if(params.quickSearch == "searchAllOrders") { 99 inventoryItemPurchaseList = InventoryItemPurchase.findAllByInventoryItemPurchaseType(InventoryItemPurchaseType.read(1), 100 [max:params.max, 101 offset:params.offset, 102 sort:params.sort, 103 order:params.order]) 104 if(inventoryItemPurchaseList.size() > 0) { params.message = "All Orders." } 99 def orderType = InventoryItemPurchaseType.read(1) 100 inventoryItemPurchaseList = InventoryItemPurchase.findAllByInventoryItemPurchaseType(orderType, 101 [max:params.max, 102 offset:params.offset, 103 sort:params.sort, 104 order:params.order]) 105 inventoryItemPurchaseTotal = InventoryItemPurchase.countByInventoryItemPurchaseType(orderType) 106 if(inventoryItemPurchaseTotal > 0) { params.message = "All Orders." } 105 107 else { params.message = "No orders found." } 106 108 } 107 109 else if(params.quickSearch == "searchAllReceived") { 108 inventoryItemPurchaseList = InventoryItemPurchase.findAllByInventoryItemPurchaseTypeOrInventoryItemPurchaseType(InventoryItemPurchaseType.read(2), 109 InventoryItemPurchaseType.read(3), 110 [max:params.max, 111 offset:params.offset, 112 sort:params.sort, 113 order:params.order]) 114 if(inventoryItemPurchaseList.size() > 0) { params.message = "All Received Complete." } 110 def receivedBackOrderType = InventoryItemPurchaseType.read(2) 111 def receivedCompleteType = InventoryItemPurchaseType.read(3) 112 inventoryItemPurchaseList = InventoryItemPurchase.findAllByInventoryItemPurchaseTypeOrInventoryItemPurchaseType(receivedBackOrderType, 113 receivedCompleteType, 114 [max:params.max, 115 offset:params.offset, 116 sort:params.sort, 117 order:params.order]) 118 inventoryItemPurchaseTotal = InventoryItemPurchase.countByInventoryItemPurchaseTypeOrInventoryItemPurchaseType(receivedBackOrderType, 119 receivedCompleteType) 120 if(inventoryItemPurchaseTotal > 0) { params.message = "All Received." } 115 121 else { params.message = "No orders found." } 116 122 } … … 118 124 //Default: 119 125 inventoryItemPurchaseList = InventoryItemPurchase.list(max:params.max, 120 offset:params.offset, 121 sort:params.sort, 122 order:params.order) 123 if(inventoryItemPurchaseList.size() > 0) { params.message = "All Purchases." } 126 offset:params.offset, 127 sort:params.sort, 128 order:params.order) 129 inventoryItemPurchaseTotal = InventoryItemPurchase.count() 130 if(inventoryItemPurchaseTotal > 0) { params.message = "All Purchases." } 124 131 else { params.message = "No orders found." } 125 132 } 126 133 127 inventoryItemPurchaseTotal = inventoryItemPurchaseList.size()128 134 filterParams.quickSearch = params.quickSearch 129 135 // Remember search.
Note: See TracChangeset
for help on using the changeset viewer.