Repository navigation
Open
Labels
area:backendBackend (Express/SQLite)area:frontendFrontend (React/Next.js)enhancementNew feature or requestpriority:normalNormal priority against the backlogstate:needs-designNeeds a design/scope decision before work startstype:featureNew capability or enhancement request
Description
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.mdexplicitly 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 -#279already 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
- Strict tax separation (Core Invariant fix(tests): fix EBUSY crash on Windows, correct Unicode receipt assertions, graceful printer skip #3 & Add AppX tile assets to resolve Windows Store certification failure (10.1.1.11) #5): Tips sit strictly outside the tax base (
taxableBase), never altersubtotalortax_amount, and remain separate fromservice_chargeincharges_breakdown, receipts, and Z-reports. - Minor-unit accounting: Store
tip_amount_cents(integer minor units viagetCurrencyMinorUnitFactor()) and track tip payment tender (cashvscard/other) so cash tips reconcile accurately against expected cash drawer totals (cash_sessions/cash_closures). - Store-level toggle: Disabled by default (
tips_enabled = 'false') so venues that do not accept tips experience zero checkout friction.
Scope / Acceptance Criteria
- Phase 1 (Manual Cashier Tip Entry & Daily Tips Report - independent of
#362CFD): Addtips_enabledand configurable preset percentages (default10%,15%,20%) in Settings; add optional Tip input (None / presets / custom amount, removable before finalize) inPaymentModal&PrepaidCheckoutModalstoringtip_amount_cents+ tender method + optional staff attribution onbills. - Surface tips cleanly as a separate line on receipts (
shared/print/document.ts, passingnpm 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
#362lands. - Backend unit & integration tests wired into
package.jsonproving 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
- Cash tips in drawer vs tip jar: Confirm store-level setting for whether cash tips count into
expected_cash_centsincash_sessions/ Z-reports (default: yes when recorded as cash tender, with optional payout deduction via cash drawer movement). - Tip refund behavior: Confirm whether refunding a bill defaults to refunding sale subtotal only or allows explicitly including
tip_amount_centsinside refundable ceiling (main/services/refund.ts). - 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).
Metadata
Metadata
Assignees
Labels
area:backendBackend (Express/SQLite)area:frontendFrontend (React/Next.js)enhancementNew feature or requestpriority:normalNormal priority against the backlogstate:needs-designNeeds a design/scope decision before work startstype:featureNew capability or enhancement request
Activity
araguz90 commentedon Sep 10, 2026
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:
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.
khaira777 commentedon Oct 23, 2026
Update from the #830 support close-out (verified against
main@ 8e39053, 23 Oct):tip_amount,gratuityandtipsreturn 0 hits inmain,sharedandfrontend/src, anddocs/reference/daily-sales-export.mdsays "No tips".service_charge_totalin the daily export.