Metrics → Customers: only customers who have spent more than $0

A customer counts when their paid invoices' amount_paid, less refunds,
is above zero. Trials ($0 invoices), fully discounted invoices, only-open
invoices and payments refunded in full no longer put someone on the list.

Also ticks the Market Fetch check in TEST.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 12:27:27 -07:00
co-authored by Claude Opus 5.5
parent 5451fe6d63
commit 6f2fbdf63a
5 changed files with 74 additions and 17 deletions
@@ -1,6 +1,6 @@
{{define "content"}}{{with .Data}}{{$d := .}}
<div class="heading"><h1>Customers and the CRM</h1></div>
<p class="lede">Each Stripe customer with billing, matched to its EspoCRM Account: first by a stored ID (a Stripe customer ID in the Account, or an EspoCRM ID in Stripe's metadata), then by email (the Account's, or one of its Contacts'), then by the email's domain (free mail like Gmail doesn't count). Fix what it gets wrong; your choice is kept. Pipeline influence and per-account numbers build on this.</p>
<p class="lede">Each Stripe customer who has spent more than $0 (paid invoices, less refunds; trials and unpaid invoices don't count), matched to its EspoCRM Account: first by a stored ID (a Stripe customer ID in the Account, or an EspoCRM ID in Stripe's metadata), then by email (the Account's, or one of its Contacts'), then by the email's domain (free mail like Gmail doesn't count). Fix what it gets wrong; your choice is kept. Pipeline influence and per-account numbers build on this.</p>
<section class="card">
{{if not .CRMCount}}