Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(amazon): handle invoices with no per-shipment details #37

Merged
merged 1 commit into from
Oct 14, 2019

Conversation

jktomer
Copy link
Contributor

@jktomer jktomer commented Oct 12, 2019

Amazon has recently changed their invoice format to remove the per-shipment
totals tables (see issue #26 ). This change loosens parsing to handle such
invoices, without breaking parsing of older invoices.

Pre-tax adjustments and sales tax, if not present in the shipment tables, are
added at the per-invoice level instead. If there is only one shipment in the
transaction, they continue to be grouped with the lone shipment; otherwise,
like unrecognized post-tax adjustments, each is ungrouped.

Amazon has recently changed their invoice format to remove the per-shipment
totals tables (see issue jbms#26). This change loosens parsing to handle such
invoices, without breaking parsing of older invoices.

Pre-tax adjustments and sales tax, if not present in the shipment tables, are
added at the per-invoice level instead. If there is only one shipment in the
transaction, they continue to be grouped with the lone shipment; otherwise,
like unrecognized post-tax adjustments, each is ungrouped.
@coveralls
Copy link

coveralls commented Oct 12, 2019

Pull Request Test Coverage Report for Build 108

  • 26 of 29 (89.66%) changed or added relevant lines in 2 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 66.257%

Changes Missing Coverage Covered Lines Changed/Added Lines %
beancount_import/source/amazon.py 10 11 90.91%
beancount_import/source/amazon_invoice.py 16 18 88.89%
Files with Coverage Reduction New Missed Lines %
beancount_import/source/amazon_invoice.py 4 85.62%
Totals Coverage Status
Change from base Build 107: 0.2%
Covered Lines: 8810
Relevant Lines: 12918

💛 - Coveralls

@jbms jbms merged commit 84463fc into jbms:master Oct 14, 2019
@jbms
Copy link
Owner

jbms commented Oct 14, 2019

Thanks for fixing this!

@jktomer jktomer deleted the amazon-gutted-invoices branch January 8, 2024 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants