diff --git a/import2ledger/importers/nbpy2017.py b/import2ledger/importers/nbpy2017.py index 71686f499c397ac01c81d132ece3ce0c3cd05737..f861d2f7db20af8a53a6f9ffbcb96a2b37205067 100644 --- a/import2ledger/importers/nbpy2017.py +++ b/import2ledger/importers/nbpy2017.py @@ -89,10 +89,12 @@ class Invoice2017: if description.startswith('Ticket - '): if total > 0: self.tickets_sold += int(qty) - elif description.startswith('T-Shirt - '): - self.shirts_sold += int(qty) elif description.startswith('Early Bird ('): self.ticket_rate = self.DISCOUNT_TICKET_RBI + elif description.startswith('T-Shirt - '): + self.shirts_sold += int(qty) + elif description.startswith('T-shirts complimentary '): + self.shirts_sold -= int(qty) def _read_invoice_activity(self, table, first_row_text, rows_text): self.actions = [{ diff --git a/tests/data/nbpy2017c.html b/tests/data/nbpy2017c.html index 1c9446b8f09d55b316b7843d8d2b68b9491ff7de..4c5410212fd660e9167499f743d8e443a7e2beca 100644 --- a/tests/data/nbpy2017c.html +++ b/tests/data/nbpy2017c.html @@ -179,9 +179,9 @@ T-Shirt - Men's/Straight Cut Size M - 2 + 3 $30.00 - $60.00 + $90.00 Tutorials - Notify me when tutorials are open @@ -189,6 +189,12 @@ $-0.00 $-0.00 + + T-shirts complimentary for staff and volunteers (T-Shirt - Men's/Straight Cut Size M) + 1 + $-30.00 + $-30.00 + TOTAL $60.00