Changeset - e144ebf41d69
[Not reviewed]
0 1 0
Christopher Neugebauer - 4 years ago 2017-10-31 17:34:26
_@chrisjrn.com
Update nbpy_tags.py

Fixes donation amount
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
pinaxcon/templatetags/nbpy_tags.py
Show inline comments
...
 
@@ -31,14 +31,14 @@ def donation_income(context, invoice):
 
        if line.product.category.name == "Ticket":
 
            if line.product.name.startswith("Unaffiliated Individual"):
 
                # Includes full price & discounts
 
                rbi.append(line.total_price * fsa_rate)
 
            else:
 
                if line.total_price > 0:
 
                    rbi.append(rbi_full_ticket)
 
                elif line.total_price < 0:
 
                    rbi.append(rbi_early_bird_discount)
 
        elif line.product.category.name == "T-Shirt":
 
            rbi.append(line.total_price * fsa_rate)
 

	
 
    donation = (invoice.value - sum(rbi))
 
    donation = max(Decimal('0'), (invoice.value - sum(rbi)))
 
    return donation.quantize(Decimal('.01'))
0 comments (0 inline, 0 general)