diff --git a/dashboard.php b/dashboard.php index 5e7aa00..8121af4 100644 --- a/dashboard.php +++ b/dashboard.php @@ -79,11 +79,6 @@ if ($user['role'] === 'founder') { $myInvestments = $stmt->fetchAll(); } -// Fetch Wallet Transactions -$stmt = db()->prepare("SELECT * FROM wallet_transactions WHERE user_id = ? ORDER BY created_at DESC LIMIT 5"); -$stmt->execute([$_SESSION['user_id']]); -$transactions = $stmt->fetchAll(); - function number_get_formatted($num) { return number_format((float)$num, 0, '.', ','); } @@ -99,31 +94,6 @@ function number_get_formatted($num) { -
@@ -270,28 +240,6 @@ function number_get_formatted($num) { - -No transactions yet.
- -Manage your startup capital and dividend funds. @@ -401,10 +349,10 @@ document.getElementById('wallet-form').addEventListener('submit', function(e) { .then(response => response.json()) .then(data => { if (data.success) { - document.getElementById('wallet-balance').innerText = '£' + parseFloat(data.new_balance).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}); - document.getElementById('header-wallet-balance').innerText = '£' + parseFloat(data.new_balance).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}); + const formattedBalance = '£' + parseFloat(data.new_balance).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}); + document.getElementById('wallet-balance').innerText = formattedBalance; + document.getElementById('header-wallet-balance').innerText = formattedBalance; closeWalletModal(); - location.reload(); // Reload to show new transaction } else { alert('Error: ' + data.error); } diff --git a/startup_details.php b/startup_details.php index 03f26e9..a52fcd5 100644 --- a/startup_details.php +++ b/startup_details.php @@ -64,11 +64,6 @@ if ($isFounder) { "); $stmt->execute([$startupId]); $approvedInvestments = $stmt->fetchAll(); - - // Fetch Wallet Transactions for Founder - $stmt = db()->prepare("SELECT * FROM wallet_transactions WHERE user_id = ? ORDER BY created_at DESC LIMIT 5"); - $stmt->execute([$_SESSION['user_id']]); - $transactions = $stmt->fetchAll(); } function getNextDividendInfo($investmentDate) { @@ -89,18 +84,6 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; -
@@ -226,28 +209,6 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; - -No transactions yet.
- -This pot holds all investments received. You can withdraw funds for business operations or add funds to cover investor dividends.
@@ -460,7 +421,6 @@ document.getElementById('wallet-form').addEventListener('submit', function(e) { document.getElementById('startup-wallet-balance').innerText = formattedBalance; } closeWalletModal(); - location.reload(); // Reload to show new transaction } else { alert('Error: ' + data.error); }