Commits
Marek Vsechovsky committed bc5c327e25b
Session 144, Step 52: Auto-create first project user story with guided instructions on project creation - AIM-2755 Auto-create first project user story with guided instructions on project creation - AIM-2756 Show discount code field in checkout pane for first-time discount users - AIM-2769 Save InvoiceItem records for subscription purchases Outcome: **AIM-2755:** Added `totalSessions === 0` guard to `restoreLastMainTabIfStillDefault()` in `dashboard.js` so the dashboard never auto-switches away from the Project tab for first-project onboarding. Also added bubble display in the `data.selectedProject` init path (which bypasses `selectProject()`). Exported `_showFirstProjectWorkflowBubble` as `Dash.Proj.showFirstProjectWorkflowBubble`. **AIM-2756:** Restored the pro-rata comparison threshold from >$5 (500 cents) back to >$1 (100 cents). For yearly subscriptions, `expectedSub` is now multiplied by 12 before comparing against Paddle's subtotal, since the server returns the expected amount in monthly units. **AIM-2769:** Added 7 financial summary columns to the `Invoice` model (`InvoiceSubtotal`, `InvoiceDiscount`, `InvoiceTax`, `InvoiceTaxPercent`, `InvoiceFee`, `InvoiceAffiliate`, `InvoiceNetTotal`). Created SQL migration script `111_AddInvoiceFinancialColumns.sql`. Updated `EnsureInvoiceAsync` to populate these columns from Paddle transaction-level totals. Fixed one-off feature price matching: one-off prices are JIT-stored in `FPricePaddlePriceIdALaCarteMonthly` (not `FPricePaddlePriceIdMonthly`), so the lookup now checks both columns with proper fallback. Added warning log when an invoice is created without line items.