Ignore:
Timestamp:
Jun 21, 2010, 12:23:21 PM (14 years ago)
Author:
gav
Message:

Domain change, several changes to InventoryItemPurchase.
Update views and logic to suite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/InventoryItemPurchaseDetailedController.groovy

    r597 r605  
    148148            response.contentType = ConfigurationHolder.config.grails.mime.types[params.format]
    149149            response.setHeader("Content-disposition", "attachment; filename=Purchases.${params.extension}")
    150             List fields = ["purchaseOrderNumber", "dateEntered", "costCode", "quantity", "orderValueAmount", "invoiceNumber",
     150            List fields = ["purchaseOrderNumber", "date", "costCode", "quantity", "orderValueAmount", "invoiceNumber",
    151151                                    "inventoryItemPurchaseType"]
    152             Map labels = ["purchaseOrderNumber": "Order Number", "dateEntered": "Date", "costCode": "Cost Code",
     152            Map labels = ["purchaseOrderNumber": "Order Number", "date": "Date", "costCode": "Cost Code",
    153153                                    "quantity": "Quantity", "orderValueAmount": "Order \$", "invoiceNumber": "Invoice Number",
    154154                                    "inventoryItemPurchaseType": "Type"]
    155             Map formatters = [ dateEntered: dateFmt]
     155            Map formatters = [ date: dateFmt]
    156156            Map parameters = [title: title, separator: ","]
    157157
     
    165165        filterParams.order = params.order ?: "desc"
    166166
     167        // Get some associatedProperty values for filterpane.
     168        def associatedPropertyValues = [:]
     169        def startOfYearRange = dateUtilService.getYearFromDate(dateUtilService.plusYear(new Date(), -10))
     170        def endOfYearRange = dateUtilService.getYearFromDate(dateUtilService.plusYear(new Date(), 10))
     171        associatedPropertyValues.yearRange = startOfYearRange..endOfYearRange
     172
    167173        return[ inventoryItemPurchaseList: inventoryItemPurchaseList,
    168                 inventoryItemPurchaseTotal: inventoryItemPurchaseTotal,
    169                 filterParams: filterParams ]
     174                        inventoryItemPurchaseTotal: inventoryItemPurchaseTotal,
     175                        filterParams: filterParams,
     176                        associatedPropertyValues: associatedPropertyValues ]
    170177
    171178    } // end search()
Note: See TracChangeset for help on using the changeset viewer.