Index: trunk/grails-app/controllers/AssetTypeController.groovy
===================================================================
--- trunk/grails-app/controllers/AssetTypeController.groovy	(revision 159)
+++ trunk/grails-app/controllers/AssetTypeController.groovy	(revision 160)
@@ -27,5 +27,5 @@
         if(assetTypeInstance) {
             try {
-                assetTypeInstance.delete()
+                assetTypeInstance.delete(flush:true)
                 flash.message = "AssetType ${params.id} deleted"
                 redirect(action:list)
@@ -77,5 +77,5 @@
         else {
             flash.message = "AssetType not found with id ${params.id}"
-            redirect(action:edit,id:params.id)
+            redirect(action:list)
         }
     }
Index: trunk/grails-app/domain/AssetType.groovy
===================================================================
--- trunk/grails-app/domain/AssetType.groovy	(revision 159)
+++ trunk/grails-app/domain/AssetType.groovy	(revision 160)
@@ -3,4 +3,5 @@
     String name
     String description = ""
+    String costCode = ""
     boolean isActive = true
 
Index: trunk/grails-app/views/assetType/create.gsp
===================================================================
--- trunk/grails-app/views/assetType/create.gsp	(revision 159)
+++ trunk/grails-app/views/assetType/create.gsp	(revision 160)
@@ -26,4 +26,13 @@
                     <table>
                         <tbody>
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="costCode">Cost Code:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'costCode','errors')}">
+                                    <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:assetTypeInstance,field:'costCode')}"/>
+                                </td>
+                            </tr> 
                         
                             <tr class="prop">
Index: trunk/grails-app/views/assetType/edit.gsp
===================================================================
--- trunk/grails-app/views/assetType/edit.gsp	(revision 159)
+++ trunk/grails-app/views/assetType/edit.gsp	(revision 160)
@@ -64,4 +64,13 @@
                             <tr class="prop">
                                 <td valign="top" class="name">
+                                    <label for="costCode">Cost Code:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'costCode','errors')}">
+                                    <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:assetTypeInstance,field:'costCode')}"/>
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
                                     <label for="description">Description:</label>
                                 </td>
Index: trunk/grails-app/views/assetType/list.gsp
===================================================================
--- trunk/grails-app/views/assetType/list.gsp	(revision 159)
+++ trunk/grails-app/views/assetType/list.gsp	(revision 160)
@@ -24,4 +24,6 @@
                    	        <g:sortableColumn property="id" title="Id" />
                         
+                   	        <g:sortableColumn property="costCode" title="Cost Code" />
+                        
                    	        <g:sortableColumn property="description" title="Description" />
                         
@@ -37,4 +39,6 @@
                         
                             <td><g:link action="show" id="${assetTypeInstance.id}">${fieldValue(bean:assetTypeInstance, field:'id')}</g:link></td>
+                        
+                            <td>${fieldValue(bean:assetTypeInstance, field:'costCode')}</td>
                         
                             <td>${fieldValue(bean:assetTypeInstance, field:'description')}</td>
Index: trunk/grails-app/views/assetType/show.gsp
===================================================================
--- trunk/grails-app/views/assetType/show.gsp	(revision 159)
+++ trunk/grails-app/views/assetType/show.gsp	(revision 160)
@@ -57,4 +57,11 @@
                     
                         <tr class="prop">
+                            <td valign="top" class="name">Cost Code:</td>
+                            
+                            <td valign="top" class="value">${fieldValue(bean:assetTypeInstance, field:'costCode')}</td>
+                            
+                        </tr>
+                    
+                        <tr class="prop">
                             <td valign="top" class="name">Description:</td>
                             
