Skip to content

Feature: Optional kitchen delivery enforcement before billing with KDS-disabled bypass #834

Closed

Description

@khaira777

Problem or motivation

Operators have raised conflicting operational expectations around whether the POS should permit billing/checkout (Cobrar) while items are still pending or in progress in the kitchen:

  1. Table-service / fulfillment-first venues: Some operators expect that cashiers cannot charge a table until all items are marked as delivered (served / entregado), preventing premature billing or closing orders where the kitchen missed an item.
  2. Printer-only venues (KDS disabled): Many operators do not use a Kitchen Display System at all (kds_enabled = 'false') and rely exclusively on paper KOT slips. In a printer-only kitchen, there is no screen for kitchen staff to transition item states (pending \u2192 preparing \u2192 ready \u2192 served). If checkout required items to be delivered, printer-only businesses would be completely blocked from taking payments:

    "mutfak ekran\u0131 sistemi kapal\u0131ysa b\u00f6yle olmal\u0131 ama \u00e7\u00fcnk\u00fc bu \u00f6zelli\u011fi kullanmayan i\u015fletmeler var yaln\u0131zca yaz\u0131c\u0131 kullan\u0131yoruz." (If the kitchen display system is off, it should be like this [allow billing], because there are businesses that do not use this feature, we only use a printer.)

Current behavior

In FloCafe today:

  • Bill generation and payment settlement (/bills/generate and /bills/:id/payment) allow charging at any time.
  • When full payment is collected, FloCafe automatically transitions all remaining pending, preparing, and ready items to served and marks the order as completed.
  • This ensures prepaid, postpaid, KDS-enabled, and printer-only stores all function seamlessly without getting blocked.

Desired outcome

Provide an optional operational setting for venues that want to enforce delivery before settlement, while guaranteeing that printer-only setups are never broken:

  1. Configurable setting: An opt-in setting in Operations/POS Settings: require_kitchen_delivered_before_settlement (default: false).
  2. Automatic KDS bypass: If kds_enabled = 'false', the delivery check is automatically bypassed, even if the setting is turned on.
  3. Prepaid bypass: Prepaid / counter orders (billing_type === 'prepaid') are paid upfront before kitchen dispatch, so the check only applies to postpaid checkout.
  4. Manager override: If active, the checkout modal blocks settlement with a clear message (e.g. "Cannot checkout: 2 items still in preparation in kitchen"), but allows an Owner/Manager PIN override for exceptional customer situations.

Proposed technical approach

  • Settings table: Add require_kitchen_delivered_before_settlement boolean setting (default: false).
  • Backend check (main/routes/bills.ts):
    • In POST /api/bills/generate and/or POST /api/bills/:id/payment:
      • If getSettingValue('require_kitchen_delivered_before_settlement') === 'true' AND getSettingValue('kds_enabled') === 'true':
        • Query order_items for the order: check if any active items are in pending, preparing, or ready.
        • If found and no valid manager override_pin is supplied, return 409 Conflict with details on unfulfilled items.
  • Frontend (TableCheckoutModal.tsx / OrderCard.tsx):
    • Surface a warning/block if the order has undelivered kitchen items when the setting is active, offering an option to enter a Manager PIN to proceed.

Area

POS / Checkout, Kitchen Display (KDS) & Stations

Activity

  1. added
    enhancement
    area:frontend
    area:backend
    type:feature
    state:needs-design
    on Sep 23, 2026
  2. khaira777 commented on Oct 5, 2026

    @khaira777
    ContributorAuthor

    Closed as completed. Shipped in PR #941 (optional kitchen delivery enforcement before billing, KDS bypass, and manager override PIN).

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:frontendenhancementstate:needs-designtype:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions