HALO CRM research
Real and working
Domain 4 · money · ~5,600 LOC

Creator invoicing

Raises per-cycle invoices against creator net sales, in the creator's payout currency, at an FX rate frozen when the invoice is raised. Four billing cycles a month (CYCLE_START_DAYS [1,8,16,24]).

What it is and how it feeds the rest

Mechanically

Raises per-cycle invoices against creator net sales, in the creator's payout currency, at an FX rate frozen when the invoice is raised. Four billing cycles a month (CYCLE_START_DAYS [1,8,16,24]).

How it connects

Consumes net-sales entries; emits invoices that the payment log settles against. Shares the currencyRates cache with referral invoicing.

Pages

  • src/pages/CreatorInvoicing.tsx
  • src/pages/CreatorInvoice.tsx

Components

  • src/components/creator-invoicing/

Convex modules

  • invoicing.ts
  • currency.ts

Tables

  • creatorInvoicing
  • currencyRates

Findings that touch this domain

high All money is float64; 2 rounding calls in 11,274 LOC, none in invoicing/referrals/payroll

convex/schema.ts:103,132,153,393,703

medium percentage ?? 50 silently assumes a 50/50 split when a creator's rate was never set

convex/invoicing.ts:34,65,250

high migrateToPeriodCycles is public and merges duplicate invoices by summing then deleting; re-running on migrated data silently re-merges real money

convex/invoicing.ts:628, merge-delete at :665-680

Open questions

Research priority for this domain is low. Agent findings splice in below this line and survive regeneration.