Changeset - 7bb5815b08bc
[Not reviewed]
0 2 0
Brett Smith - 6 years ago 2018-09-28 12:47:02
brettcsmith@brettcsmith.org
nbpy2017: Handle complimentary t-shirts.
2 files changed with 12 insertions and 4 deletions:
0 comments (0 inline, 0 general)
import2ledger/importers/nbpy2017.py
Show inline comments
...
 
@@ -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 = [{
tests/data/nbpy2017c.html
Show inline comments
...
 
@@ -179,9 +179,9 @@
 
          </tr>
 
          <tr>
 
            <td>T-Shirt - Men&#39;s/Straight Cut Size M</td>
 
            <td class="text-right">2</td>
 
            <td class="text-right">3</td>
 
            <td class="text-right">$30.00</td>
 
            <td class="text-right">$60.00</td>
 
            <td class="text-right">$90.00</td>
 
          </tr>
 
          <tr>
 
            <td>Tutorials - Notify me when tutorials are open</td>
...
 
@@ -189,6 +189,12 @@
 
            <td class="text-right">$-0.00</td>
 
            <td class="text-right">$-0.00</td>
 
          </tr>
 
          <tr>
 
            <td>T-shirts complimentary for staff and volunteers (T-Shirt - Men&#39;s/Straight Cut Size M)</td>
 
            <td class="text-right">1</td>
 
            <td class="text-right">$-30.00</td>
 
            <td class="text-right">$-30.00</td>
 
          </tr>
 
        <tr>
 
          <th colspan="3">TOTAL</th>
 
          <td class="text-right">$60.00</td>
0 comments (0 inline, 0 general)