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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-null-dereference")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-dangling-reference")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdouble-promotion")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-system-headers") # Suppress warnings from external libraries
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized") # Suppress uninitialized variable warnings from external date library

# Performance optimizations
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
Expand Down
10 changes: 10 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- `zone/order_zone.cc` (modified rendering logic)
- **Impact**: Staff can now easily identify unavailable items, managers can quickly toggle item availability, improves operational efficiency during stock shortages

- **Fixed Order Entry Total Off-by-One-Cent Issue with Tax (2026-01-31)**
- Resolved discrepancy between Order Entry zone total display and actual check total when tax is included
- **Changes Made**:
- Modified OrderEntryZone::Render to use pre-calculated tax totals from SubCheck instead of recalculating tax per individual order
- Replaced per-order tax summation with direct use of aggregated tax fields (total_tax_food, total_tax_GST, etc.)
- **Root Cause**: Order Entry zone was calculating tax by summing individual order taxes, while check totals use aggregated tax calculation, causing rounding differences
- **Solution**: Use the same tax calculation method as the main check total for consistency
- **Files modified**: `zone/order_zone.cc` (OrderEntryZone::Render method)
- **Impact**: Order Entry zone now displays the exact same total as the final check, eliminating confusion for staff

### Fixed
- **Fixed GCC 14 Warning in Date Library (2026-01-25)**
- Resolved stringop-overflow warning in external/date/include/date/date.h when compiling on Raspberry Pi Compute Module 5 with GCC 14
Expand Down
2 changes: 1 addition & 1 deletion main/ui/chart.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _CHART_HH
#define CHART_HH
#define _CHART_HH

#include "list_utility.hh"
#include "utility.hh"
Expand Down
2 changes: 1 addition & 1 deletion term/term_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ class IconifyButton : public LO_PushButton
*code accordingly. In that case, you should also make the code
*more dynamic, though it should still be quite fast.
****/
virtual bool IsPointIn(int px, int py) // Overrides RegionInfo::IsPointIn but not marked virtual in intermediate classes
virtual bool IsPointIn(int px, int py) const noexcept override // Overrides RegionInfo::IsPointIn but not marked virtual in intermediate classes
{
return (px >= (x - EXTRA_ICON_WIDTH)) &&
(py >= y) &&
Expand Down
2 changes: 1 addition & 1 deletion zone/account_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _ACCOUNT_ZONE_HH
#define ACCOUNT_ZONE_HH
#define _ACCOUNT_ZONE_HH

#include "form_zone.hh"

Expand Down
2 changes: 1 addition & 1 deletion zone/button_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _BUTTON_ZONE_HH
#define BUTTON_ZONE_HH
#define _BUTTON_ZONE_HH

#include "pos_zone.hh"
#include "layout_zone.hh"
Expand Down
2 changes: 1 addition & 1 deletion zone/cdu_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

#ifndef _CDU_ZONE_HH
#define CDU_ZONE_HH
#define _CDU_ZONE_HH

#include "cdu.hh"
#include "form_zone.hh"
Expand Down
2 changes: 1 addition & 1 deletion zone/chart_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _CHART_ZONE_HH
#define CHART_ZONE_HH
#define _CHART_ZONE_HH

#include "pos_zone.hh"
#include "list_utility.hh"
Expand Down
2 changes: 1 addition & 1 deletion zone/check_list_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _CHECK_LIST_ZONE_HH
#define CHECK_LIST_ZONE_HH
#define _CHECK_LIST_ZONE_HH

#include "form_zone.hh"
#include "layout_zone.hh"
Expand Down
4 changes: 2 additions & 2 deletions zone/creditcard_list_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* Touch zone for managing credit cards
*/

#ifndef CREDITCARD_LIST_ZONE_HH
#define CREDITCARD_LIST_ZONE_HH
#ifndef _CREDITCARD_LIST_ZONE_HH
#define _CREDITCARD_LIST_ZONE_HH

#include "form_zone.hh"
#include "credit.hh"
Expand Down
2 changes: 1 addition & 1 deletion zone/dialog_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _DIALOG_ZONE_HH
#define DIALOG_ZONE_HH
#define _DIALOG_ZONE_HH

#include "check.hh"
#include "layout_zone.hh"
Expand Down
4 changes: 2 additions & 2 deletions zone/form_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* base touch zone for data entry and display
*/

#ifndef FORM_ZONE_HH
#define FORM_ZONE_HH
#ifndef _FORM_ZONE_HH
#define _FORM_ZONE_HH

#include "layout_zone.hh"
#include "report.hh"
Expand Down
2 changes: 1 addition & 1 deletion zone/inventory_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _INVENTORY_ZONE_HH
#define INVENTORY_ZONE_HH
#define _INVENTORY_ZONE_HH

#include "form_zone.hh"

Expand Down
2 changes: 1 addition & 1 deletion zone/labor_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _LABOR_ZONE_HH
#define LABOR_ZONE_HH
#define _LABOR_ZONE_HH

#include "form_zone.hh"

Expand Down
4 changes: 2 additions & 2 deletions zone/layout_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* base class zone object for display layout
*/

#ifndef LAYOUT_ZONE_HH
#define LAYOUT_ZONE_HH
#ifndef _LAYOUT_ZONE_HH
#define _LAYOUT_ZONE_HH

#include "pos_zone.hh"
#include "terminal.hh"
Expand Down
2 changes: 1 addition & 1 deletion zone/login_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _LOGIN_ZONE_HH
#define LOGIN_ZONE_HH
#define _LOGIN_ZONE_HH

#include "layout_zone.hh"

Expand Down
2 changes: 1 addition & 1 deletion zone/merchant_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _MERCHANT_ZONE_HH
#define MERCHANT_ZONE_HH
#define _MERCHANT_ZONE_HH

#include "form_zone.hh"

Expand Down
15 changes: 3 additions & 12 deletions zone/order_zone.cc
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,9 @@ RenderResult OrderEntryZone::Render(Terminal *t, int update_flag)
// Draw Footer
// Calculate total with tax
int base_total = sc->raw_sales - sc->item_comps;
int total_tax = 0;

// Calculate tax for all orders in the subcheck
Order *order = sc->OrderList();
while (order)
{
if (!(order->status & ORDER_COMP))
{
total_tax += order->CalculateTax(s, t);
}
order = order->next;
}
int total_tax = sc->total_tax_food + sc->total_tax_alcohol + sc->total_tax_GST +
sc->total_tax_PST + sc->total_tax_HST + sc->total_tax_QST +
sc->total_tax_room + sc->total_tax_merchandise + sc->total_tax_VAT;

int total_with_tax = base_total + total_tax;

Expand Down
2 changes: 1 addition & 1 deletion zone/order_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _ORDER_ZONE_HH
#define ORDER_ZONE_HH
#define _ORDER_ZONE_HH

#include "layout_zone.hh"

Expand Down
2 changes: 1 addition & 1 deletion zone/payment_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _PAYMENT_ZONE_HH
#define PAYMENT_ZONE_HH
#define _PAYMENT_ZONE_HH

#include "layout_zone.hh"
#include "check.hh"
Expand Down
2 changes: 1 addition & 1 deletion zone/payout_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _PAYOUT_ZONE_HH
#define PAYOUT_ZONE_HH
#define _PAYOUT_ZONE_HH

#include "layout_zone.hh"

Expand Down
2 changes: 1 addition & 1 deletion zone/phrase_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _PHRASE_ZONE_HH
#define PHRASE_ZONE_HH
#define _PHRASE_ZONE_HH

#include "form_zone.hh"

Expand Down
4 changes: 2 additions & 2 deletions zone/pos_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* Definition of zone types & other zone data
*/

#ifndef POS_ZONE_HH
#define POS_ZONE_HH
#ifndef _POS_ZONE_HH
#define _POS_ZONE_HH

#include "zone.hh"

Expand Down
2 changes: 1 addition & 1 deletion zone/printer_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _PRINTER_ZONE_HH
#define PRINTER_ZONE_HH
#define _PRINTER_ZONE_HH

#include "form_zone.hh"
#include "zone_object.hh"
Expand Down
2 changes: 1 addition & 1 deletion zone/search_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

#ifndef _SEARCH_ZONE_HH
#define SEARCH_ZONE_HH
#define _SEARCH_ZONE_HH

#include "layout_zone.hh"

Expand Down
2 changes: 1 addition & 1 deletion zone/settings_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _SETTINGS_ZONE_H
#define SETTINGS_ZONE_H
#define _SETTINGS_ZONE_H

#include "form_zone.hh"

Expand Down
2 changes: 1 addition & 1 deletion zone/split_check_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _SPLIT_CHECK_HH
#define SPLIT_CHECK_HH
#define _SPLIT_CHECK_HH

#include "pos_zone.hh"
#include "zone_object.hh"
Expand Down
2 changes: 1 addition & 1 deletion zone/table_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _TABLE_ZONE_HH
#define TABLE_ZONE_HH
#define _TABLE_ZONE_HH

#include "check.hh"
#include "customer.hh"
Expand Down
2 changes: 1 addition & 1 deletion zone/user_edit_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#ifndef _USER_EDIT_ZONE_HH
#define USER_EDIT_ZONE_HH
#define _USER_EDIT_ZONE_HH

#include "form_zone.hh"

Expand Down
5 changes: 5 additions & 0 deletions zone/video_zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* to determine which food types get sent to the Kitchen Video reports.
*/

#ifndef _VIDEO_ZONE_HH
#define _VIDEO_ZONE_HH

#define VIDEO_TARGET_NORMAL 0
#define VIDEO_TARGET_KITCHEN 1

Expand All @@ -40,3 +43,5 @@ public:
int LoadRecord(Terminal *t, int record) override;
int SaveRecord(Terminal *t, int record, int write_file) override;
};

#endif
4 changes: 2 additions & 2 deletions zone/zone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* Functions for managing zones on a view
*/

#ifndef ZONE_HH
#define ZONE_HH
#ifndef _ZONE_HH
#define _ZONE_HH

#include "utility.hh"
#include "list_utility.hh"
Expand Down
4 changes: 2 additions & 2 deletions zone/zone_object.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* User Interfact componet objects
*/

#ifndef ZONE_OBJECT_HH
#define ZONE_OBJECT_HH
#ifndef _ZONE_OBJECT_HH
#define _ZONE_OBJECT_HH

#include "utility.hh"
#include "list_utility.hh"
Expand Down