nbpy2017: Handle one-off "Sept." abbreviation in invoices.
This commit is contained in:
parent
8d5e63ba3d
commit
4df5748a4f
3 changed files with 9 additions and 9 deletions
|
@ -63,7 +63,7 @@ class Invoice2017:
|
||||||
self.actions
|
self.actions
|
||||||
|
|
||||||
def _strpdate(self, s):
|
def _strpdate(self, s):
|
||||||
date_s = strparse.rejoin_slice_words(s, slice(2), ',', 2)
|
date_s = strparse.rejoin_slice_words(s, slice(2), ',', 2).replace('Sept.', 'Sep.')
|
||||||
return strparse.date(date_s, '%b. %d, %Y')
|
return strparse.date(date_s, '%b. %d, %Y')
|
||||||
|
|
||||||
def _read_invoice_header(self, table, first_row_text, rows_text):
|
def _read_invoice_header(self, table, first_row_text, rows_text):
|
||||||
|
|
|
@ -237,7 +237,7 @@
|
||||||
expect:
|
expect:
|
||||||
- payee: Python Person C
|
- payee: Python Person C
|
||||||
ledger template: nbpy2017 invoice ledger entry
|
ledger template: nbpy2017 invoice ledger entry
|
||||||
date: !!python/object/apply:datetime.date [2017, 10, 5]
|
date: !!python/object/apply:datetime.date [2017, 9, 5]
|
||||||
amount: !!python/object/apply:decimal.Decimal ["55.00"]
|
amount: !!python/object/apply:decimal.Decimal ["55.00"]
|
||||||
tickets_sold: !!python/object/apply:decimal.Decimal ["1"]
|
tickets_sold: !!python/object/apply:decimal.Decimal ["1"]
|
||||||
ticket_rate: !!python/object/apply:decimal.Decimal ["21.25"]
|
ticket_rate: !!python/object/apply:decimal.Decimal ["21.25"]
|
||||||
|
@ -245,11 +245,11 @@
|
||||||
shirt_rate: !!python/object/apply:decimal.Decimal ["25.50"]
|
shirt_rate: !!python/object/apply:decimal.Decimal ["25.50"]
|
||||||
status: Invoice
|
status: Invoice
|
||||||
currency: USD
|
currency: USD
|
||||||
invoice_date: !!python/object/apply:datetime.date [2017, 10, 5]
|
invoice_date: !!python/object/apply:datetime.date [2017, 9, 5]
|
||||||
invoice_id: "11"
|
invoice_id: "11"
|
||||||
- payee: Python Person C
|
- payee: Python Person C
|
||||||
ledger template: nbpy2017 payment ledger entry
|
ledger template: nbpy2017 payment ledger entry
|
||||||
date: !!python/object/apply:datetime.date [2017, 10, 5]
|
date: !!python/object/apply:datetime.date [2017, 9, 5]
|
||||||
amount: !!python/object/apply:decimal.Decimal ["55.00"]
|
amount: !!python/object/apply:decimal.Decimal ["55.00"]
|
||||||
tickets_sold: !!python/object/apply:decimal.Decimal ["1"]
|
tickets_sold: !!python/object/apply:decimal.Decimal ["1"]
|
||||||
ticket_rate: !!python/object/apply:decimal.Decimal ["21.25"]
|
ticket_rate: !!python/object/apply:decimal.Decimal ["21.25"]
|
||||||
|
@ -257,7 +257,7 @@
|
||||||
shirt_rate: !!python/object/apply:decimal.Decimal ["25.50"]
|
shirt_rate: !!python/object/apply:decimal.Decimal ["25.50"]
|
||||||
status: Payment
|
status: Payment
|
||||||
currency: USD
|
currency: USD
|
||||||
invoice_date: !!python/object/apply:datetime.date [2017, 10, 5]
|
invoice_date: !!python/object/apply:datetime.date [2017, 9, 5]
|
||||||
payment_id: ch_daer0ahwoh9oDeiqu2eimoD7
|
payment_id: ch_daer0ahwoh9oDeiqu2eimoD7
|
||||||
stripe_id: ch_daer0ahwoh9oDeiqu2eimoD7
|
stripe_id: ch_daer0ahwoh9oDeiqu2eimoD7
|
||||||
invoice_id: "11"
|
invoice_id: "11"
|
||||||
|
|
|
@ -155,8 +155,8 @@
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tr><th>Number</th><td> 11</td></tr>
|
<tr><th>Number</th><td> 11</td></tr>
|
||||||
<tr><th>Status</th><td> Refunded</td></tr>
|
<tr><th>Status</th><td> Refunded</td></tr>
|
||||||
<tr><th>Issue date</th><td> Oct. 5, 2017</td></tr>
|
<tr><th>Issue date</th><td> Sept. 5, 2017</td></tr>
|
||||||
<tr><th>Due</th><td> Oct. 6, 2017, 9:09 p.m.</td></tr>
|
<tr><th>Due</th><td> Sept. 6, 2017, 9:09 p.m.</td></tr>
|
||||||
<tr><th>Recipient</th><td> Python Person C<br />Anycountry</td></tr>
|
<tr><th>Recipient</th><td> Python Person C<br />Anycountry</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
@ -225,12 +225,12 @@
|
||||||
<th>Amount</th>
|
<th>Amount</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Oct. 5, 2017, 9:14 p.m.</td>
|
<td>Sept. 5, 2017, 9:14 p.m.</td>
|
||||||
<td>Paid with Stripe reference: ch_daer0ahwoh9oDeiqu2eimoD7</td>
|
<td>Paid with Stripe reference: ch_daer0ahwoh9oDeiqu2eimoD7</td>
|
||||||
<td>55.00</td>
|
<td>55.00</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Oct. 8, 2017, 3:20 p.m.</td>
|
<td>Sept. 8, 2017, 3:20 p.m.</td>
|
||||||
<td>Generated credit note 31</td>
|
<td>Generated credit note 31</td>
|
||||||
<td>-55.00</td>
|
<td>-55.00</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in a new issue