Changelog — InvoiceTrack
All notable changes to this app are recorded here. Newest entries on top.
[2026-07-03] — Tutorials & promo refresh
- Rewrote all five in-app tutorials to be short, step-by-step guides with real button names — and brought them up to date with the current app. Fixed the Getting Started lesson, which still opened with leftover PropertyPro copy about "collecting rent and keeping landlords happy", and the day-to-day/sharing lessons now walk through actual InvoiceTrack flows (Record Payment, Set PIN, customer sign-up approval, estimates, recurring billing) instead of generic advice.
- Refreshed the promotional copy — proposal, email, WhatsApp, Facebook, Instagram, Twitter, and SMS swipe files rewritten around the current feature set, with the outdated "$10/mo + $5 setup" pricing removed.
[2026-05-29] — Preview PDF crash fix
- Fixed: "Preview PDF" was crashing (or doing nothing) on most browsers. The Preview PDF action opened the invoice page in a new tab with
?preview=1, and that page then tried window.open(blobURL, '_blank') to launch a SECOND new tab with the PDF. Two back-to-back window.open() calls (the first from the admin's click, the second from a setTimeout 500ms later) are not legitimately user-gesture-driven, so the popup blocker killed the second one — or it opened a tab Chrome's PDF viewer refused to render against the cross-window blob URL ("Couldn't load PDF document"). The fix replaces the doomed window.open with a clean top-level navigation: when ?preview=1 auto-fires, the tab the admin already opened is navigated directly to the PDF blob URL, and the browser's native PDF viewer renders it with built-in zoom, search, and print controls. No second window, no popup-blocker fight, no CSP frame-src rejection.
- Better feedback while the PDF builds. A spinner overlay ("Generating preview…" / "Building PDF…") covers the page while html2pdf works, instead of leaving the admin staring at a blank page wondering what happened. Errors now log to the browser console and show a specific message instead of a silent failure.
- Public-page Preview PDF button (when a customer or admin clicks Preview PDF directly on the invoice page itself) now opens a fresh tab synchronously on the button-click gesture, then navigates that new tab to the PDF once it's ready — keeping the styled invoice open in the original tab for the user to continue interacting with.
[2026-05-28] — Final copy sweep
- Top Customers card under Reports now reads "3 invoices" instead of "3 charges".
- Removed orphaned PropertyPro screenshot assets (
screenshots/tenants.svg, charges.svg, dashboard.svg) that were carried over during the original fork. They weren't referenced by app.json or the marketplace, but they're gone now to keep the app folder clean.
[2026-05-28] — PDF rebuild, Visual polish, Platform branding
- Fixed: 500 error on Settings page. When the active entity context bootstrap couldn't see the
$db connection from the host settings view ($db was null on production), the page crashed with get_active_entity(): Argument #1 ($db) must be of type PDO, null given. The bootstrap now resolves the connection robustly: tries $appDb first (LocksmithKit pattern), falls back to get_db() (always wired by the router), degrades gracefully to single-business mode if neither is available.
- Fixed: PDF download didn't work. Three root causes ganged up: (1) the SRI hash on the
html2pdf.js CDN script was stale, silently blocking the library from loading; (2) the capture selector grabbed [class*="invoice"] which only matched the white card body, missing the colored header; (3) the auto-trigger fired before html2pdf was guaranteed to be on the page on slow networks. Now: SRI removed, the whole invoice (header + card) is wrapped in #invoice-printable which the capture targets explicitly, and a whenReady() poll waits up to 6 seconds for the library to load before firing.
- New: Preview PDF button. Admins can now SEE the formatted PDF before downloading. Opens a new tab with the PDF rendered as a blob — same template the customer would see, same brand color, logo, signature. Useful for double-checking the invoice template setting (Classic / Modern / Minimal) is producing the look you want before sharing.
?pdf=1 and ?preview=1 URL flags on the public invoice link. Admin tools at the top of the order detail (Download PDF / Preview PDF) route through these. The PDF always uses whichever template is set in Settings → Invoice Template per-business.
- Platform branding. "Powered by InvoiceTrack" with a link to [mypancho.com/invoicetrack](https://mypancho.com/invoicetrack) — small attribution on every customer-facing invoice link, estimate link, customer portal, and at the foot of the thank-you email body. Enabled by default; admins can turn it off under Settings → Platform (the last, intentionally minimal card).
- Visual polish — public invoice + estimate. Modernized typography (larger ticket heading, tighter letter-spacing), softer card edges (rounded-2xl), layered shadows for depth, gradient sheen on the colored header band (subtle radial highlight), pill-style action buttons that lift on hover, big bold totals + balance with a soft pulse on unpaid balances, full-width gradient Pay button with hover lift. Subtle background gradient on the whole page (slate-50 → slate-100). Same modernization on the estimate accept page. The Modern and Minimal templates carry through these changes consistently.
[2026-05-28] — Polish + Two-Business Demo Seed
- Fixed: "Open" invoice gave 404. The Copy link / WhatsApp / Open buttons on the order detail page were building the public URL from the admin path. They now route through the
orders/share-token API so the link is always /p/{userId}/invoicetrack/invoice?token=… — the correct public route.
- Fixed: Download PDF button was hidden because it read the old
pdf_invoice_enabled settings key instead of the new pdf_enabled one.
- Renamed "Receipt" → "Send Invoice" on the order detail action bar to match the rest of the app.
- New: "Send as PDF" button on the order detail page. Opens the invoice link with
?pdf=1, which auto-downloads the PDF via html2pdf.js. Admin attaches the saved PDF to WhatsApp / email manually.
- WhatsApp from order detail now includes the actual share link so the recipient can tap to view and pay. Previously it sent a text summary with no URL.
- Phone numbers display in local 0-prefix format. Added
format_phone_display() to helpers.php. +2348021234567 renders as 0802 123 4567; 08021234567 renders as 0802 123 4567; US numbers +15551234567 render as (555) 123-4567. Other formats render unchanged. Already used in the public invoice + estimate views.
- Demo seed now ships with TWO businesses. Sunshine Services (entity 1) keeps the app-wide defaults. Acme Repairs (entity 2) has 9 per-business setting overrides — custom business name, phone, accent color (#E11D48), invoice template (Modern), number prefix (ACME), and full bank account details. 3 customers + 4 invoices live under each business; numbering on entity 2 reads
ACME-… instead of INV-…. Customer phone numbers seeded in local 0-prefix Nigerian format. After running php seed.php reset admins can immediately try the multi-business switcher at /location-select.
[2026-05-28] — Per-Business Settings
- Run multiple businesses from one install. Each business now keeps its own brand. The 19 settings that show on every invoice — business name, phone, currency symbol, accent color, logo, signature (any mode), invoice number prefix + starting number, invoice template (Classic / Modern / Minimal), bank account details, and the show-logo / show-signature toggles — can now be set per business. Everything else (API keys, notification toggles, late fees, tip, deposit, thank-you email) stays one-set-per-install.
- How it works. Sections in Settings now show a Per business badge when they're scoped. With more than one business set up, a banner at the top says "Editing settings for {Business Name}" with a Switch link to /location-select. Saving from a tagged section writes an override just for that business; clearing the field falls back to the app-wide value. Cascade delete keeps overrides clean when a business is removed.
- Customer-facing. Public invoice and estimate links automatically render with the right business's name, logo, signature, color, template, and bank details — driven by the order's entity_id, not the install default.
- Notifications. Reminders + payment receipts use the right business name and currency symbol per invoice, not the install default.
- Numbering. Each business can have its own prefix (e.g. ACME for one, TC for the other) and a one-shot starting number that resets after first use, scoped to that business.
[2026-05-28] — Phase 2 + 3
- Estimates / quotes. New "Estimates" admin page (under Settings → More). Send a quote to a customer, they accept it with an on-screen e-signature, then convert it to an invoice with one tap. Estimates have their own statuses: Draft → Sent → Accepted (or Declined) → Converted.
- E-signature on quotes. Customer-facing estimate link has Accept and Decline buttons. Accept opens a signature pad — customer signs with finger (mobile) or mouse (desktop), types their name, done. Stored on the estimate; admin sees the signature on the order detail page.
- Recurring invoices. New "Recurring" admin page. Set up a template with a customer, services, cycle (weekly / monthly / yearly), and optional auto-charge. Each cycle, the cron generates a fresh invoice — and if auto-charge is on, charges the customer's saved card off-session.
- Auto-charge saved card. When a customer pays online (Stripe or Paystack), their card token is saved on their record. Recurring templates with "Auto-charge" enabled will then charge that card automatically each cycle without the customer doing anything. Failed charges leave the invoice unpaid so admin can follow up.
- Schedule send. Optional "Send this invoice on…" date on every new invoice. Invoice stays in Draft until the chosen date, then auto-sends + notifies the customer.
- "Invoice opened" tracking. When a customer first opens the invoice link, we stamp the time and fire a push notification to admin: "Adaeze opened invoice INV-…". Shown as a badge on the admin invoice detail.
- Auto late fees. Optional. Turn on in Settings → Late Fees, pick percent (e.g. 5% of balance) or flat amount, set a grace period (default 7 days after due date), and overdue invoices get a "Late Fee" line added automatically by the cron. Once per invoice — never double-charged.
- Deposit / down-payment. Optional per-invoice. Set a deposit amount; the customer's Pay button reads "Pay deposit · $X" until the deposit is met, then flips to "Pay balance · $Y".
- Thank-you email. Optional. When a payment is recorded (online, cash, or transfer), an automatic email goes out to the customer thanking them. Subject and body fully customizable with
{{customer_name}} / {{amount}} / {{invoice_number}} placeholders.
- Custom fields on invoices. Declare your own fields in Settings → Custom Fields. Each invoice + each line item can carry your custom data — PO number, vehicle reg, project reference, anything. Renders cleanly on the public invoice link.
- PDF / Invoice templates. Pick from 3 looks: Classic (default), Modern (bold totals, gradient header), Minimal (monochrome, no header band). Settings → Invoice Template. Live preview.
- Schema additions (lazy-migrated). orders gets
type, scheduled_send_at, sent_at, first_opened_at, deposit_amount, custom_fields, accepted_*, recurring_template_id, converted_from_estimate_id. order_items gets custom_fields. customers gets stripe_customer_id, paystack_authorization_code, email_verified_at. New tables: recurring_invoices, invoice_late_fee_log.
[2026-05-28]
- Brand color picker. Pick the color used for invoice headers, buttons, and your customer portal. Color wheel, hex input, and 6 one-tap swatches.
- Signature evolution. Three ways to set your signature now: upload an image, type your name in a cursive font (pick from Great Vibes / Dancing Script / Sacramento), or draw it with your finger on phone or mouse on desktop. Whichever mode you pick prints on every invoice and PDF.
- Custom invoice numbering. Override the default
INV prefix with your own (e.g. ACME, 2026). Optionally set the very next invoice number — useful when migrating from another system. After one use, daily numbering resumes automatically.
- Add credits and adjustments on any invoice. New "Add Credit" button on the invoice detail page. Enter a label (e.g. "Refund for damaged item") and a positive amount; it's applied as a negative line that reduces the total. Credit lines show in red so they're easy to spot. The system won't let a credit push an invoice below zero.
- Tip / gratuity on the customer pay page. Turn it on under Settings → Tip / Gratuity. Customers see percentage chips (default 10 / 15 / 20 / Custom) above the Pay button; the tip is added to the charged amount and recorded separately in the payment so you can break out revenue vs tips later.
- Files & photos visible on the public invoice. Attachments you mark "visible to customer" now show up in a grid on the shareable invoice link, with thumbnails for images and named-link tiles for PDFs.
- Export for QuickBooks. New button in Reports — one-click CSV in QuickBooks Online's invoice-import format. Hand it to your accountant and they import it straight in.
[2026-05-27]
- InvoiceTrack launched. A simple invoice app built for everyday business owners — no accounting jargon, no clutter. Pick a customer, tap your services, and send the invoice as a link, a WhatsApp message, an email, or a PDF.
- Send invoices any way your customer prefers. Each invoice has its own shareable link with a Pay button (Stripe or Paystack, whichever you've enabled), a Download-PDF button, plus one-tap WhatsApp, SMS, and email share.
- Get paid online with one tap. Customers click "Pay this invoice" on the link and pay by card — no sign-up required. Stripe (USD) and Paystack (NGN) supported.
- Partial payments fully supported. Customers can pay a portion now and the rest later. The balance updates itself, the history shows every payment, and the invoice flips to "Paid" once it's fully settled.
- Status flow you can follow at a glance. Draft → Sent → Due → Overdue → Paid (or Cancelled). The dashboard shows your unpaid, due-this-week, and overdue counts in one place.
- Save your services once, reuse forever. A built-in price list lets you save your services and prices, then tap to add them to any invoice — no retyping.
- Customer portal. Customers can sign in with their phone and PIN to see every invoice you've ever sent them, with payment history.
- Reports that actually help. Money collected, money still owed, top customers, top services, daily collection trends, and CSV export for everything.
- Automatic reminders. Upcoming-due, past-due, and overdue alerts go out by SMS and push notification — so you don't have to remember.
- Works on phone, tablet, and desktop. Mobile-first, no app install needed, runs in any browser.
- Built on the PropertyPro engine. This app reuses the same proven invoice + payment infrastructure, so it ships polished from day one.