Skip to content

Commit a741608

Browse files
author
sedrubal
committed
Merge branch 'development' into support-mail-config
2 parents e6ec98d + 174cff8 commit a741608

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

FabLabKasse/kassenbuch.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,14 +581,22 @@ def store(self, cur):
581581
return self.id
582582

583583
def _load_buchungen(self, cur):
584+
"""loads all transactions of a client (by id) and discards current transactions
585+
586+
This function loads all transactions of a client. The id of the client is specified in
587+
:py:attr:`FabLabKasse.kassenbuch.Kunde.id`. It discards the content of
588+
:py:attr:`FabLabKasse.kassenbuch.Kunde.buchungen`.
589+
:param cur: sqlite cursor to database
590+
:type cur: sqlite3.Cursor
591+
"""
592+
self.buchungen = []
593+
584594
if self.id is None:
585-
self.buchungen = []
586595
return
587596

588597
cur.execute("SELECT id, datum, kunde, rechnung, betrag, kommentar FROM kundenbuchung " +
589598
"WHERE kunde=? ORDER BY id ASC", (self.id,))
590599

591-
self.buchunge = []
592600
for row in cur:
593601
self.buchungen.append(Kundenbuchung.load_from_row(row))
594602

0 commit comments

Comments
 (0)