Sorry, we don't support your browser.  Install a modern browser

Email invoice / chargeback /customer accounts#31

Ability to send chargeback invoices (could be Xero invoice integration). Could be done against account in POS or via Xero.

To explain in more detail, the order is sent to kitchen, and then emailed to the motel so it can be charged via hotel room. Then the unpaid balance sits in either the POS account or Xero.

10 months ago

Requirements
• Core Workflow: Orders entered in PushPOS, sent to kitchen. Post-payment, send email receipt to motel front desk (multiple recipients) and customer’s linked email. If customer details (name, room, email) exist, offer auto-send; otherwise, prompt for input. Unpaid balances track under the ‘Charge’ account in back office—currently functional but lacks polished reports/invoices or integrations.
• Email Receipt (MVP): Triggered post-payment. Content: Invoice-like format (HTML table for MVP, PDF attachment preferred) with order details (items, prices, totals), customer info (name, room), and charge instructions. Sent to motel front desk email(s) and customer email. Customizable templates deferred to later phase. No GDPR concerns.
• Chargeback Invoicing: Enables motel to pay restaurant for guest meals. Priority: 1) Email-based (extend receipt logic), 2) Webhooks for custom flows, 3) Xero integration for invoice/contact sync.
• Reporting/Outputs: From ‘Charge’ account balances. Formats: CSV (data export) and branded PDF (invoices/statements). Features: Download and email reports.
• Tech Stack: .NET/MySQL for POS extensions. Node.js/MongoDB for web platform tie-ins if needed (e.g., webhooks). Xero: Use API (Xero.NetStandard.OAuth2 library) for invoice/contact creation. Webhooks: HTTP POST with JSON payloads for events like balance creation.
• Users/Security: All POS users can send receipts (no new permissions). Back-office invoicing uses existing permissions. Error handling: Log email/webhook failures with user alerts (e.g., POS popups).
• Priorities: MVP = Post-payment email receipts with customer prompts. Next = PDF/CSV reports (download/email). Then webhooks/Xero integrationsXero/webhook endpoints.

10 months ago

Phase 1: MVP - Email Receipts (Quick Win)
Deliver post-payment email receipts with customer detail prompts.
• Implementation: Add “Send Receipt” button in PushPOS order screen (post-payment). If customer linked, include auto-send checkbox; else, show modal for name/room/email. Use .NET’s MailKit for SMTP emailing (reliable, supports attachments). Format body as HTML table (StringBuilder for items/totals). Generate PDF attachment via PdfSharp (.NET-compatible, free). Send to motel front desk email(s) and customer email. Store sent status in MySQL for auditing.
• Why First?: Addresses urgent need, leverages PushPOS payment hooks, minimal DB changes.
• Testing: Unit tests for email/PDF formatting; manual tests for prompts/sends.
• Phase 2: Reporting and Outputs
Enhance ‘Charge’ account balance handling with reports.
• Implementation: In back office, add “Generate Report” for ‘Charge’ balances (MySQL query). Output: CSV (CsvHelper library) and branded PDF (PdfSharp with logo/template). Add “Email Report” to send as attachment (reuse Phase 1 email logic). Support filters (e.g., date, room). Enable email-based chargebacks (e.g., PDF invoice to motel).
• Why Next?: Directly builds on MVP, addresses PDF/CSV priority.
• Phase 3: Advanced Integrations
Add chargeback flexibility.
• Webhooks: Implement in .NET (ASP.NET Web API). Trigger on events like balance creation. JSON payload with order/balance details. Bridge to Node.js/MongoDB web platform if needed (API calls).
• Xero Integration: Use Xero API (OAuth2). Auto-create invoices from ‘Charge’ balances (map to Xero fields, e.g., motel as contact, room as note). Sync status to MySQL.
• Enhancements: Add email template customization (store in DB). Support multiple recipients (comma-separated). Error handling: Retry queues for emails/webhooks, log failures.
• Testing: End-to-end with mock Xero/webhook endpoints.

10 months ago