Sfoglia il codice sorgente

Minor fixes.

master
Pavel Šimerda 9 anni fa
parent
commit
3d6dea1f73
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +1
    -1
      lib/invoice/db/companies.py
  2. +2
    -2
      lib/invoice/db/invoices.py

+ 1
- 1
lib/invoice/db/companies.py Vedi File

@@ -20,7 +20,7 @@ class Companies(List):
_directory = "companies"
_regex = re.compile("^(?P<name>[a-z0-9-]+)$")
_template = "{name}"
_data_template = """\
data_template = """\
Name:
Address:
Address:


+ 2
- 2
lib/invoice/db/invoices.py Vedi File

@@ -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):


Loading…
Annulla
Salva