Skip to content

Fix currency display to GH₵ and auto-derive tax from estimated revenue#11

Merged
mhaadiabu merged 1 commit into
mainfrom
copilot/research-application-purpose-and-domain
Apr 13, 2026
Merged

Fix currency display to GH₵ and auto-derive tax from estimated revenue#11
mhaadiabu merged 1 commit into
mainfrom
copilot/research-application-purpose-and-domain

Conversation

Copilot AI commented Apr 13, 2026

Copy link
Copy Markdown

Summary

Addresses two issues with the revenue and tax estimation features:

  1. Currency symbol — all monetary amounts were displaying the ISO code GHS instead of the Ghana Cedi symbol GH₵.
  2. Auto-derived tax — tax estimates were not surfacing for channels that had estimated revenue but no persisted taxEstimates record (e.g. legacy influencer records).

Changes

Currency symbol (src/lib/product.ts, src/app/(dashboard)/influencers/page.tsx)

  • Added symbol: 'GH₵' to currencyConfig; code: 'GHS' retained for DB/ISO storage
  • formatCurrency and both revenue input form labels now use the GH₵ symbol across the dashboard, charts, table cells, and reports

Auto-derived tax (convex/channelData.ts)

  • estimatedTax now falls back to Math.round(estimatedAnnualRevenue × 0.25) when no stored taxEstimates entry or legacy.taxLiability exists
  • hasTaxEstimate is true whenever estimatedAnnualRevenue is defined, so dashboard totals and the "Tax estimate ready" badge reflect all channels with revenue
  • taxEstimateSource propagates the actual revenueSource (manual / analytics / legacy_unknown) instead of hard-coding 'legacy_unknown' for auto-derived values

@vercel

vercel Bot commented Apr 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
graitld Ready Ready Preview, Comment Apr 13, 2026 8:40pm

@mhaadiabu mhaadiabu marked this pull request as ready for review April 13, 2026 20:46
@mhaadiabu mhaadiabu merged commit a791127 into main Apr 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants