Skip to content

Feature: Tipping (separate tip_amount, customer-facing selection) #364

Open

Description

@khaira777

Problem

Merchants need to record customer gratuities/tips cleanly as a separate non-taxable ledger value (tip_amount) - never conflated with taxed service_charge or discounts - and report daily tips accurately for staff payout and cash-drawer reconciliation. Operators without a customer-facing display or integrated card terminal (e.g., external card machines, counter cafes, food trucks) specifically need fast manual cashier tip entry at checkout plus a daily tips report.

Codebase Anchor

  • main/db.ts (bills, cash_sessions, cash_closures - verified 0 tip columns exist today; docs/reference/daily-sales-export.md explicitly states "No tips").
  • main/routes/bills.ts (POST /api/bills/:id/pay, multi-tender settlement), main/routes/cash-sessions.ts & main/routes/cash-closures.ts (shift & Z-report cash reconciliation - #279 already shipped), main/services/daily-sales-export.ts, main/routes/reports.ts.
  • frontend/src/components/pos/PaymentModal.tsx, frontend/src/components/pos/PrepaidCheckoutModal.tsx, shared/print/document.ts.

Core Invariants & Constraints

Scope / Acceptance Criteria

  • Phase 1 (Manual Cashier Tip Entry & Daily Tips Report - independent of #362 CFD): Add tips_enabled and configurable preset percentages (default 10%, 15%, 20%) in Settings; add optional Tip input (None / presets / custom amount, removable before finalize) in PaymentModal & PrepaidCheckoutModal storing tip_amount_cents + tender method + optional staff attribution on bills.
  • Surface tips cleanly as a separate line on receipts (shared/print/document.ts, passing npm run test:receipt-column-oracle), X/Z reports, daily-sales-export.ts, and a Daily Tips breakdown in Reports filterable by date, payment method, and staff member.
  • Phase 2 (CFD Prompt): Push interactive tip selection prompt onto the second screen once #362 lands.
  • Backend unit & integration tests wired into package.json proving zero tax impact, cash-drawer reconciliation for cash vs card tips, and refund interaction (partial/full refund rules on tips).

Concrete Design Decisions to Lock Before Coding

  1. Cash tips in drawer vs tip jar: Confirm store-level setting for whether cash tips count into expected_cash_cents in cash_sessions / Z-reports (default: yes when recorded as cash tender, with optional payout deduction via cash drawer movement).
  2. Tip refund behavior: Confirm whether refunding a bill defaults to refunding sale subtotal only or allows explicitly including tip_amount_cents inside refundable ceiling (main/services/refund.ts).
  3. Staff attribution: Confirm whether Phase 1 attributes tips to the order creator / closing cashier (with optional selector) while deferring multi-staff tip pooling splits to a later phase.

Out of Scope

  • Automated multi-staff tip-pool percentage formulas or payroll disbursement.
  • Integrated payment-terminal tip-adjust callbacks (Phase 3 after global card terminals).

Activity

  1. added
    enhancement
    area:frontend
    area:backend
    on Aug 17, 2026
  2. araguz90 commented on Sep 10, 2026

    @araguz90

    Hello. First, I want to thank you for the software you’ve created; I’d like to leave a comment and share some ideas regarding this implementation.

    I had originally planned to fork the project and implement a tipping function myself, but I see you are already working on something—perhaps an even better implementation than what I had in mind.

    Real-world experience:
    At our food truck, cash tips are handed over immediately, but card tips involve a more complex workflow. We use a payment terminal that calculates the card surcharge and then asks the customer how much they want to tip (10%, 15%, 20%, custom amount, or no tip). Afterward, we manually note down the tip amount in a notebook (since the payment terminal's software doesn't generate reports showing which staff member received the tip or the specific amount).

    First idea:
    My idea was simply to implement a way to log servers and tips without affecting the customer's total bill. The server would enter the tip amount into their FloCafe screen; once the payment terminal confirmed the transaction, they would mark the order as paid on the FloCafe screen.

    The workflow would look like this:
    At checkout:
    Select the "Card" payment option.
    Display three text fields:

    • The first showing the logged-in user's name.
    • The second for the payment reference or transaction number provided by the terminal.
    • The third for the tip amount.
      Then, confirm the payment.

    Report:
    Include a report that allows filtering by date and by server/cashier to show the total tips for the day.

    Fraudulent tips

    Since Flocafe doesn't have its own dedicated payment gateway (though one might be implemented in the future),

    the tip amounts might differ between the two terminals—the Flocafe system and the card payment terminal. However, this can be resolved through regular audits: at the end of the month, the only tip report provided by the payment terminal is the total, and this must match the Flocafe tip report.

    That concludes my thoughts on this idea; I hope I’ve conveyed my concept clearly. English isn't my native language. I’m not sure if I’ll be able to implement this in my own Flork instance due to time constraints, but I’d be happy to provide feedback once I see the PR for this feature.

  3. khaira777 commented on Oct 23, 2026

    @khaira777
    ContributorAuthor

    Update from the #830 support close-out (verified against main @ 8e39053, 23 Oct):

    • There is still no tip code. tip_amount, gratuity and tips return 0 hits in main, shared and frontend/src, and docs/reference/daily-sales-export.md says "No tips".
    • Field requirements gathered since this issue was written:
      • Nicaragua merchant (27 Sep): a waiter tip percentage, removable per invoice, with tax untouched (the tip is outside the tax base).
      • Mexico merchant (27 Sep): today they use the manual "service charges" tax category as a workaround, and worry about the invoicing breakdown.
      • Brazil merchant (13 and 22 Sep): the service amount is paid to employees monthly, so they need it reported separately. Partly covered now: the optional or waivable service charge (feat(pos): unified charges and fees engine #947) and separate service_charge_total in the daily export.
    • Interim workaround available today: an optional percentage custom charge with no tax category, waivable per bill (feat(pos): unified charges and fees engine #947, feat(catalog): consolidate add-on editor and add charge presets (#1155, #1157) #1186). It is not attributed to a waiter.
    • Scope note (27 Sep): planned for after the next release, because taxes and reporting make it complex.
  4. added
    priority:normal
    type:feature
    state:needs-design
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backendarea:frontendenhancementpriority:normalstate:needs-designtype:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions