7d30b7577d
Solves https://github.com/twentyhq/private-issues/issues/237 **TLDR:** - Fetches billing products and prices from the tables BilllingProducts and BillingPrices instead of fetching the product from the environment variables and the prices from the stripe API. - Adds new feature flag for this feature - Fixes calls used to fetch stripe products and prices for the command Billing Sync Plans Data. **In order to test:** 1. Have the environment variable IS_BILLING_ENABLED set to true and add the other required environment variables for Billing to work 2. Do a database reset (to ensure that the new feature flag is properly added and that the billing tables are created) 3. Run the command: `npx nx run twenty-server:command billing:sync-plans-data` (if you don't do that the products and prices will not be present in the database) 4. Run the server , the frontend, the worker, and the stripe listen command (`stripe listen --forward-to http://localhost:3000/billing/webhooks`) 5. Buy a subscription for the Acme workspace and play with the project **Doing** I think there is some room of progress for the function formatProductPrices, I used a similar version that was done before, I'll look into that.