diff --git a/src/pages/ChangeCalculatorPage.tsx b/src/pages/ChangeCalculatorPage.tsx index 1f3b6c0..fa330cc 100644 --- a/src/pages/ChangeCalculatorPage.tsx +++ b/src/pages/ChangeCalculatorPage.tsx @@ -34,7 +34,8 @@ const ChangeCalculatorPage: React.FC = () => { useEffect(() => { const total = moneyItems.reduce((sum, item) => sum + item.value * item.count, 0); setCustomerTotal(total); - setChangeAmount(Math.max(0, total - cartTotal)); + // Allow negative values when customer hasn't paid enough + setChangeAmount(total - cartTotal); }, [moneyItems, cartTotal]); const handleDenominationClick = (index: number) => { @@ -90,7 +91,14 @@ const ChangeCalculatorPage: React.FC = () => {
Restgeld: - {changeAmount.toFixed(2)} € + + {changeAmount.toFixed(2)} € +
diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 8a6b9fa..7d2db8f 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -39,8 +39,7 @@ const HomePage: React.FC = () => { -

{activeTab === 'food' ? 'Essen' : 'Getränke'}

-