nbpy2017: Actually count the quantity listed on invoices.
This commit is contained in:
parent
a135e71a4a
commit
ba3b9ef93c
3 changed files with 13 additions and 13 deletions
|
@ -88,9 +88,9 @@ class Invoice2017:
|
|||
self.amount += total
|
||||
if description.startswith('Ticket - '):
|
||||
if total > 0:
|
||||
self.tickets_sold += 1
|
||||
self.tickets_sold += int(qty)
|
||||
elif description.startswith('T-Shirt - '):
|
||||
self.shirts_sold += 1
|
||||
self.shirts_sold += int(qty)
|
||||
elif description.startswith('Early Bird ('):
|
||||
self.ticket_rate = self.DISCOUNT_TICKET_RATE
|
||||
|
||||
|
|
|
@ -238,10 +238,10 @@
|
|||
- payee: Python Person C
|
||||
ledger template: nbpy2017 invoice ledger entry
|
||||
date: !!python/object/apply:datetime.date [2017, 9, 5]
|
||||
amount: !!python/object/apply:decimal.Decimal ["30.00"]
|
||||
amount: !!python/object/apply:decimal.Decimal ["60.00"]
|
||||
tickets_sold: !!python/object/apply:decimal.Decimal ["0"]
|
||||
ticket_rate: !!python/object/apply:decimal.Decimal ["42.50"]
|
||||
shirts_sold: !!python/object/apply:decimal.Decimal ["1"]
|
||||
shirts_sold: !!python/object/apply:decimal.Decimal ["2"]
|
||||
shirt_rate: !!python/object/apply:decimal.Decimal ["25.50"]
|
||||
status: Invoice
|
||||
currency: USD
|
||||
|
@ -250,10 +250,10 @@
|
|||
- payee: Python Person C
|
||||
ledger template: nbpy2017 payment ledger entry
|
||||
date: !!python/object/apply:datetime.date [2017, 9, 5]
|
||||
amount: !!python/object/apply:decimal.Decimal ["30.00"]
|
||||
amount: !!python/object/apply:decimal.Decimal ["60.00"]
|
||||
tickets_sold: !!python/object/apply:decimal.Decimal ["0"]
|
||||
ticket_rate: !!python/object/apply:decimal.Decimal ["42.50"]
|
||||
shirts_sold: !!python/object/apply:decimal.Decimal ["1"]
|
||||
shirts_sold: !!python/object/apply:decimal.Decimal ["2"]
|
||||
shirt_rate: !!python/object/apply:decimal.Decimal ["25.50"]
|
||||
status: Payment
|
||||
currency: USD
|
||||
|
|
|
@ -179,9 +179,9 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>T-Shirt - Men's/Straight Cut Size M</td>
|
||||
<td class="text-right">1</td>
|
||||
<td class="text-right">$30.00</td>
|
||||
<td class="text-right">2</td>
|
||||
<td class="text-right">$30.00</td>
|
||||
<td class="text-right">$60.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tutorials - Notify me when tutorials are open</td>
|
||||
|
@ -191,11 +191,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th colspan="3">TOTAL</th>
|
||||
<td class="text-right">$30.00</td>
|
||||
<td class="text-right">$60.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Includes donation eligible for tax deduction in the USA:</td>
|
||||
<td class="text-right">$4.25</td>
|
||||
<td class="text-right">$9.00</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -210,7 +210,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Balance due:</td>
|
||||
<td class="text-right">$30.00</td>
|
||||
<td class="text-right">$60.00</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -227,12 +227,12 @@
|
|||
<tr>
|
||||
<td>Sept. 5, 2017, 9:14 p.m.</td>
|
||||
<td>Paid with Stripe reference: ch_daer0ahwoh9oDeiqu2eimoD7</td>
|
||||
<td>30.00</td>
|
||||
<td>60.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sept. 8, 2017, 3:20 p.m.</td>
|
||||
<td>Generated credit note 31</td>
|
||||
<td>-30.00</td>
|
||||
<td>-60.00</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue