Browse Source

Minor fix on invoices templates

Fabs 10 years ago
parent
commit
16212c98ec

+ 1 - 1
coin/billing/models.py

@@ -73,7 +73,7 @@ class Invoice(models.Model):
 
     def has_owner(self, username):
         "Check if passed username (ex gmajax) is owner of the invoice"
-        return (self.username == username)
+        return (self.member.username == username)
 
     def __unicode__(self):
         return u'#%s %0.2f€ %s' % (self.number, self.amount(), self.date_due)

+ 1 - 1
coin/billing/templates/billing/invoice.html

@@ -7,7 +7,7 @@
         <p>Émise le {{ invoice.date }}</p>
     </div>
     <div class="large-4 columns">
-        <a href="{% url 'billing:invoice_pdf' id=invoice.number %}" target="_blank" class="button">Télécharger en PDF</a>
+        <a href="{% url 'billing:invoice_pdf' id=invoice.number %}" target="_blank" class="button expand"><i class="fa fa-file-pdf-o"></i> Télécharger en PDF</a>
     </div>
 </div>
 

+ 1 - 1
coin/members/templates/members/invoices.html

@@ -20,7 +20,7 @@
             <td>{{ invoice.date }}</td>
             <td>{{ invoice.amount }}</td>
             <td{% if invoice.amount_remaining_to_pay > 0 %} class="unpaid"{% endif %}>{{ invoice.amount_remaining_to_pay }}</td>
-            <td><a href="{% url 'billing:invoice_pdf' id=invoice.number %}">PDF</a></td>
+            <td><a href="{% url 'billing:invoice_pdf' id=invoice.number %}"><i class="fa fa-file-pdf-o"></i> PDF</a></td>
         </tr>
         {% endfor %}
     </tbody>