gumroad icon indicating copy to clipboard operation
gumroad copied to clipboard

Include buyer tax ID in India sales report

Open yashranaway opened this issue 4 weeks ago • 0 comments

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

  1. Generate India sales report for any month
  2. Observe that purchases with buyer Tax IDs are completely excluded from the CSV
  3. 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

yashranaway avatar Dec 02 '25 12:12 yashranaway