<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>beancounter/evolutions/employee_rate_digits.sql</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,4 +3,5 @@ SEQUENCE = [
     'blank_fields',
     'delete_bid',
     'prune_project_fields',
-]
\ No newline at end of file
+    'employee_rate_digits',
+]</diff>
      <filename>beancounter/evolutions/__init__.py</filename>
    </modified>
    <modified>
      <diff>@@ -88,7 +88,7 @@ class Employee(Person):
     payment_preference = models.CharField(blank=True, max_length=100, choices=PAYMENT_CHOICES)
     payment_notes = models.TextField(blank=True)
     contract = models.DateField(blank=True, null=True, help_text=&quot;Date contractor contract was signed and received.&quot;)
-    hourly_rate = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True, help_text=&quot;If rate varies, enter average and note below.&quot;)
+    hourly_rate = models.DecimalField(max_digits=6, decimal_places=2, blank=True, null=True, help_text=&quot;If rate varies, enter average and note below.&quot;)
     currency = models.CharField(default=&quot;USD&quot;, max_length=3)
     rate_notes = models.TextField(blank=True, help_text=&quot;Additional notes regarding contractor rates.&quot;)
 
@@ -115,6 +115,9 @@ class Project(models.Model):
     name = models.CharField(max_length=100)
     active = models.BooleanField(default=True)
 
+    class Meta:
+        ordering = ['-active', 'name']
+
     def __unicode__(self):
         return self.name
         
@@ -129,7 +132,9 @@ class Project(models.Model):
         #TODO aggregate support
         total = decimal.Decimal(&quot;0.00&quot;)
         for time in self.projecttime_set.all():
-            total += time.cost_converted
+           #this test should be in the filter above 
+           if time.cost_converted:
+                total += time.cost_converted
         return total
     
     def profit(self):
@@ -163,6 +168,9 @@ class ProjectTime(models.Model):
     cost = models.DecimalField(max_digits=9, decimal_places=2, blank=True, null=True, help_text=&quot;Leave blank to automatically calculate&quot;)
     cost_converted = models.DecimalField(max_digits=9, decimal_places=2, blank=True, null=True, help_text=&quot;Cost converted to local currency&quot;)
 
+    class Meta:
+        ordering = ['-start_date', 'project']
+
     def __unicode__(self):
         return &quot;%s on %s (%s-%s)&quot; % (self.employee, self.project, self.start_date, self.end_date)
     </diff>
      <filename>beancounter/models.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6c137a80987b22697ab69e50259db3fb3b7df252</id>
    </parent>
    <parent>
      <id>736b627c337fdc2cab41f45375fd4eecbdd55526</id>
    </parent>
  </parents>
  <author>
    <name>Peter Baumgartner</name>
    <email>pete@lincolnloop.com</email>
  </author>
  <url>http://github.com/lincolnloop/django-beancounter/commit/f9cc966d21db76a88a2d5e13c2f8a0c752841fe7</url>
  <id>f9cc966d21db76a88a2d5e13c2f8a0c752841fe7</id>
  <committed-date>2009-04-22T21:03:29-07:00</committed-date>
  <authored-date>2009-04-22T21:03:29-07:00</authored-date>
  <message>Merge branch 'master' of git@github.com:lincolnloop/django-beancounter</message>
  <tree>4d25ff1a37d57be50ed65f778ffeff4184ff5b64</tree>
  <committer>
    <name>Peter Baumgartner</name>
    <email>pete@lincolnloop.com</email>
  </committer>
</commit>
