nbpy2017: Rename _RATE constants to _RBI.

This is a nonfunctional change that's just meant to better document
what these values actually represent.
This commit is contained in:
Brett Smith 2018-09-28 08:34:47 -04:00
parent ba3b9ef93c
commit 69efec1888

View file

@ -10,10 +10,10 @@ STATUS_PAID = 'Payment'
STATUS_REFUNDED = 'Refund' STATUS_REFUNDED = 'Refund'
class Invoice2017: class Invoice2017:
STANDARD_TICKET_RATE = decimal.Decimal('42.50') STANDARD_TICKET_RBI = decimal.Decimal('42.50')
DISCOUNT_TICKET_RATE = STANDARD_TICKET_RATE / 2 DISCOUNT_TICKET_RBI = STANDARD_TICKET_RBI / 2
STANDARD_SHIRT_RATE = decimal.Decimal('25.50') STANDARD_SHIRT_RBI = decimal.Decimal('25.50')
DISCOUNT_SHIRT_RATE = STANDARD_SHIRT_RATE DISCOUNT_SHIRT_RBI = STANDARD_SHIRT_RBI
CURRENCY = 'USD' CURRENCY = 'USD'
@classmethod @classmethod
@ -78,9 +78,9 @@ class Invoice2017:
def _read_invoice_items(self, table, first_row_text, rows_text): def _read_invoice_items(self, table, first_row_text, rows_text):
self.amount = decimal.Decimal(0) self.amount = decimal.Decimal(0)
self.tickets_sold = decimal.Decimal(0) self.tickets_sold = decimal.Decimal(0)
self.ticket_rate = self.STANDARD_TICKET_RATE self.ticket_rate = self.STANDARD_TICKET_RBI
self.shirts_sold = decimal.Decimal(0) self.shirts_sold = decimal.Decimal(0)
self.shirt_rate = self.STANDARD_SHIRT_RATE self.shirt_rate = self.STANDARD_SHIRT_RBI
for description, qty, unit_price, total in rows_text: for description, qty, unit_price, total in rows_text:
if qty is None: if qty is None:
continue continue
@ -92,7 +92,7 @@ class Invoice2017:
elif description.startswith('T-Shirt - '): elif description.startswith('T-Shirt - '):
self.shirts_sold += int(qty) self.shirts_sold += int(qty)
elif description.startswith('Early Bird ('): elif description.startswith('Early Bird ('):
self.ticket_rate = self.DISCOUNT_TICKET_RATE self.ticket_rate = self.DISCOUNT_TICKET_RBI
def _read_invoice_activity(self, table, first_row_text, rows_text): def _read_invoice_activity(self, table, first_row_text, rows_text):
self.actions = [{ self.actions = [{