Index: trunk/grails-app/services/InventoryCsvService.groovy
===================================================================
--- trunk/grails-app/services/InventoryCsvService.groovy	(revision 425)
+++ trunk/grails-app/services/InventoryCsvService.groovy	(revision 426)
@@ -27,5 +27,5 @@
 
             def kByteMultiplier = 1000
-            def fileMaxSize = 500 * kByteMultiplier
+            def fileMaxSize = 800 * kByteMultiplier
             def logFileLink = g.link(controller: "appCore", action: "appLog") {"log"}
 
@@ -82,6 +82,10 @@
 
             def tempSuppliers = []
+            def tempSupplierItem = ''
+            def tempSupplierType = ''
             def tempSupplierItemAndType = []
             def tempManufacturers = []
+            def tempManufacturerItem = ''
+            def tempManufacturerType = ''
             def tempManufacturerItemAndType = []
 
@@ -113,5 +117,5 @@
 
             def parseInputList = {
-                if(it.trim() == '') return []
+                if( (it == null) || (it.trim() == '') ) return []
                 return it.split(";").collect{it.trim()}
             }
@@ -160,5 +164,4 @@
 
                 // Parse the line into the params map.
-                /** TODO: capitalize and capitalizeFully.*/
                 inventoryParams = [:]
                 line.eachWithIndex { it, j ->
@@ -180,4 +183,5 @@
 
                 // Site
+                inventoryParams.site = WordUtils.capitalize(inventoryParams.site)
                 siteInstance = Site.findByName(inventoryParams.site)
                 if(!siteInstance) {
@@ -190,4 +194,5 @@
 
                 // InventoryStore
+                inventoryParams.inventoryStore = WordUtils.capitalizeFully(inventoryParams.inventoryStore)
                 inventoryStoreInstance = InventoryStore.findByName(inventoryParams.inventoryStore)
                 if(!inventoryStoreInstance) {
@@ -201,4 +206,5 @@
 
                 // InventoryLocation
+                inventoryParams.inventoryLocation = WordUtils.capitalize(inventoryParams.inventoryLocation)
                 inventoryLocationInstance = InventoryLocation.findByName(inventoryParams.inventoryLocation)
                 if(!inventoryLocationInstance) {
@@ -212,4 +218,5 @@
 
                 // InventoryGroup
+                inventoryParams.inventoryLocation = WordUtils.capitalizeFully(inventoryParams.inventoryLocation)
                 inventoryGroupInstance = InventoryGroup.findByName(inventoryParams.inventoryGroup)
                 if(!inventoryGroupInstance) {
@@ -222,4 +229,5 @@
 
                 // InventoryType
+                inventoryParams.inventoryType = WordUtils.capitalizeFully(inventoryParams.inventoryType)
                 inventoryTypeInstance = InventoryType.findByName(inventoryParams.inventoryType)
                 if(!inventoryTypeInstance) {
@@ -256,11 +264,14 @@
                 for(tempManufacturer in tempManufacturers) {
                     tempManufacturerItemAndType = parseItemAndType(tempManufacturer)
-
-                    manufacturerInstance = Manufacturer.findByName(tempManufacturerItemAndType[0])
+                    tempManufacturerItem = WordUtils.capitalizeFully(tempManufacturerItemAndType[0])
+
+                    manufacturerInstance = Manufacturer.findByName(tempManufacturerItem)
                     if(!manufacturerInstance) {
 
                         // ManufacturerType.
-                        if(tempManufacturerItemAndType.size == 2)
-                            manufacturerTypeInstance = ManufacturerType.findByName(tempManufacturerItemAndType[1])
+                        if(tempManufacturerItemAndType.size == 2) {
+                            tempManufacturerType = WordUtils.capitalizeFully(tempManufacturerItemAndType[1])
+                            manufacturerTypeInstance = ManufacturerType.findByName(tempManufacturerType)
+                        }
                         else
                             manufacturerTypeInstance = manufacturerTypeUnknown
@@ -270,5 +281,5 @@
                         }
 
-                        manufacturerInstance = new Manufacturer(name: tempManufacturerItemAndType[0],
+                        manufacturerInstance = new Manufacturer(name: tempManufacturerItem,
                                                                                                 manufacturerType: manufacturerTypeInstance)
                         if(!manufacturerInstance.save()) {
@@ -287,11 +298,14 @@
                 for(tempSupplier in tempSuppliers) {
                     tempSupplierItemAndType = parseItemAndType(tempSupplier)
-
-                    supplierInstance = Supplier.findByName(tempSupplierItemAndType[0])
+                    tempSupplierItem = WordUtils.capitalizeFully(tempSupplierItemAndType[0])
+
+                    supplierInstance = Supplier.findByName(tempSupplierItem)
                     if(!supplierInstance) {
 
                         // SupplierType.
-                        if(tempSupplierItemAndType.size == 2)
-                            supplierTypeInstance = SupplierType.findByName(tempSupplierItemAndType[1])
+                        if(tempSupplierItemAndType.size == 2) {
+                            tempSupplierType = WordUtils.capitalizeFully(tempSupplierItemAndType[1])
+                            supplierTypeInstance = SupplierType.findByName(tempSupplierType)
+                        }
                         else
                             supplierTypeInstance = supplierTypeUnknown
@@ -301,5 +315,5 @@
                         }
 
-                        supplierInstance = new Supplier(name: tempSupplierItemAndType[0],
+                        supplierInstance = new Supplier(name: tempSupplierItem,
                                                                             supplierType: supplierTypeInstance)
                         if(!supplierInstance.save()) {
@@ -317,5 +331,5 @@
 
                 for(tempAlternateItem in tempAlternateItems) {
-
+                    tempAlternateItem = WordUtils.capitalize(tempAlternateItem)
                     alternateItemInstance = InventoryItem.findByName(tempAlternateItem)
                     if(!alternateItemInstance) {
@@ -342,7 +356,5 @@
                 for(asset in tempSpareFor) {
 
-                    println ''
-                    println 'asset: '+asset
-                    println ''
+                    asset = WordUtils.capitalize(asset)
 
                     spareForInstance = Asset.findByName(asset)
@@ -361,4 +373,8 @@
                 inventoryParams.unitOfMeasure = unitOfMeasureInstance
                 inventoryParams.averageDeliveryPeriod = averageDeliveryPeriodInstance
+
+                // Format remaining properties.
+                inventoryParams.name = WordUtils.capitalize(inventoryParams.name)
+                inventoryParams.description = inventoryParams.description[0].toUpperCase() + inventoryParams.description[1..-1]
 
                 // Debug
