fix(merchants): net spend accounting for refunds/credits
- Merchant totals now show net spend (gross debits minus refunds) - Refund count and amount shown in profile drawer and table - Scatter plot Y-axis uses net_spend, X-axis uses debit_count - Per-merchant transaction history includes refunds (shown as negative) - Monthly trend chart reflects net spend per month
This commit is contained in:
+6
-3
@@ -562,9 +562,12 @@ export function useFees() {
|
||||
export interface MerchantRow {
|
||||
merchant: string;
|
||||
category: string;
|
||||
transaction_count: number;
|
||||
total_spend: number;
|
||||
avg_transaction: number;
|
||||
debit_count: number;
|
||||
refund_count: number;
|
||||
gross_spend: number;
|
||||
total_refunds: number;
|
||||
net_spend: number;
|
||||
avg_debit: number;
|
||||
first_seen: string;
|
||||
last_seen: string;
|
||||
months_active: number;
|
||||
|
||||
Reference in New Issue
Block a user