From 3d6dea1f73919d5298796848363d5eb1607f0865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0imerda?= Date: Fri, 3 Feb 2012 18:57:58 +0100 Subject: [PATCH] Minor fixes. --- lib/invoice/db/companies.py | 2 +- lib/invoice/db/invoices.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/invoice/db/companies.py b/lib/invoice/db/companies.py index 49e7d36..f75d6cc 100644 --- a/lib/invoice/db/companies.py +++ b/lib/invoice/db/companies.py @@ -20,7 +20,7 @@ class Companies(List): _directory = "companies" _regex = re.compile("^(?P[a-z0-9-]+)$") _template = "{name}" - _data_template = """\ + data_template = """\ Name: Address: Address: diff --git a/lib/invoice/db/invoices.py b/lib/invoice/db/invoices.py index 0a43bf9..5340091 100644 --- a/lib/invoice/db/invoices.py +++ b/lib/invoice/db/invoices.py @@ -59,10 +59,10 @@ class Invoice(Item): self._selector["number"] = int(self.number) class InvoiceData(Data): - _fields = ["payment"] + _fields = ["due", "paid", "payment"] _multivalue_fields = ["item", "address", "note"] _date_regex = re.compile(r"^(\d{4})-?(\d{2})-?(\d{2})$") - _item_regex = re.compile(r"^(\d+)[:;]\s*(.*)$") + _item_regex = re.compile(r"^(-?\d+)[:;]\s*(.*)$") _number_template = "{year}{number:03}" def _parse_date(self, date):