[billreminder] Handle the format for paid bills (i.e. strike through amount in the viewer)



commit 22d6f702a49ce90ed398da5ff2e3c556303e37c7
Author: Og B. Maciel <ogmaciel gnome org>
Date:   Tue Sep 29 12:50:16 2009 -0400

    Handle the format for paid bills (i.e. strike through amount in the viewer)

 src/gui/maindialog.py       |    2 +-
 src/gui/widgets/viewbill.py |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/maindialog.py b/src/gui/maindialog.py
index c7ce655..4e896ac 100644
--- a/src/gui/maindialog.py
+++ b/src/gui/maindialog.py
@@ -280,7 +280,7 @@ class MainDialog:
             row.dueDate.strftime(_('%m/%d').encode('ASCII')),
             row.amount,
             row.notes,
-            row.paid,
+            int(row.paid),
             None
         ]
 
diff --git a/src/gui/widgets/viewbill.py b/src/gui/widgets/viewbill.py
index 086b941..41237f6 100644
--- a/src/gui/widgets/viewbill.py
+++ b/src/gui/widgets/viewbill.py
@@ -52,7 +52,7 @@ class ViewBill(GenericListView):
         paid = model.get_value(iter, 7)
         amountDue = len(amountDue) > 0 and amountDue or 0
         amountDue = utils.float_to_currency(float(amountDue))
-        if paid:
+        if int(paid):
             amountDue = "<s>%s</s>" % amountDue
         cell.set_property('markup', amountDue)
         cell.set_property('xalign', 1.0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]