Ignore:
Timestamp:
Oct 1, 2010, 6:04:29 PM (14 years ago)
Author:
gav
Message:

New report: Inventory Value, remove pictures due to JVM size limits and MSSQL bug when it tries to get distinct image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/InventoryReportService.groovy

    r668 r669  
    199199                    'left join fetch inventoryItem.inventoryLocation as inventoryLocation',
    200200                    'left join fetch inventoryLocation.inventoryStore as inventoryStore',
    201                     'left join fetch inventoryItem.unitOfMeasure as unitOfMeasure',
    202                     'left join fetch inventoryItem.picture as picture',
    203                     'left join fetch picture.images as Image'
     201                    'left join fetch inventoryItem.unitOfMeasure as unitOfMeasure'
    204202            where 'inventoryItem.isActive = true'
    205203                namedParams.siteId = result.site.id
     
    226224                break
    227225            }
    228             result.inventoryItemTotalValue += inventoryItem.estimatedUnitPriceAmount * inventoryItem.unitsInStock
     226            if(inventoryItem.estimatedUnitPriceAmount && inventoryItem.unitsInStock) // Some items have null estimatedUnitPriceAmount.
     227                result.inventoryItemTotalValue += inventoryItem.estimatedUnitPriceAmount * inventoryItem.unitsInStock
    229228        } // for
    230229
Note: See TracChangeset for help on using the changeset viewer.