gumroad
gumroad copied to clipboard
Include buyer tax ID in India sales report
Fixes #2183
Problem
The India sales report currently excludes purchases where buyers have provided a Tax ID (business_vat_id). This means these purchases are completely missing from the monthly sales reports, creating incomplete tax reporting data.
This exclusion happens at the query level in CreateIndiaSalesReportJob, where purchases with a business_vat_id are filtered out.
Current Behavior
- Generate India sales report for any month
- Observe that purchases with buyer Tax IDs are completely excluded from the CSV
- Report is incomplete for tax compliance purposes
Root Cause Analysis
https://github.com/antiwork/gumroad/blob/98d444594bd4562319f92b5c86746b1603a44076/app/sidekiq/create_india_sales_report_job.rb#L45
The query explicitly filters out purchases with business_vat_id:
.where("purchase_sales_tax_infos.business_vat_id IS NULL OR purchase_sales_tax_infos.business_vat_id = ''")
AI Disclosure
No AI was used for any part of this contribution.
Confirmation
I have watched the Gumroad PR reviews live streaming video