Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
279 changes: 201 additions & 78 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,111 +1,234 @@
# ViewTouch Development Branch
<div align="center">

Welcome to the **dev** branch! This is a dedicated development environment for exploring, testing, and improving the ViewTouch codebase.
# ViewTouch©

## What is This Branch?
**The Original Graphical Touchscreen Restaurant Point of Sale Interface**

The `dev` branch serves as an **experimental and testing ground** for new features, improvements, and refactoring. Unlike the `master` branch (which mirrors the official ViewTouch repository), the `dev` branch contains:
[![Build Status](https://img.shields.io/travis/ViewTouch/viewtouch/master.svg?label=Travis)](https://travis-ci.org/ViewTouch/viewtouch/builds)
[![Discord](https://img.shields.io/discord/YOUR_SERVER_ID?color=7289da&label=Discord&logo=discord&logoColor=white)](https://discord.com/invite/ySmH2U2Mzb)
[![Join the chat at https://gitter.im/ViewTouch/viewtouch](https://badges.gitter.im/ViewTouch/viewtouch.svg)](https://gitter.im/ViewTouch/viewtouch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

- Latest code changes and enhancements
- Work-in-progress features
- Community-driven improvements
- Modern C++ refactoring and modernizations
- Static analysis fixes and code quality improvements
*ViewTouch is a registered trademark in the USA*

## For Developers & Community Contributors
[Website](http://www.viewtouch.com) • [Wiki & Documentation](../../wiki) • [Download Image](http://www.viewtouch.com/nc.html)

ViewTouch is **open to the community**! We welcome developers of all skill levels to:
</div>

✅ **Test your coding skills** — Improve and expand the ViewTouch codebase
✅ **Learn by doing** — Work with a real POS system written in modern C++
✅ **Use AI assistance** — Leverage tools like GitHub Copilot, ChatGPT, or Claude to accelerate development
✅ **Contribute improvements** — Submit pull requests with enhancements, bug fixes, and optimizations
✅ **Collaborate** — Join an active community dedicated to advancing ViewTouch
---

## Table of Contents

- [About](#about)
- [Quick Start](#quick-start)
- [Hardware](#hardware)
- [Screenshots](#screenshots)
- [History](#history)
- [Contact & Support](#contact--support)
- [License](#license)

---

## About

ViewTouch is a powerful, open-source Point of Sale system designed specifically for the restaurant and hospitality industry. With over four decades of development, it combines the reliability of Linux with the flexibility of the X Window System to deliver a robust, network-transparent POS solution.

### Key Features

- **Full High Definition Graphical Interface** - ViewTouch runs on (*requires*) displays with 1920 x 1080 resolution
- **Lightning-fast performance** - Entire transaction history kept in RAM for instant reporting
- **Network transparency** - Remote display capability via X Window System
- **Comprehensive reporting** - Real-time drill-down analytics and decision support
- **Labor management** - Interactive time clock with overtime alerts and cost control
- **Cross-platform** - Runs on Raspberry Pi 4/5, x86, and ARM architectures
- **Mobile integration** - Android tableside order entry support
- **Multilingual support** - Built-in language pack system
- **Cross platform solution** - Can be used on a wide variaty of linux distros thanks to the universal installer

> **Note:** For build instructions and the latest announcements, visit the [Wiki](../../wiki).

---

## Quick Start

### Download Pre-built Image

[Download the latest ViewTouch image](http://www.viewtouch.com/nc.html) for Raspberry Pi (4 or 5). Write the image to a 32GB or larger microSD card, and boot directly to the ViewTouch desktop with full POS functionality.

#### Building

See the [Wiki](../../wiki) for detailed build instructions and development setup. Make sure your display is 1920 x 1080.

---

## Hardware

### Official ViewTouch Point of Sale Computer

<div align="center">

![ViewTouch Point of Sale Computer with 15.8" Display](https://www.viewtouch.com/poscomputer.avif)

**15.8" All-in-One Touchscreen POS Computer**
Powered by Raspberry Pi Compute Module 5
Manufactured by Chipsee, Beijing, China

</div>

ViewTouch offers all-in-one Point of Sale computers featuring:
- 15.8" capacitive touchscreen display (1920×1080 resolution, which is the required resolution for any display running ViewTouch)
- Raspberry Pi 5 Compute Module
- Pre-installed ViewTouch software
- Network-ready for multi-terminal setups

With open-source code and Raspberry Pi hardware, restaurateurs can now fully automate their operations with complete control over their POS system, including source code access.

### Mobile Support

Thanks to Pelya (Sergii Pylypenko) and Ariel Brambila Pelayo for ensuring that with [Xsdl](https://apkpure.com/xserver-xsdl/x.org.server) mobile Android devices as wireless ViewTouch tableside order entry displays.

---

## Screenshots

> *Screenshots shown in 1280×1024 resolution, however, note that the Default (*required*) ViewTouch display resolution is 1920×1080 !*

### Time Clock and Secure Log On

## ⚠️ Important Warning: Development Build Instability
![Touchscreen Password, Log On and Timeclock](http://www.viewtouch.com/vtscrn1.png)

**THIS IS A DEVELOPMENT BUILD** — Expect bugs, incomplete features, and breaking changes.
---

### Order Entry - Lightning Fast Interface

**Order Breakfast, then Display and/or Print in Kitchen**

![Order Breakfast, then Display and/or Print in Kitchen](http://www.viewtouch.com/vtscrn6.png)

---

### Labor Management

**Time Clock Review and Edit - Control Labor Expense**
Back Office, Comprehensive Labor Costing, Overtime Alerts, Interactive Time Clock Review and Editing

![Time Clock Review and Edit - Control Labor Expense](http://www.viewtouch.com/vtscrn3.png)

---

### Real-time Analytics

**Decision Support: Fly-Over, Drill-Down in Real Time**
Touch 'n' View Any Day or Any Period Updated Every Minute

![Decision Support: Fly-Over, Drill-Down in Real Time](http://www.viewtouch.com/vtscrn5.png)

ViewTouch doesn't just store your data—it keeps your entire transaction history in RAM for perfect accuracy and lightning speed. Auditors can see compliance across every period. Control non-cash revenue adjustments and labor costs, including non-intuitive details, shift by shift, weekly, monthly, quarterly, and yearly.

---

- **Frequent Changes**: Code is actively being modified and tested
- **Known Issues**: This branch will contain bugs and incomplete implementations
- **Not Production Ready**: Do NOT use this build in production environments
- **Testing Required**: Features may fail or behave unexpectedly
## History

## Reporting Issues
### Origins (1979-1986)

Found a bug? Help us improve! Please report issues on our [Issues Page](../../issues) with:
Gene Mosher began writing Point of Sale code on an Apple ][ in 1979. ViewTouch© as we know it today was first created by restaurateur Gene Mosher and C programmer Nick Colley in **1986**, making it the **ORIGINAL Graphical Touchscreen Restaurant Point of Sale Interface**.

📝 **Detailed Information**:
- Steps to reproduce the issue
- Expected vs. actual behavior
- Screenshots or error logs (if applicable)
- Your environment (OS, ViewTouch version, build type)
- Relevant code snippets or stack traces
**First Public Demonstration:** ComDex, Las Vegas, November 1986
[See historical photo](https://commons.wikimedia.org/wiki/File:Comdex_1986.png)

📋 **Issue Template**:
```
**Describe the bug:**
[Clear description of the issue]
**Early Platform:** Atari ST computers (1986-1993/4 under Jack Tramiel)

**Steps to reproduce:**
1. [First step]
2. [Second step]
3. [What happens]
**Initial Funding & Support:**
- Ed Ramsay (1986 - code development funding)
- Barbara Mosher (1986 - present, ongoing financial support)
- John King, M.D., Chicago (early funding)

**Expected behavior:**
[What should happen]
### Modern Era (1995-1998)

**Environment:**
- OS: [e.g., Ubuntu 20.04]
- ViewTouch Version: [e.g., dev branch, commit hash]
- Build Type: [Debug/Release]
The current version of ViewTouch was created by Gene Mosher and C programmer Richard Bradley, transitioning to:
- **UNIX (AIX)** on Motorola PowerPC (1995)
- **MIT's X Window System** for network-transparent graphical interface (1995)
- **Linux on Intel x86** (1997)

**Additional context:**
[Any other relevant information]
```
**Major Funding:** Billy Foster (1995-1998)

## Getting Started
### Enhancement Period (2000-2004)

### Build and Test
- **C to C++ transition** (2000-present day)
- Extensive code enhancement by Bruce King (2000-2004) Ariel Brambila Pelayo (2025)
- **Major Funding:** Doug DeLeeuw

```bash
# Clone the repository
git clone https://github.com/ViewTouch/viewtouch.git
cd viewtouch
git checkout dev
### Open Source Era (2014-Present)

# Build (Debug)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build -j$(nproc)
ViewTouch released under GNU Public License (GPL v3) with code hosted on GitHub. Significant modernization and refinement by the open-source community:

# Run tests
cd build && ctest --output-on-failure -j$(nproc)
**Key Contributors:**
- **Jack Morrison** - Amazing debugging skills
- **NeroBurner (Reinhold Gschweicher)** - Major refactoring and standardization
- **NoOne558 (Ariel Brambila Pelayo)** - Upgraded to Xft scalable fonts, mobile integration, AI-empowered refactoring of the entire ViewTouch code base.
- **Gene and Barbara Mosher** - Lifetime support and funding
- **Ariel Brambila Pelayo** - awarded co-ownership status of ViewTouch code and documentation at GitHub

# Build (Release)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
```
### Platform Evolution

### Contribute
| Year | Platform | Key Technology |
|------|----------|----------------|
| 1979 | Apple ][ | Initial POS code |
| 1986 | Atari ST | First GUI touchscreen POS |
| 1995 | AIX/PowerPC | UNIX + X Window System |
| 1997 | Linux/x86 | Intel architecture |
| 2000 | Linux/x86 | C++ transition |
| 2016+ | Raspberry Pi | Default platform (Pi 4/5) |

1. **Create a feature branch** from `dev`
2. **Make your changes** and commit with clear messages
3. **Test thoroughly** — build, run tests, smoke test the UI
4. **Submit a pull request** with detailed description
5. **Respond to feedback** and iterate
**Current Stack:**
- **OS:** Debian Linux with XFCE desktop
- **Display:** X Window System (network-transparent)
- **Default Hardware:** Raspberry Pi family
- **Auto-update:** Desktop icon compiles and installs latest code from GitHub

## Branch Strategy
Gene Mosher's passion and vision has overseen the development, management, and maintenance of ViewTouch code across six decades, spanning a wide array of computers and point of sale equipment. Gene owns the ViewTouch copyright and remains active in ViewTouch in 2025. A personal note to everyone from Gene: I am getting on in years and everyone has always wanted me to tell them what will happen to ViewTouch if/when something happens to me. In 2025 I can reassure that I will be participating in the development of ViewTouch until my last breath, which could easily be 2050 (I'll be 101 then), and with Ariel, who is about half a century younger than I am, being awarded co-ownership of the ViewTouch code and documentation at ViewTouch/GitHub, nothing bad can happen, is going to happen, to ViewTouch. I myself used to wonder about the future of ViewTouch, but I no longer do wonder about the future of ViewTouch. It's going to be alive, healthy, vibrant and dynamic for a long, long time. A new chapter has been opened for ViewTouch in 2025 and I could not be happier about it. Anyone can be a part of the future of ViewTouch - I welcome all who will join us.

- **`master`**: Official ViewTouch repository mirror (stable, upstream-aligned)
- **`dev`**: Development and testing branch (active work, may be unstable)
---

## Contact & Support

### Commercial Support

**ViewTouch Official**
- **Website:** [www.viewtouch.com](http://www.viewtouch.com)
- **Email:** [email protected]
- **Phone:** 541-515-5913

### Community

## Resources
- **Discord:** [Join our server](https://discord.com/invite/ySmH2U2Mzb)
- **GitHub Issues:** Bug reports and feature requests
- **Gitter Chat:** [Join the conversation](https://gitter.im/ViewTouch/viewtouch)
- **Wiki:** Documentation and guides

- 📚 [Documentation](./docs/)
- 🐛 [Report Issues](../../issues)
- 💬 [Discussions](../../discussions)
- 📖 [Changelog](./docs/changelog.md)
The availability of ViewTouch source code and documentation at GitHub benefits clients, customers, and associates of Gene Mosher, facilitating the enhancement and extension of ViewTouch source code.

---

**Happy coding! Together, we're building the future of ViewTouch.** 🚀
## License

ViewTouch is released under the **GNU General Public License, version 3 (GPL v3)**.

See [LICENSE](LICENSE) for full details.

---

## Payment Processing

ViewTouch does not manage electronic payment processing. Please make your own decisions with regard to Electronic Funds Transfer functionality.

---

<div align="center">

**ViewTouch** - *Six decades of innovation in restaurant technology*
## Be sure to reach out to our team for any questions, we are always happy to help.😊

Made with ❤️ by the ViewTouch community

</div>
60 changes: 60 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,43 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]

### Fixed
- **UI: Add Dollar Signs to Guest Check and Payment Summary Amounts (2026-01-15)**
- Fixed missing dollar signs ($) on amounts displayed in Payment Summary window and Guest Check Window menu items
- **Root Cause**: `Terminal::FormatPrice()` has a default parameter `sign = 0` which excludes the currency symbol, and many calls used this default instead of explicitly setting `sign = 1`
- **Solution**: Changed all `FormatPrice()` calls in check display functions to use `sign = 1` to include dollar signs on all amounts (individual items, modifiers, taxes, payments, and totals)
- **Files modified**: `main/business/check.cc` (MakeReport function and related price display calls)
- **Impact**: Guest Check Window and Payment Summary now consistently display all amounts with proper currency formatting including dollar signs

- **Settlement Page: Highlight Current Guest Check with Status (2026-01-15)**
- Added highlighting and status display for current guest check when multiple checks exist on settlement page
- **Changes Made**:
- Changed subcheck display from "#1" to "Check #1 - Open/Closed/Voided"
- Added background highlighting for the currently selected subcheck
- Used blue text color for better visibility when highlighted
- **Files modified**: `zone/payment_zone.cc` (header rendering in Render function)
- **Impact**: Users can now clearly see which guest check is currently selected on the settlement page, with status information and visual highlighting

- **Payment Zone: Hide Zero VAT Display (2026-01-15)**
- Fixed VAT .00 being displayed unnecessarily when VAT amount is zero
- **Root Cause**: VAT display only checked if VAT tax rate was configured (`settings->tax_VAT > 0`) but not if the calculated VAT amount was actually greater than zero
- **Solution**: Added condition to check both `settings->tax_VAT > 0` AND `subCheck->total_tax_VAT != 0`
- **Files modified**: `zone/payment_zone.cc` (VAT display logic in Render function)
- **Impact**: VAT is now only displayed when there is an actual VAT amount to show, reducing UI clutter

- **Printer: Prevent USB Printer Hanging (2026-01-15)**
- Fixed application hanging when USB printer is unavailable
- **Root Cause**: `open()` system call for printer device files would block indefinitely when USB printer was disconnected or unavailable
- **Solution**: Added `O_NONBLOCK` flag to printer device open call to prevent blocking
- **Files modified**: `main/hardware/printer.cc` (ParallelPrint function)
- **Impact**: Application continues to function normally even when USB printers are unavailable, preventing system hangs

- **Per-Terminal Button Image Settings: Preserve Individual Terminal Preferences (2026-01-15)**
- Fixed global "Show Button Images" setting incorrectly overriding per-terminal customizations
- **Root Cause**: The global setting was being applied universally, ignoring individual terminal configurations
- **Solution**: Added `show_button_images_custom` flag to Terminal class to track when users have customized per-terminal settings, preserving their preferences when global setting changes
- **Files modified**: `main/hardware/terminal.cc`, `main/hardware/terminal.hh`
- **Impact**: Terminals now maintain their individual button image display preferences even when global settings are modified

- **Button Highlighting Bug - Remove Broken Static Cache (2026-01-10)**
- Fixed buttons incorrectly showing highlighted/yellow state
- **Root Cause**: The static tile cache optimization in `Layer::Rectangle()` was fundamentally broken. Static variables persisted across all calls, causing stale cache values to be used when rendering buttons with different textures.
Expand All @@ -20,6 +57,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- **Files modified**: `term/term_view.cc`, `term/term_view.hh`

### Added
- **Payment Processing: Complete Debit Card Fee Support (2026-01-15)**
- Added comprehensive debit card fee tender types with full tax handling support
- **New Tender Types Added**:
- DEBIT_FEE_PERCENT: Debit card fee as percentage of transaction
- DEBIT_FEE_DOLLAR: Debit card fee as fixed dollar amount
- DEBIT_FEE_TAXABLE_PERCENT: Debit card fee as percentage with tax calculation
- DEBIT_FEE_TAXABLE_DOLLAR: Debit card fee as fixed dollar amount with tax calculation
- **Implementation Details**:
- Added tender type definitions and fee calculation logic in Check class
- Updated payment zone processing to handle debit fee calculations
- Added proper localization support for debit fee display names
- **Files modified**: `main/business/check.cc`, `main/business/check.hh`, `zone/payment_zone.cc`, `main/data/settings.cc`, `main/ui/labels.cc`, `main/data/locale.cc`
- **Impact**: Full debit card fee processing capability with proper tax handling and UI display

- **Performance: Object Pool System for Memory Efficiency (2026-01-09)**
- Created `src/core/object_pool.hh` with thread-safe object pooling templates
- `ObjectPool<T>`: Reusable object pool with configurable max size (default 64)
Expand All @@ -33,6 +84,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- **Target**: Raspberry Pi CM5 with 2GB RAM optimization

### Improved
- **UI: Clean Credit Card Fee Display Labels (2026-01-15)**
- Removed redundant "(Percent)" and "(Dollar)" text from credit card fee display names for cleaner UI
- **Changes Made**:
- Simplified TenderName array entries to remove duplicate type indicators
- Updated TenderName method to return cleaner display strings
- Updated localization files to match simplified naming convention
- **Files modified**: `main/ui/labels.cc`, `main/data/settings.cc`, `main/data/locale.cc`
- **Impact**: Credit card fee options now display with cleaner, less cluttered text in the UI

- **UI: Modernized Quantity Entry Keypad (2026-01-14)**
- Completely redesigned the numeric keypad for item quantity entry with a modern phone-style layout (1-2-3 on top row, 4-5-6 middle, etc.)
- Removed the arbitrary 5-item limit; now allows unlimited increments up to 10,000 with a single button press
Expand Down
Loading