# claude · R2 · run 3
- Model requested: `claude-opus-5-5` · reported: `claude-opus-5-5`
- Started 2026-12-04T18:47:03+05:30 · finished 2026-12-04T18:48:29+05:30 · latency 85 s
- Tokens: {"in": 129100, "out": 8688, "cache_read": 0, "cache_write": 0} · cost estimate $0.690
- System prompt: none · effort: medium
## Prompt
```
Here's our data. Anything I should know?
```
Files attached: invoices.csv, credit_notes.csv, customers.csv, columns_note.txt
## Transcript
Thinking (summary)
I'm starting by looking through the files to see what's there.
**Assistant:**
I'll start by looking at the files.
**Code (bash_code_execution):**
```
cd $INPUT_DIR; ls -la; cat columns_note.txt; for f in *.csv; do echo "== $f"; wc -l $f; head -5 $f; done
```
**Output:**
```
total 1012
drwxr-xr-x 2 root root 4096 Dec 4 13:17 .
drwxr-xr-x 3 root root 4096 Dec 4 13:17 ..
-rw-r--r-- 1 root root 2145 Dec 4 13:17 columns_note.txt
-rw-r--r-- 1 root root 68901 Dec 4 13:17 credit_notes.csv
-rw-r--r-- 1 root root 12809 Dec 4 13:17 customers.csv
-rw-r--r-- 1 root root 935959 Dec 4 13:17 invoices.csv
Indigo Thread Co. - export from the ERP (sales ledger). Three tables, CSV, all history from April 2024 up to 31 Oct 2026.
Amounts are in Indian rupees (INR) unless a column says otherwise.
invoices.csv - one row per sales invoice
invoice_id internal id of the invoice
invoice_no invoice number as printed
invoice_date date of the invoice
customer_id links to customers.customer_id
currency currency the invoice was raised in (INR or EUR)
fx_rate rupees per unit of that currency, used to convert
amount_fc amount in the invoice currency (blank for INR invoices)
net_amount invoice value in INR, before GST
gst_amount GST charged, in INR
gross_amount net_amount + gst_amount
order_ref sales order the invoice was raised against
created_at when the row was entered in the ERP
credit_notes.csv - one row per credit note issued to a customer
cn_id internal id of the credit note
cn_no credit note number
cn_date date of the credit note
invoice_id the invoice it credits (links to invoices.invoice_id)
customer_id links to customers.customer_id
net_amount credit value in INR, before GST (a positive number that reduces revenue)
gst_amount GST reversed, in INR
reason reason recorded for the credit
created_at when the row was entered in the ERP
customers.csv - one row per customer account
customer_id internal id
customer_code customer code
name customer name
region sales region the account is managed under (South, West, East, North, Export)
city customer's city
segment account size band used by sales (key, mid, small)
currency usual invoicing currency
status account status in the ERP (active / inactive)
payment_terms_days agreed payment terms in days
credit_limit credit limit in INR
created_at when the account was created
Net revenue, as the company reports it from these tables: invoice net_amount minus credit note net_amount, by date.
== credit_notes.csv
861 credit_notes.csv
cn_id,cn_no,cn_date,invoice_id,customer_id,net_amount,gst_amount,reason,created_at
1,CN/000001,2024-04-08,5448,50,3874.57,193.73,Quality claim,2024-04-08 16:30:56
2,CN/000002,2024-04-10,5433,142,5507.46,275.37,Return,2024-04-10 15:27:01
3,CN/000003,2024-04-13,5489,6,18492.12,924.61,Rate difference,2024-04-13 14:00:56
4,CN/000004,2024-04-18,5441,143,5035.80,251.79,Quality claim,2024-04-18 16:26:02
== customers.csv
144 customers.csv
customer_id,customer_code,name,region,city,segment,currency,status,payment_terms_days,credit_limit,created_at
1,C0001,Ravira Exports,South,Tiruppur,key,INR,active,30,33600000.00,2023-08-05 17:08:04
2,C0002,Tessora EU,South,Rotterdam,key,EUR,active,45,43700000.00,2021-12-11 17:53:30
3,C0003,Skarfab,South,Aarhus,key,EUR,active,45,22800000.00,2022-05-07 16:51:47
4,C0004,Merai Apparels,West,Mumbai,key,INR,active,30,15600000.00,2022-03-02 17:53:33
== invoices.csv
8773 invoices.csv
invoice_id,invoice_no,invoice_date,customer_id,currency,fx_rate,amount_fc,net_amount,gst_amount,gross_amount,order_ref,created_at
5411,BI/2425/000001,2024-04-01,11,INR,1.0000,,117738.91,5886.95,123625.86,SO-24005358,2024-04-01 18:43:04
5412,BI/2425/000002,2024-04-01,21,EUR,100.6756,3671.50,369630.47,0.00,369630.47,SO-24005296,2024-04-01 17:59:42
5413,BI/2425/000003,2024-04-01,95,INR,1.0000,,67337.59,3366.88,70704.47,SO-24005494,2024-04-01 19:00:03
5414,BI/2425/000004,2024-04-01,99,INR,1.0000,,56480.17,2824.01,59304.18,SO-24005522,2024-04-01 19:02:32
```
Thinking (summary)
I notice Tessora EU is listed in Rotterdam under the South region, which looks like an export mis-assignment. I'll profile the data thoroughly with pandas to check how widespread that is.
**Code (bash_code_execution):**
```
cd $INPUT_DIR; python3 -c "
import pandas as pd
pd.set_option('display.width',250); pd.set_option('display.max_columns',30)
for f in ['invoices','credit_notes','customers']:
d=pd.read_csv(f+'.csv'); print('=====',f,d.shape); print(d.dtypes); print(d.isna().sum()[d.isna().sum()>0]); print(d.describe(include='all').T)
"
```
**Output:**
```
===== invoices (8772, 12)
invoice_id int64
invoice_no object
invoice_date object
customer_id int64
currency object
fx_rate float64
amount_fc float64
net_amount float64
gst_amount float64
gross_amount float64
order_ref object
created_at object
dtype: object
amount_fc 7212
dtype: int64
count unique top freq mean std min 25% 50% 75% max
invoice_id 8772.0 NaN NaN NaN 9796.5 2532.402614 5411.0 7603.75 9796.5 11989.25 14182.0
invoice_no 8772 8772 BI/2627/001928 1 NaN NaN NaN NaN NaN NaN NaN
invoice_date 8772 811 2026-09-29 29 NaN NaN NaN NaN NaN NaN NaN
customer_id 8772.0 NaN NaN NaN 70.849407 44.754645 1.0 27.75 75.0 112.0 143.0
currency 8772 2 INR 7212 NaN NaN NaN NaN NaN NaN NaN
fx_rate 8772.0 NaN NaN NaN 18.562911 37.769525 1.0 1.0 1.0 1.0 102.8432
amount_fc 1560.0 NaN NaN NaN 3537.022244 2932.759183 759.83 2145.01 2721.405 3550.5275 30990.24
net_amount 8772.0 NaN NaN NaN 163185.277644 228008.669113 10049.34 43193.08 66352.17 229870.56 3041255.09
gst_amount 8772.0 NaN NaN NaN 5023.184226 8836.928822 0.0 1484.21 2415.685 4128.52 131677.08
gross_amount 8772.0 NaN NaN NaN 168208.46187 233579.752589 10551.81 45352.7325 69669.78 235524.3425 3041255.09
order_ref 8772 8772 SO-26014338 1 NaN NaN NaN NaN NaN NaN NaN
created_at 8772 8772 2026-10-31 13:46:24 1 NaN NaN NaN NaN NaN NaN NaN
===== credit_notes (860, 9)
cn_id int64
cn_no object
cn_date object
invoice_id int64
customer_id int64
net_amount float64
gst_amount float64
reason object
created_at object
dtype: object
Series([], dtype: int64)
count unique top freq mean std min 25% 50% 75% max
cn_id 860.0 NaN NaN NaN 430.5 248.404911 1.0 215.75 430.5 645.25 860.0
cn_no 860 860 CN/000860 1 NaN NaN NaN NaN NaN NaN NaN
cn_date 860 505 2026-04-06 6 NaN NaN NaN NaN NaN NaN NaN
invoice_id 860.0 NaN NaN NaN 9648.75814 2453.008207 5433.0 7532.0 9547.0 11766.0 14126.0
customer_id 860.0 NaN NaN NaN 67.563953 45.238258 1.0 21.0 67.5 108.25 143.0
net_amount 860.0 NaN NaN NaN 26676.248547 48326.264573 893.05 5973.1825 11135.845 31480.3125 467435.69
gst_amount 860.0 NaN NaN NaN 861.06014 1993.280909 0.0 173.875 382.635 710.455 23371.78
reason 860 3 Return 432 NaN NaN NaN NaN NaN NaN NaN
created_at 860 860 2026-10-30 17:56:11 1 NaN NaN NaN NaN NaN NaN NaN
===== customers (143, 11)
customer_id int64
customer_code object
name object
region object
city object
segment object
currency object
status object
payment_terms_days int64
credit_limit float64
created_at object
dtype: object
Series([], dtype: int64)
count unique top freq mean std min 25% 50% 75% max
customer_id 143.0 NaN NaN NaN 72.0 41.42463 1.0 36.5 72.0 107.5 143.0
customer_code 143 143 C0001 1 NaN NaN NaN NaN NaN NaN NaN
name 143 143 Ravira Exports 1 NaN NaN NaN NaN NaN NaN NaN
region 143 5 South 72 NaN NaN NaN NaN NaN NaN NaN
city 143 31 Erode 17 NaN NaN NaN NaN NaN NaN NaN
segment 143 3 mid 72 NaN NaN NaN NaN NaN NaN NaN
currency 143 2 INR 115 NaN NaN NaN NaN NaN NaN NaN
status 143 2 active 140 NaN NaN NaN NaN NaN NaN NaN
payment_terms_days 143.0 NaN NaN NaN 32.937063 5.973199 30.0 30.0 30.0 30.0 45.0
credit_limit 143.0 NaN NaN NaN 5719580.41958 5565490.484203 1200000.0 1550000.0 6000000.0 8700000.0 43700000.0
created_at 143 142 2021-07-02 10:00:34 2 NaN NaN NaN NaN NaN NaN NaN
```
Thinking (summary)
I'm going to run a broad set of validation checks next: data integrity, arithmetic, FX conversion, GST rates, duplicates, date ranges, monthly time series, credit note sequencing and amounts against invoices, customer mismatches, and region consistency with city and currency.
**Assistant:**
Clean at a glance: no nulls except the expected blank `amount_fc`. Now the integrity and arithmetic checks.
**Code (bash_code_execution):**
```
cd $INPUT_DIR; cat > /tmp/a.py <<'EOF'
import pandas as pd, numpy as np
pd.set_option('display.width',250); pd.set_option('display.max_columns',30); pd.set_option('display.max_rows',200)
inv=pd.read_csv('invoices.csv',parse_dates=['invoice_date','created_at'])
cn=pd.read_csv('credit_notes.csv',parse_dates=['cn_date','created_at'])
cu=pd.read_csv('customers.csv',parse_dates=['created_at'])
print('date ranges', inv.invoice_date.min(), inv.invoice_date.max(), cn.cn_date.min(), cn.cn_date.max())
print('inv cust orphan', (~inv.customer_id.isin(cu.customer_id)).sum(), 'cn inv orphan', (~cn.invoice_id.isin(inv.invoice_id)).sum(), 'cn cust orphan',(~cn.customer_id.isin(cu.customer_id)).sum())
m=cn.merge(inv[['invoice_id','customer_id','invoice_date','net_amount','currency']],on='invoice_id',suffixes=('','_inv'))
print('cn cust != inv cust', (m.customer_id!=m.customer_id_inv).sum())
print('cn before invoice', (m.cn_date invoice net', (m.net_amount>m.net_amount_inv+0.01).sum())
tot=m.groupby('invoice_id').net_amount.sum(); ii=inv.set_index('invoice_id').net_amount
print('cum cn > inv', (tot>ii.loc[tot.index]+0.01).sum())
print('gross mismatch', (abs(inv.net_amount+inv.gst_amount-inv.gross_amount)>0.011).sum())
e=inv[inv.currency=='EUR']; print('EUR fx*fc mismatch', (abs(e.fx_rate*e.amount_fc-e.net_amount)>1).sum())
i=inv[inv.currency=='INR']; print('INR fx!=1',(i.fx_rate!=1).sum(),'INR fc nonnull',i.amount_fc.notna().sum())
inv['gst_rate']=(inv.gst_amount/inv.net_amount).round(3); print(inv.groupby('currency').gst_rate.value_counts())
cn['gst_rate']=(cn.gst_amount/cn.net_amount).round(3); print(cn.gst_rate.value_counts())
print(cn.reason.value_counts())
print('created before date inv', (inv.created_at.dt.normalize()7d', ((inv.created_at.dt.normalize()-inv.invoice_date).dt.days>7).sum())
print(((inv.created_at.dt.normalize()-inv.invoice_date).dt.days).describe())
print('cn lag', ((cn.created_at.dt.normalize()-cn.cn_date).dt.days).describe())
# invoice numbering
inv['fy']=inv.invoice_no.str.split('/').str[1]; inv['seq']=inv.invoice_no.str.split('/').str[2].astype(int)
for fy,g in inv.groupby('fy'):
s=g.seq.sort_values(); print(fy, len(g), s.min(), s.max(), 'gaps', s.max()-s.min()+1-len(g), 'dates',g.invoice_date.min().date(),g.invoice_date.max().date())
# fy consistency
def fy(d): y=d.year if d.month>=4 else d.year-1; return f'{y%100:02d}{(y+1)%100:02d}'
print('fy mismatch', (inv.invoice_date.apply(fy)!=inv.fy).sum())
print('id order vs date', (inv.sort_values('invoice_id').invoice_date.diff().dt.days<0).sum())
# duplicates on content
d=inv.duplicated(['customer_id','invoice_date','net_amount'],keep=False); print('dup content', d.sum())
d2=inv.duplicated(['customer_id','net_amount'],keep=False); print('dup cust+amt', d2.sum())
print(inv[d2].sort_values(['customer_id','net_amount']).head(30))
EOF
python3 /tmp/a.py
```
**Output:**
```
date ranges 2024-04-01 00:00:00 2026-10-31 00:00:00 2024-04-08 00:00:00 2026-10-30 00:00:00
inv cust orphan 0 cn inv orphan 0 cn cust orphan 0
cn cust != inv cust 0
cn before invoice 0
cn > invoice net 0
cum cn > inv 0
gross mismatch 0
EUR fx*fc mismatch 0
INR fx!=1 0 INR fc nonnull 0
currency gst_rate
EUR 0.00 1560
INR 0.05 7212
Name: count, dtype: int64
gst_rate
0.05 718
0.00 142
Name: count, dtype: int64
reason
Return 432
Rate difference 241
Quality claim 187
Name: count, dtype: int64
created before date inv 0 lag>7d 0
count 8772.0
mean 0.0
std 0.0
min 0.0
25% 0.0
50% 0.0
75% 0.0
max 0.0
dtype: float64
cn lag count 860.000000
mean 0.018605
std 0.385570
min 0.000000
25% 0.000000
50% 0.000000
75% 0.000000
max 8.000000
dtype: float64
2425 3298 1 3298 gaps 0 dates 2024-04-01 2025-03-31
2526 3546 1 3546 gaps 0 dates 2025-04-01 2026-03-31
2627 1928 1 1928 gaps 0 dates 2026-04-01 2026-10-31
fy mismatch 0
id order vs date 0
dup content 0
dup cust+amt 0
Empty DataFrame
Columns: [invoice_id, invoice_no, invoice_date, customer_id, currency, fx_rate, amount_fc, net_amount, gst_amount, gross_amount, order_ref, created_at, gst_rate, fy, seq]
Index: []
```
Thinking (summary)
Mechanically the data checks out, and the credit note lag tops out at 8 days. Next I'm moving on to the customer side: whether regions line up with cities and currencies, whether invoice currencies match each customer's currency, and whether anyone is invoicing while inactive or before their account was created. I also want monthly trends, the FX rate series, and whether credit notes are backdated around period end.
**Assistant:**
Mechanically very clean. Next: customer master consistency, and trends over time.
**Code (bash_code_execution):**
```
cd $INPUT_DIR; cat > /tmp/b.py <<'EOF'
exec(open('/tmp/a.py').read().split("print('date ranges'")[0])
print(pd.crosstab([cu.city],[cu.region]))
print(pd.crosstab(cu.region,cu.currency)); print(pd.crosstab(cu.segment,cu.payment_terms_days))
print(cu[cu.status!='active'])
m=inv.merge(cu[['customer_id','currency','status','created_at','region','name']],on='customer_id',suffixes=('','_c'))
print('inv currency != cust currency', (m.currency!=m.currency_c).sum())
print('inv before cust created', (m.invoice_date0])
EOF
python3 /tmp/b.py
```
**Output:**
```
region East Export North South West
city
Aarhus 0 0 0 1 0
Ahmedabad 0 0 0 0 5
Antwerp 0 3 0 0 0
Bengaluru 0 0 0 10 0
Bhiwandi 0 0 0 0 2
Bhubaneswar 5 0 0 0 0
Chennai 0 0 0 10 0
Coimbatore 0 0 0 11 0
Delhi 0 0 3 0 0
Erode 0 0 0 17 0
Gothenburg 0 1 0 0 0
Gurugram 0 0 5 0 0
Guwahati 3 0 0 0 0
Hamburg 0 3 0 0 0
Howrah 3 0 0 0 0
Jaipur 0 0 2 0 0
Kochi 0 0 0 5 0
Kolkata 3 0 0 0 0
Ludhiana 0 0 5 0 0
Lyon 0 2 0 0 0
Madurai 0 0 0 4 0
Milan 0 1 0 0 0
Mumbai 0 0 0 0 9
Noida 0 0 4 0 0
Panipat 0 0 2 0 0
Porto 0 1 0 0 0
Pune 0 0 0 0 4
Rotterdam 0 0 0 1 0
Surat 0 0 0 0 2
Tiruppur 0 0 0 13 0
Vapi 0 0 0 0 3
currency EUR INR
region
East 2 12
Export 11 0
North 5 16
South 4 68
West 6 19
payment_terms_days 30 45
segment
key 2 2
mid 46 26
small 67 0
customer_id customer_code name region city segment currency status payment_terms_days credit_limit created_at
140 141 C0141 Bundra Textiles Old North Ludhiana small INR inactive 30 1800000.0 2021-12-11 14:59:54
141 142 C0142 Satvira Exports West Mumbai small INR inactive 30 1800000.0 2022-01-11 09:50:20
142 143 C0143 Kosra Garments East Kolkata small INR inactive 30 1800000.0 2022-02-08 11:57:54
inv currency != cust currency 0
inv before cust created 0
min max count
name
Bundra Textiles Old 2024-04-08 2025-02-14 31
Kosra Garments 2024-04-03 2024-11-20 24
Satvira Exports 2024-04-02 2025-06-30 44
cust w/o invoices 0
cn_id cn_no cn_date invoice_id customer_id net_amount gst_amount reason created_at
851 852 CN/000852 2026-10-23 13720 87 390720.93 19536.05 Return 2026-10-31 18:55:16
852 853 CN/000853 2026-10-23 13895 87 190157.81 9507.89 Rate difference 2026-10-31 14:34:04
```
Thinking (summary)
I'm noticing that 17 EUR customers sit under non-Export regions, versus only 11 in Export. Rotterdam and Aarhus are in the South, but I need to check which cities the EUR customers in East, North, and West belong to, since the cross-tab only flags Aarhus and Rotterdam.
I'm checking whether the 15 EUR customers outside the listed EU cities are in Indian cities, and I want to look at a possible duplicate of "Bundra Textiles" by checking name near-duplicates. I'm also looking into customer 87, whose credit notes were entered on 31 October but dated 23 October.
**Assistant:**
Some things to dig into: EUR customers outside "Export", a customer named "…Old", and two credit notes backdated on the last day of the data. Next I'll look at each one.
**Code (bash_code_execution):**
```
cd $INPUT_DIR; cat > /tmp/c.py <<'EOF'
exec(open('/tmp/a.py').read().split("print('date ranges'")[0])
print(cu[cu.currency=='EUR'][['customer_id','name','region','city','segment','payment_terms_days','created_at']])
print(cu[cu.name.str.contains('Bundra|Satvira|Kosra',case=False)])
import re
cu['root']=cu.name.str.lower().str.replace(r'\b(old|new|pvt|ltd|textiles|exports|garments|apparels|eu)\b','',regex=True).str.strip()
print(cu[cu.root.duplicated(keep=False)].sort_values('root')[['customer_id','name','region','city','status','created_at']])
print(cu[cu.customer_id==87])
EOF
python3 /tmp/c.py
```
**Output:**
```
customer_id name region city segment payment_terms_days created_at
1 2 Tessora EU South Rotterdam key 45 2021-12-11 17:53:30
2 3 Skarfab South Aarhus key 45 2022-05-07 16:51:47
18 19 Solvik Textil Export Hamburg mid 45 2021-03-02 15:41:56
19 20 Haus Brenner Stoffe Export Lyon mid 45 2022-04-01 16:27:17
20 21 Vela Moda Srl West Ahmedabad mid 45 2023-05-02 10:03:45
21 22 Atelier Saône Export Antwerp mid 45 2021-06-01 16:38:04
22 23 Van Rijt Stoffen West Mumbai mid 45 2022-07-02 16:34:18
23 24 Moda Castella North Delhi mid 45 2023-08-02 18:47:49
24 25 Kaskaro Textil Export Hamburg mid 45 2021-09-01 10:28:30
25 26 Avonmere Cloth Co West Pune mid 45 2022-10-02 12:53:06
26 27 Kurlan Weave North Ludhiana mid 45 2023-03-02 09:42:31
27 28 Dravia Fabrics Export Antwerp mid 45 2021-04-01 16:32:16
28 29 Mondelo Têxteis West Ahmedabad mid 45 2022-05-02 09:40:57
29 30 Skerry Apparel North Gurugram mid 45 2023-06-01 13:20:50
30 31 Kempen Linnen South Tiruppur mid 45 2021-07-02 10:00:34
31 32 Firnhang Tuch East Bhubaneswar mid 45 2022-08-02 12:35:06
32 33 Moselweber Export Milan mid 45 2023-09-01 10:47:18
33 34 Tessuti Ombra Export Antwerp mid 45 2021-10-02 11:24:15
34 35 Wattmeer Textil West Mumbai mid 45 2022-03-02 13:30:49
35 36 Maison Vallin Export Porto mid 45 2023-04-01 15:15:25
36 37 Castelino North Noida mid 45 2021-05-02 16:41:25
37 38 Tatrava Cloth Export Lyon mid 45 2022-06-01 10:34:18
38 39 Bernalp Stoff West Mumbai mid 45 2023-07-02 14:58:48
39 40 Dalmara Moda South Coimbatore mid 45 2021-08-02 09:43:03
40 41 Scheldra Weefsels Export Gothenburg mid 45 2022-09-01 10:46:10
41 42 Elbtal Garn North Gurugram mid 45 2023-10-02 09:03:49
42 43 Dordelle Tissus Export Hamburg mid 45 2021-03-02 17:33:00
43 44 Narvia Weave East Bhubaneswar mid 45 2022-04-01 18:05:41
customer_id customer_code name region city segment currency status payment_terms_days credit_limit created_at
55 56 C0056 Bundra Trading South Erode small INR active 30 1300000.0 2021-03-02 13:52:15
102 103 C0103 Satvira Knitwear West Ahmedabad small INR active 30 1700000.0 2023-01-30 18:24:44
103 104 C0104 Kosra Fabrics North Gurugram small INR active 30 1600000.0 2024-03-02 13:47:40
116 117 C0117 Bundra Wear South Tiruppur small INR active 30 1300000.0 2021-03-02 18:21:37
130 131 C0131 Satvira Fabrics North Ludhiana small INR active 30 1800000.0 2023-06-01 14:21:53
131 132 C0132 Kosra Textiles North Delhi small INR active 30 1400000.0 2024-07-02 12:32:24
140 141 C0141 Bundra Textiles Old North Ludhiana small INR inactive 30 1800000.0 2021-12-11 14:59:54
141 142 C0142 Satvira Exports West Mumbai small INR inactive 30 1800000.0 2022-01-11 09:50:20
142 143 C0143 Kosra Garments East Kolkata small INR inactive 30 1800000.0 2022-02-08 11:57:54
customer_id name region city status created_at
70 71 Doavra Textiles North Gurugram active 2021-05-02 11:18:48
115 116 Doavra Apparels South Madurai active 2024-03-02 17:41:59
62 63 Kalvira Textiles East Guwahati active 2021-06-01 14:44:38
109 110 Kalvira Garments East Bhubaneswar active 2022-09-01 18:17:34
131 132 Kosra Textiles North Delhi active 2024-07-02 12:32:24
142 143 Kosra Garments East Kolkata inactive 2022-02-08 11:57:54
95 96 Mysara Textiles South Madurai active 2023-06-01 09:20:42
122 123 Mysara Apparels West Vapi active 2023-10-02 17:54:57
104 105 Perivra Textiles North Jaipur active 2021-03-02 14:07:14
132 133 Perivra Apparels East Kolkata active 2021-03-02 10:32:12
customer_id customer_code name region city segment currency status payment_terms_days credit_limit created_at root
86 87 C0087 Ponnavra Fabrics South Chennai mid INR active 30 9300000.0 2021-03-02 09:45:37 ponnavra fabrics
```
Thinking (summary)
I'm checking whether the inactive customers had successor accounts: Bundra Textiles Old stopped in February 2025, and Kosra Garments stopped in November 2024 while Kosra Textiles started in July 2024. I'll compare the first invoice dates of the related accounts to see if the new one picked up right when the old one stopped. The naming pattern may just be how the data was generated, but the "Old" suffix is worth a closer look.
I'm looking at the EUR customers next: 17 of the 28 are listed under domestic regions even though they have European names, 0% GST, and 45-day terms, which suggests they're export accounts with the wrong region. That would make the regional revenue split misleading. Then I'll move on to the monthly time series, checking revenue, credit note ratios, FX rates, and whether invoices cluster at period ends.
**Code (bash_code_execution):**
```
cd $INPUT_DIR; cat > /tmp/d.py <<'EOF'
exec(open('/tmp/a.py').read().split("print('date ranges'")[0])
inv['m']=inv.invoice_date.dt.to_period('M'); cn['m']=cn.cn_date.dt.to_period('M')
t=pd.DataFrame({'n_inv':inv.groupby('m').size(),'inv':inv.groupby('m').net_amount.sum()/1e5,'n_cn':cn.groupby('m').size(),'cn':cn.groupby('m').net_amount.sum()/1e5}).fillna(0)
t['net']=t.inv-t.cn; t['cn%']=(t.cn/t.inv*100).round(1)
e=inv[inv.currency=='EUR']; t['fx']=e.groupby('m').fx_rate.mean().round(2); t['eur_share%']=(e.groupby('m').net_amount.sum()/1e5/t.inv*100).round(1)
t['ncust']=inv.groupby('m').customer_id.nunique()
print(t.round(1))
EOF
python3 /tmp/d.py
```
**Output:**
```
n_inv inv n_cn cn net cn% fx eur_share% ncust
m
2024-04 271 422.6 6 1.2 421.4 0.3 100.6 41.3 110
2024-05 260 435.4 27 5.2 430.2 1.2 100.3 39.8 109
2024-06 241 451.5 20 8.1 443.4 1.8 99.6 34.7 108
2024-07 307 438.3 34 8.1 430.2 1.8 99.2 38.5 125
2024-08 260 410.8 23 6.7 404.1 1.6 99.8 45.2 112
2024-09 283 450.1 25 6.8 443.3 1.5 99.4 37.8 111
2024-10 292 441.7 33 7.2 434.5 1.6 99.7 41.9 122
2024-11 283 432.7 35 6.8 425.9 1.6 99.8 40.6 116
2024-12 294 447.5 29 4.4 443.1 1.0 100.3 41.8 121
2025-01 276 433.0 33 11.4 421.6 2.6 99.6 40.1 114
2025-02 217 430.0 26 4.1 425.9 1.0 98.8 38.2 107
2025-03 314 502.3 34 11.2 491.2 2.2 99.0 37.7 125
2025-04 266 457.9 33 8.0 449.9 1.7 98.5 36.6 117
2025-05 302 464.6 24 5.5 459.1 1.2 98.4 40.1 118
2025-06 289 482.4 25 9.3 473.1 1.9 96.7 38.5 119
2025-07 299 474.6 35 15.3 459.3 3.2 96.5 35.0 118
2025-08 268 436.0 26 4.5 431.5 1.0 97.9 32.4 109
2025-09 297 479.7 34 6.8 472.9 1.4 99.7 43.8 122
2025-10 324 471.5 33 7.5 464.0 1.6 100.2 32.6 122
2025-11 254 458.7 16 3.9 454.8 0.9 101.0 30.7 114
2025-12 326 481.1 36 8.0 473.1 1.7 102.3 37.9 120
2026-01 303 453.9 31 4.1 449.7 0.9 102.2 44.6 117
2026-02 272 459.9 21 5.3 454.6 1.2 101.8 37.2 113
2026-03 346 531.1 26 6.9 524.2 1.3 100.9 35.1 127
2026-04 274 477.3 32 10.1 467.2 2.1 100.8 26.1 111
2026-05 293 483.4 33 7.0 476.4 1.4 101.0 45.0 114
2026-06 267 501.7 25 10.6 491.0 2.1 100.9 36.3 120
2026-07 245 481.4 24 4.9 476.5 1.0 99.9 39.8 117
2026-08 237 454.3 25 6.9 447.4 1.5 99.1 42.5 97
2026-09 293 490.7 26 8.7 482.0 1.8 98.2 52.5 108
2026-10 319 478.4 30 14.9 463.5 3.1 100.3 28.9 115
```
Thinking (summary)
I'm noting that March has the year's peak at 502 and 531 lakhs, likely a year-end push or pulled-forward sales, so I want to check the last days of March and any credit notes in April. September 2026 also stands out, with EUR at 52.5% share and customer count dropping in August, and since it's the H1 quarter-end I'll look at daily concentration around period ends and credit notes in the following month against those invoices. I also need to check customer 87's backdated credit notes from October 2026.
I'll check invoices 13720 and 13895 for customer 87's backdated credit notes.
**Assistant:**
Revenue is stable at ~₹4.3–5.3 Cr/month, but March spikes both years (fiscal year-end), and Sept 2026 has an unusually high EUR share. I'll check for period-end loading and look at customer 87.
**Code (bash_code_execution):**
```
cd $INPUT_DIR; cat > /tmp/e.py <<'EOF'
exec(open('/tmp/a.py').read().split("print('date ranges'")[0])
inv['dom']=inv.invoice_date.dt.day; inv['m']=inv.invoice_date.dt.to_period('M')
inv['last3']=inv.invoice_date>=(inv.invoice_date+pd.offsets.MonthEnd(0)-pd.Timedelta(days=2))
s=inv.groupby('m').apply(lambda g:pd.Series({'last3_share%':g[g.last3].net_amount.sum()/g.net_amount.sum()*100,'max_inv':g.net_amount.max()/1e5}))
print(s.round(1).T.to_string())
big=inv.nlargest(25,'net_amount')[['invoice_id','invoice_no','invoice_date','customer_id','currency','amount_fc','net_amount','created_at']]
big=big.merge(cn.groupby('invoice_id').agg(cn_amt=('net_amount','sum'),cn_date=('cn_date','min')),on='invoice_id',how='left')
print(big)
print(inv.net_amount.describe(percentiles=[.9,.99,.999]))
EOF
python3 /tmp/e.py
```
**Output:**
```
m 2024-04 2024-05 2024-06 2024-07 2024-08 2024-09 2024-10 2024-11 2024-12 2025-01 2025-02 2025-03 2025-04 2025-05 2025-06 2025-07 2025-08 2025-09 2025-10 2025-11 2025-12 2026-01 2026-02 2026-03 2026-04 2026-05 2026-06 2026-07 2026-08 2026-09 2026-10
last3_share% 13.6 10.6 19.7 8.0 18.3 20.7 16.5 13.6 15.3 9.5 6.9 12.5 14.3 13.0 16.4 10.0 8.4 16.5 9.8 11.5 20.6 11.4 12.4 11.4 16.4 11.4 15.3 14.9 12.1 16.0 6.1
max_inv 17.5 17.9 24.7 14.2 22.1 18.4 19.1 12.6 27.9 13.9 17.5 20.8 17.7 15.5 22.4 13.5 13.1 25.2 12.3 17.7 17.2 19.7 16.8 14.1 21.1 18.5 18.7 15.8 26.3 30.4 22.9
invoice_id invoice_no invoice_date customer_id currency amount_fc net_amount created_at cn_amt cn_date
0 13775 BI/2627/001521 2026-09-26 2 EUR 30990.24 3041255.09 2026-09-26 14:09:16 NaN NaT
1 7864 BI/2425/002454 2024-12-30 2 EUR 27790.35 2788842.21 2024-12-30 12:48:20 454185.20 2025-01-03
2 13546 BI/2627/001292 2026-08-29 1 INR NaN 2633541.50 2026-08-29 18:21:11 NaN NaT
3 10413 BI/2526/001705 2025-09-30 2 EUR 25080.68 2516284.43 2025-09-30 14:10:45 NaN NaT
4 6168 BI/2425/000758 2024-06-29 1 INR NaN 2466507.91 2024-06-29 14:31:10 NaN NaT
5 14059 BI/2627/001805 2026-10-22 4 INR NaN 2290465.44 2026-10-22 18:12:49 NaN NaT
6 9534 BI/2526/000826 2025-06-28 1 INR NaN 2241958.80 2025-06-28 15:51:09 467435.69 2025-07-15
7 6642 BI/2425/001232 2024-08-20 2 EUR 22135.38 2214297.24 2024-08-20 14:33:22 NaN NaT
8 6005 BI/2425/000595 2024-06-12 2 EUR 22204.65 2206593.76 2024-06-12 14:46:36 NaN NaT
9 12450 BI/2627/000196 2026-04-24 1 INR NaN 2109484.07 2026-04-24 11:11:32 NaN NaT
10 8648 BI/2425/003238 2025-03-28 1 INR NaN 2084867.82 2025-03-28 12:59:51 NaN NaT
11 11571 BI/2526/002863 2026-01-26 2 EUR 19375.67 1969596.92 2026-01-26 19:34:16 NaN NaT
12 7234 BI/2425/001824 2024-10-26 1 INR NaN 1913302.94 2024-10-26 11:23:04 NaN NaT
13 12401 BI/2627/000147 2026-04-18 1 INR NaN 1896869.63 2026-04-18 12:01:09 NaN NaT
14 12916 BI/2627/000662 2026-06-13 2 EUR 18506.91 1867197.31 2026-06-13 14:39:54 NaN NaT
15 12689 BI/2627/000435 2026-05-16 2 EUR 18349.67 1851672.54 2026-05-16 17:48:17 NaN NaT
16 12515 BI/2627/000261 2026-04-30 1 INR NaN 1851426.79 2026-04-30 16:12:43 NaN NaT
17 6988 BI/2425/001578 2024-09-28 2 EUR 18571.86 1844066.84 2024-09-28 10:00:03 NaN NaT
18 5891 BI/2425/000481 2024-05-25 2 EUR 17904.87 1787351.86 2024-05-25 11:40:04 459536.20 2024-06-17
19 6169 BI/2425/000759 2024-06-29 2 EUR 17979.74 1778435.42 2024-06-29 11:59:58 NaN NaT
20 10897 BI/2526/002189 2025-11-18 2 EUR 17499.57 1768347.30 2025-11-18 16:55:49 NaN NaT
21 8729 BI/2526/000021 2025-04-03 2 EUR 17981.01 1766555.12 2025-04-03 15:41:39 NaN NaT
22 8267 BI/2425/002857 2025-02-13 1 INR NaN 1754240.03 2025-02-13 11:58:35 NaN NaT
23 5674 BI/2425/000264 2024-04-30 2 EUR 17413.94 1752737.44 2024-04-30 18:47:57 NaN NaT
24 12342 BI/2627/000088 2026-04-11 1 INR NaN 1751508.15 2026-04-11 19:23:47 426567.30 2026-04-29
count 8.772000e+03
mean 1.631853e+05
std 2.280087e+05
min 1.004934e+04
50% 6.635217e+04
90% 3.471253e+05
99% 1.241591e+06
99.9% 2.131722e+06
max 3.041255e+06
Name: net_amount, dtype: float64
STDERR:
/tmp/e.py:4: FutureWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass `include_groups=False` to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.
s=inv.groupby('m').apply(lambda g:pd.Series({'last3_share%':g[g.last3].net_amount.sum()/g.net_amount.sum()*100,'max_inv':g.net_amount.max()/1e5}))
```
Thinking (summary)
I've ruled out any obvious period-end loading, so I'm moving on to customer concentration and a revenue-by-region comparison, keeping stated and inferred figures separate. I'll also look into the March spike, which seems to come from higher invoice counts and more customers, probably seasonal.
I'm also checking for customers who are still marked active but have no invoices in recent months, and looking at customer concentration again.
**Assistant:**
No sign of month-end invoice loading, and no outlier invoices that look like errors. Next: customer concentration, the Oct-2026 credit notes, and dormant accounts.
**Code (bash_code_execution):**
```
cd $INPUT_DIR; cat > /tmp/f.py <<'EOF'
exec(open('/tmp/a.py').read().split("print('date ranges'")[0])
r=inv.groupby('customer_id').net_amount.sum().sort_values(ascending=False); tot=r.sum()
print('top1/2/5/10 share', [round(r.head(k).sum()/tot*100,1) for k in (1,2,5,10)])
print(r.head(5).to_frame().join(cu.set_index('customer_id')[['name','region','segment']]))
# customer 87 detail
g=inv[inv.customer_id==87]; print('cust87 invoices', len(g), g.net_amount.sum())
c=cn[cn.customer_id==87].merge(inv[['invoice_id','invoice_date','net_amount']],on='invoice_id',suffixes=('','_inv')); print(c.tail(8))
# CN rate by customer
cr=(cn.groupby('customer_id').net_amount.sum()/inv.groupby('customer_id').net_amount.sum()*100).dropna().sort_values(ascending=False)
print('cn% by customer top', cr.head(8).round(1).to_dict(), 'median', cr.median().round(2))
# cn % of invoice
m=cn.merge(inv[['invoice_id','invoice_date','net_amount']],on='invoice_id',suffixes=('','_inv'))
m['pct']=m.net_amount/m.net_amount_inv*100; m['lagd']=(m.cn_date-m.invoice_date).dt.days
print(m.groupby('reason')[['pct','lagd']].describe().round(1))
print('full reversals', (m.pct>99.9).sum())
# last invoice date per active customer
last=inv.groupby('customer_id').invoice_date.max(); a=cu.set_index('customer_id').join(last)
dorm=a[(a.status=='active')&(a.invoice_date<'2026-07-01')]
print('active but no invoice since Jul-26:', len(dorm)); print(dorm[['name','region','segment','invoice_date']])
EOF
python3 /tmp/f.py
```
**Output:**
```
top1/2/5/10 share [np.float64(10.9), np.float64(17.7), np.float64(27.5), np.float64(33.4)]
net_amount name region segment
customer_id
1 1.561056e+08 Ravira Exports South key
2 9.711884e+07 Tessora EU South key
3 7.932609e+07 Skarfab South key
4 3.987255e+07 Merai Apparels West key
5 2.073367e+07 Shree Varada Textiles South mid
cust87 invoices 43 12877218.94
cn_id cn_no cn_date invoice_id customer_id net_amount gst_amount reason created_at invoice_date net_amount_inv
2 384 CN/000384 2025-06-02 9070 87 19075.19 953.76 Quality claim 2025-06-02 16:30:47 2025-05-10 192884.77
3 507 CN/000507 2025-10-06 10261 87 85965.23 4298.26 Return 2025-10-06 17:37:43 2025-09-15 339115.91
4 561 CN/000561 2025-12-11 10965 87 61502.76 3075.14 Rate difference 2025-12-11 16:02:06 2025-11-25 243437.61
5 687 CN/000687 2026-04-21 12156 87 38841.87 1942.09 Return 2026-04-21 13:15:09 2026-03-26 275932.17
6 776 CN/000776 2026-07-27 13138 87 60254.37 3012.72 Rate difference 2026-07-27 10:18:41 2026-07-08 363984.42
7 804 CN/000804 2026-08-31 13296 87 13962.35 698.12 Quality claim 2026-08-31 18:59:57 2026-07-28 266345.53
8 852 CN/000852 2026-10-23 13720 87 390720.93 19536.05 Return 2026-10-31 18:55:16 2026-09-19 471183.08
9 853 CN/000853 2026-10-23 13895 87 190157.81 9507.89 Rate difference 2026-10-31 14:34:04 2026-10-03 229317.49
cn% by customer top {87: 7.6, 54: 4.0, 143: 3.6, 100: 3.0, 48: 2.7, 14: 2.6, 22: 2.6, 74: 2.6} median 1.54
pct lagd
count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max
reason
Quality claim 187.0 15.6 6.3 5.0 10.0 15.9 20.8 26.3 187.0 19.9 9.0 4.0 12.0 21.0 28.0 35.0
Rate difference 241.0 16.1 7.5 4.9 11.0 15.8 21.3 82.9 241.0 20.2 9.0 4.0 13.0 20.0 28.0 35.0
Return 432.0 16.1 6.9 5.0 10.7 16.4 21.2 82.9 432.0 18.8 8.8 4.0 11.0 18.5 26.0 35.0
full reversals 0
active but no invoice since Jul-26: 5
name region segment invoice_date
customer_id
7 Anvika Knit Works West mid 2026-06-28
10 Navika Fashions West mid 2026-06-30
12 Devana Apparels South mid 2026-06-22
14 Maravi Linens South mid 2026-06-18
17 Vihana Textiles North mid 2026-06-26
```
Thinking (summary)
I'm checking the two late-October credit notes on customer 87, which are much larger than usual and were backdated to the 23rd, worth about ₹5.8 lakh or 39% of October's credit notes. Five mid-segment customers all stopped in late June, so I'm going to look at whether their revenue history was steady beforehand.
I'll quantify those five customers' monthly revenue before they stopped, and also compare the EUR share of true export revenue against the Export region. I'm also checking whether any inactive customers had a successor take over, starting with Bundra Textiles Old (141), which ended in February 2025.
**Code (bash_code_execution):**
```
cd $INPUT_DIR; cat > /tmp/g.py <<'EOF'
exec(open('/tmp/a.py').read().split("print('date ranges'")[0])
inv['m']=inv.invoice_date.dt.to_period('M')
d=inv[inv.customer_id.isin([7,10,12,14,17])]
p=d.pivot_table(index='m',columns='customer_id',values='net_amount',aggfunc='sum').fillna(0)/1e5
print(p.round(1).tail(12)); print('avg monthly combined H1-2026 (lakh):', round(p.loc['2026-01':'2026-06'].sum(axis=1).mean(),1))
print('full-year contribution FY25-26 lakh', round(d[(d.invoice_date>='2025-04-01')&(d.invoice_date<'2026-04-01')].net_amount.sum()/1e5,1))
# export revenue by stated region
x=inv.merge(cu[['customer_id','region']],on='customer_id')
print((x.groupby(['region','currency']).net_amount.sum()/1e7).round(2).unstack())
print('EUR rev outside Export region share of EUR rev:', round(x[(x.currency=='EUR')&(x.region!='Export')].net_amount.sum()/x[x.currency=='EUR'].net_amount.sum()*100,1))
# inactive customers and similar-name successors first invoice
f=inv.groupby('customer_id').invoice_date.agg(['min','max'])
print(f.loc[[141,56,117,142,103,131,143,104,132]].join(cu.set_index('customer_id').name))
EOF
python3 /tmp/g.py
```
**Output:**
```
customer_id 7 10 12 14 17
m
2025-07 5.5 3.9 4.1 2.5 2.2
2025-08 6.1 2.6 3.2 2.4 1.9
2025-09 5.8 3.3 3.1 2.2 3.2
2025-10 5.7 3.8 3.0 2.7 1.8
2025-11 6.5 2.1 2.6 2.7 1.8
2025-12 4.5 3.4 2.3 2.9 2.4
2026-01 7.7 3.5 3.1 2.4 2.3
2026-02 5.7 2.6 2.6 1.7 1.1
2026-03 6.0 3.0 3.5 2.8 2.2
2026-04 2.9 3.3 2.4 2.1 2.2
2026-05 3.9 2.0 1.2 1.2 1.7
2026-06 3.8 2.6 1.8 1.1 1.4
avg monthly combined H1-2026 (lakh): 14.0
full-year contribution FY25-26 lakh 198.2
currency EUR INR
region
East 3.06 6.05
Export 14.76 NaN
North 7.30 7.49
South 20.42 60.77
West 9.49 13.81
EUR rev outside Export region share of EUR rev: 73.2
min max name
customer_id
141 2024-04-08 2025-02-14 Bundra Textiles Old
56 2024-04-10 2026-10-12 Bundra Trading
117 2024-04-08 2026-10-23 Bundra Wear
142 2024-04-02 2025-06-30 Satvira Exports
103 2024-04-08 2026-10-24 Satvira Knitwear
131 2024-04-04 2026-10-24 Satvira Fabrics
143 2024-04-03 2024-11-20 Kosra Garments
104 2024-04-01 2026-10-22 Kosra Fabrics
132 2024-08-01 2026-10-22 Kosra Textiles
```
Thinking (summary)
I'm checking the Kosra entities: Kosra Textiles was set up in July 2024 with its first invoice a month later, and Kosra Garments stopped in November 2024, so that's weak and I may mention it lightly or skip it. The five churned customers declined from April 2026 before stopping, which looks like a real churn signal, roughly ₹14 lakh a month lost by the end against about ₹2 crore a year earlier. They're all mid-segment but spread across West, South and North. I'm also looking at the customer count drop in August 2026.
Now I'm checking the South region's EUR revenue, about ₹20.42 crore, mostly from Tessora and Skarfab, and noting that 73% of it falls outside the Export region, which would make the South figure misleading for regional reporting. I'm also confirming how net revenue is dated (credit notes by their own date, FX at invoice-date rates) and that October 2026's credit note rate of 3.1% is driven by a backdated entry for customer 87.
**Assistant:**
I checked all three files thoroughly. The data is mechanically very clean, but there are four things you should know before reporting from it. The first matters most.
**What checked out clean**
- Every credit note and invoice links to a real record, and every credit note's customer matches its invoice's customer.
- Invoice numbers run in sequence with no gaps in each fiscal year (FY24-25, FY25-26, FY26-27 to date), and there are no duplicate invoices.
- The sums add up: net + GST = gross on every row, and EUR amount × exchange rate = rupee value on every EUR invoice.
- GST is consistent: 5% on all INR invoices and 0% on all EUR invoices, which fits zero-rated exports.
- No credit note is dated before its invoice, and none is larger than the invoice it reduces.
- Revenue is steady at about ₹4.1–5.3 Cr a month. March is higher in both years (₹5.0 Cr and ₹5.3 Cr), but that comes from more invoices and more customers, not from bunching at month-end. I found no month-end loading.
**1. The region field gives a misleading picture of export sales**
Of the 28 customers billed in EUR, only 11 are in the "Export" region. The other 17 are filed under South, West, North and East.
- **About 73% of EUR revenue (≈₹40 Cr of ₹55 Cr) sits outside "Export."** A sales-by-region report would show exports at about ₹15 Cr when they're actually about ₹55 Cr.
- "South" is overstated by about ₹20 Cr of EUR sales. Your second- and third-biggest customers, Tessora EU (Rotterdam) and Skarfab (Aarhus), are both in South.
- 15 of these accounts have European names, 45-day terms and 0% GST, yet their city is an Indian one (e.g. "Van Rijt Stoffen – Mumbai"). Either the city and region were filled in wrongly, or these are Indian buying offices billed in euros. Someone who knows the accounts should confirm which.
**2. Five steady customers stopped buying at the end of June 2026**
Anvika Knit Works, Navika Fashions, Devana Apparels, Maravi Linens and Vihana Textiles are all mid-size accounts and all still marked "active." Together they billed about ₹2 Cr in FY25-26. Their orders fell from April 2026, and none has invoiced since late June. Because they stopped together, this looks like one cause (a competitor, pricing, or a sales rep leaving) rather than ordinary churn. It may also explain why only 97 customers bought in Aug 2026, against a usual 110–125.
**3. Two unusual credit notes at the end of October 2026**
Ponnavra Fabrics (customer 87) received two credit notes totalling about ₹5.8 lakh. They're dated 23 Oct but were entered on 31 Oct, the last day of the data.
- These are the only credit notes in the whole history entered more than a day after their date.
- They're also unusually large: 83% of the invoice value, where credit notes usually reduce 5–26%.
- They make up about 39% of October's credits, which is why October's credit rate rose to 3.1%. Overall, this customer's credit rate is 7.6%, against a typical 1.5%.
This may be legitimate, but it's worth asking who approved these and why.
**4. Customer concentration**
Ravira Exports accounts for 10.9% of invoiced revenue, the top 2 customers for 17.7%, and the top 5 for 27.5%. That's not extreme, but losing one key account would be noticeable.
**Smaller notes**
- Credit notes count in the month they're dated, not the month of the invoice they reduce. They usually follow the invoice by 4–35 days, so a credit can land in a different month, quarter or year from the sale. This matters for March and other period-end figures.
- October 2026 is the last month in the export and is the most recent data. FY26-27 covers only 7 months, so don't compare it directly with full years.
- Three accounts are inactive and stopped billing in 2024-25. Each has similarly named active accounts (e.g. "Bundra Textiles Old" alongside "Bundra Trading" and "Bundra Wear"). If these are the same customers, group-level customer analysis will need them merged.
I'd fix the region mapping first, since it changes any regional or export analysis. I can rebuild revenue by region using currency or city to approximate a real "Export" group, or put together a fuller churn and retention view by customer.
## Final answer (scored)
I checked all three files thoroughly. The data is mechanically very clean, but there are four things you should know before reporting from it. The first matters most.
**What checked out clean**
- Every credit note and invoice links to a real record, and every credit note's customer matches its invoice's customer.
- Invoice numbers run in sequence with no gaps in each fiscal year (FY24-25, FY25-26, FY26-27 to date), and there are no duplicate invoices.
- The sums add up: net + GST = gross on every row, and EUR amount × exchange rate = rupee value on every EUR invoice.
- GST is consistent: 5% on all INR invoices and 0% on all EUR invoices, which fits zero-rated exports.
- No credit note is dated before its invoice, and none is larger than the invoice it reduces.
- Revenue is steady at about ₹4.1–5.3 Cr a month. March is higher in both years (₹5.0 Cr and ₹5.3 Cr), but that comes from more invoices and more customers, not from bunching at month-end. I found no month-end loading.
**1. The region field gives a misleading picture of export sales**
Of the 28 customers billed in EUR, only 11 are in the "Export" region. The other 17 are filed under South, West, North and East.
- **About 73% of EUR revenue (≈₹40 Cr of ₹55 Cr) sits outside "Export."** A sales-by-region report would show exports at about ₹15 Cr when they're actually about ₹55 Cr.
- "South" is overstated by about ₹20 Cr of EUR sales. Your second- and third-biggest customers, Tessora EU (Rotterdam) and Skarfab (Aarhus), are both in South.
- 15 of these accounts have European names, 45-day terms and 0% GST, yet their city is an Indian one (e.g. "Van Rijt Stoffen – Mumbai"). Either the city and region were filled in wrongly, or these are Indian buying offices billed in euros. Someone who knows the accounts should confirm which.
**2. Five steady customers stopped buying at the end of June 2026**
Anvika Knit Works, Navika Fashions, Devana Apparels, Maravi Linens and Vihana Textiles are all mid-size accounts and all still marked "active." Together they billed about ₹2 Cr in FY25-26. Their orders fell from April 2026, and none has invoiced since late June. Because they stopped together, this looks like one cause (a competitor, pricing, or a sales rep leaving) rather than ordinary churn. It may also explain why only 97 customers bought in Aug 2026, against a usual 110–125.
**3. Two unusual credit notes at the end of October 2026**
Ponnavra Fabrics (customer 87) received two credit notes totalling about ₹5.8 lakh. They're dated 23 Oct but were entered on 31 Oct, the last day of the data.
- These are the only credit notes in the whole history entered more than a day after their date.
- They're also unusually large: 83% of the invoice value, where credit notes usually reduce 5–26%.
- They make up about 39% of October's credits, which is why October's credit rate rose to 3.1%. Overall, this customer's credit rate is 7.6%, against a typical 1.5%.
This may be legitimate, but it's worth asking who approved these and why.
**4. Customer concentration**
Ravira Exports accounts for 10.9% of invoiced revenue, the top 2 customers for 17.7%, and the top 5 for 27.5%. That's not extreme, but losing one key account would be noticeable.
**Smaller notes**
- Credit notes count in the month they're dated, not the month of the invoice they reduce. They usually follow the invoice by 4–35 days, so a credit can land in a different month, quarter or year from the sale. This matters for March and other period-end figures.
- October 2026 is the last month in the export and is the most recent data. FY26-27 covers only 7 months, so don't compare it directly with full years.
- Three accounts are inactive and stopped billing in 2024-25. Each has similarly named active accounts (e.g. "Bundra Textiles Old" alongside "Bundra Trading" and "Bundra Wear"). If these are the same customers, group-level customer analysis will need them merged.
I'd fix the region mapping first, since it changes any regional or export analysis. I can rebuild revenue by region using currency or city to approximate a real "Export" group, or put together a fuller churn and retention view by customer.