diff --git a/assets/docs/financials/doc_balance_sheets_1772314825.xlsx b/assets/docs/financials/doc_balance_sheets_1772314825.xlsx new file mode 100644 index 0000000..5110888 Binary files /dev/null and b/assets/docs/financials/doc_balance_sheets_1772314825.xlsx differ diff --git a/assets/docs/financials/doc_cash_flow_statements_1772314825.xlsx b/assets/docs/financials/doc_cash_flow_statements_1772314825.xlsx new file mode 100644 index 0000000..68c0c99 Binary files /dev/null and b/assets/docs/financials/doc_cash_flow_statements_1772314825.xlsx differ diff --git a/assets/docs/financials/doc_gross_margin_1772314825.xlsx b/assets/docs/financials/doc_gross_margin_1772314825.xlsx new file mode 100644 index 0000000..cc81d79 Binary files /dev/null and b/assets/docs/financials/doc_gross_margin_1772314825.xlsx differ diff --git a/assets/docs/financials/doc_income_statements_1772314825.xlsx b/assets/docs/financials/doc_income_statements_1772314825.xlsx new file mode 100644 index 0000000..c496903 Binary files /dev/null and b/assets/docs/financials/doc_income_statements_1772314825.xlsx differ diff --git a/assets/docs/financials/doc_revenue_breakdown_1772314825.xlsx b/assets/docs/financials/doc_revenue_breakdown_1772314825.xlsx new file mode 100644 index 0000000..4b5131c Binary files /dev/null and b/assets/docs/financials/doc_revenue_breakdown_1772314825.xlsx differ diff --git a/create_startup.php b/create_startup.php index a91042c..057a98b 100644 --- a/create_startup.php +++ b/create_startup.php @@ -13,13 +13,18 @@ $countries = require_once 'includes/countries.php'; $success = ''; $error = ''; -$stmt = db()->prepare("SELECT * FROM startups WHERE founder_id = ?"); -$stmt->execute([$_SESSION['user_id']]); -$existingStartup = $stmt->fetch(); +$startupId = $_GET['id'] ?? null; +$existingStartup = null; + +if ($startupId) { + $stmt = db()->prepare("SELECT * FROM startups WHERE id = ? AND founder_id = ?"); + $stmt->execute([$startupId, $_SESSION['user_id']]); + $existingStartup = $stmt->fetch(); +} if ($_SERVER['REQUEST_METHOD'] === 'POST') { $name = $_POST['name'] ?? ''; - $description = $_POST['description'] ?? ''; // New field for Short Pitch + $description = $_POST['description'] ?? ''; $legal_name = $_POST['legal_name'] ?? ''; $country = $_POST['country'] ?? ''; $industry = $_POST['industry'] ?? ''; @@ -37,6 +42,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $current_cash_balance = $_POST['current_cash_balance'] ?? 0.0; $burn_rate = $_POST['burn_rate'] ?? 0.0; + $founder_return_rate = isset($_POST['founder_return_rate']) && $_POST['founder_return_rate'] !== '' ? (float)$_POST['founder_return_rate'] : null; $doc_fields = [ 'doc_income_statements', @@ -115,43 +121,40 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } if ($existingStartup) { - // Count columns: 24 columns in SET clause $stmt = db()->prepare("UPDATE startups SET name = ?, description = ?, legal_name = ?, country = ?, industry = ?, sub_industry = ?, business_model = ?, product_service = ?, operational_stage = ?, cofounder_equity_pct = ?, cofounder_equity_type = ?, cofounder_responsibilities = ?, desired_cofounder_experience = ?, cofounder_commitment = ?, other_partnership_details = ?, current_cash_balance = ?, burn_rate = ?, doc_income_statements = ?, doc_balance_sheets = ?, doc_cash_flow_statements = ?, doc_revenue_breakdown = ?, doc_gross_margin = ?, - recommended_return_rate = ?, recommended_return_reasoning = ? + recommended_return_rate = ?, recommended_return_reasoning = ?, founder_return_rate = ? WHERE id = ? AND founder_id = ?"); - // Execute parameters: 24 columns + 2 WHERE params = 26 $stmt->execute([ $name, $description, $legal_name, $country, $industry, $sub_industry, $business_model, $product_service, $operational_stage, $cofounder_equity_pct, $cofounder_equity_type, $cofounder_responsibilities, $desired_cofounder_experience, $cofounder_commitment, $other_partnership_details, $current_cash_balance, $burn_rate, $uploaded_paths['doc_income_statements'], $uploaded_paths['doc_balance_sheets'], $uploaded_paths['doc_cash_flow_statements'], $uploaded_paths['doc_revenue_breakdown'], $uploaded_paths['doc_gross_margin'], - $recommended_return_rate, $recommended_return_reasoning, $existingStartup['id'], $_SESSION['user_id'] + $recommended_return_rate, $recommended_return_reasoning, $founder_return_rate, + $existingStartup['id'], $_SESSION['user_id'] ]); $final_id = $existingStartup['id']; } else { - // Count columns: 26 columns $stmt = db()->prepare("INSERT INTO startups ( name, description, legal_name, country, industry, sub_industry, business_model, product_service, operational_stage, cofounder_equity_pct, cofounder_equity_type, cofounder_responsibilities, desired_cofounder_experience, cofounder_commitment, other_partnership_details, current_cash_balance, burn_rate, doc_income_statements, doc_balance_sheets, doc_cash_flow_statements, doc_revenue_breakdown, doc_gross_margin, - founder_id, recommended_return_rate, recommended_return_reasoning, status - ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'private')"); + founder_id, recommended_return_rate, recommended_return_reasoning, founder_return_rate, status + ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'private')"); - // Execute parameters: 25 ? placeholders + 'private' literal = 26 items $stmt->execute([ $name, $description, $legal_name, $country, $industry, $sub_industry, $business_model, $product_service, $operational_stage, $cofounder_equity_pct, $cofounder_equity_type, $cofounder_responsibilities, $desired_cofounder_experience, $cofounder_commitment, $other_partnership_details, $current_cash_balance, $burn_rate, $uploaded_paths['doc_income_statements'], $uploaded_paths['doc_balance_sheets'], $uploaded_paths['doc_cash_flow_statements'], $uploaded_paths['doc_revenue_breakdown'], $uploaded_paths['doc_gross_margin'], - $_SESSION['user_id'], $recommended_return_rate, $recommended_return_reasoning + $_SESSION['user_id'], $recommended_return_rate, $recommended_return_reasoning, $founder_return_rate ]); $final_id = db()->lastInsertId(); } @@ -195,6 +198,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+ +
+ Launch Funding Round Now +
+
@@ -281,6 +289,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { +
+ + + Your proposed annual dividend yield. The platform also computes a recommendation based on your financials. +
+

Upload Financial Documents (PDF/Images)

diff --git a/start_funding_round.php b/start_funding_round.php index 9e72754..c65bd25 100644 --- a/start_funding_round.php +++ b/start_funding_round.php @@ -46,8 +46,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { db()->beginTransaction(); try { // Update startup with round-specific settings - $stmt = db()->prepare("UPDATE startups SET status = ?, founder_return_rate = ? WHERE id = ?"); - $stmt->execute([$status, $founder_rate, $startup_id]); + // We also update funding_target so that general views show the current target + $stmt = db()->prepare("UPDATE startups SET status = ?, founder_return_rate = ?, funding_target = ? WHERE id = ?"); + $stmt->execute([$status, $founder_rate, $goal, $startup_id]); // Create the round $stmt = db()->prepare("INSERT INTO funding_rounds (startup_id, funding_goal, status) VALUES (?, ?, 'Active')"); @@ -70,7 +71,7 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; - Step 2: Start Funding Round — <?= htmlspecialchars($platformName) ?> + Launch Funding Round — <?= htmlspecialchars($platformName) ?> @@ -79,7 +80,7 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';
-

Step 2: Launch Funding Round

+

Launch Funding Round

Set your investment targets and return rates for .

@@ -92,7 +93,7 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';
- +
@@ -105,12 +106,14 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';
This is the annual return rate you propose to investors. It will be displayed alongside the platform recommendation. @@ -120,8 +123,8 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';
@@ -135,4 +138,4 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';
- + \ No newline at end of file diff --git a/startups.php b/startups.php index a4d0ade..f5d99e4 100644 --- a/startups.php +++ b/startups.php @@ -121,16 +121,16 @@ $myStartups = $stmt->fetchAll();

No startups found

Start your journey by listing your first startup or idea.

- Start Funding Round + List First Startup
0 && ($raised / ($goal ?: 1)) * 100 < 1) ? 1 : round(($raised / ($goal ?: 1)) * 100); + $goal = $startup['active_goal'] ?: 0; + $raised = $startup['active_raised'] ?: 0; + $progress = ($goal > 0) ? round(($raised / $goal) * 100) : 0; $isTrending = in_array($startup['id'], $trendingIds); ?> -
+

- ... + 120 ? '...' : '' ?>

-
- £ Raised - % -
-
-
-
-
- View Details + + +
+ £ Raised + % +
+
+
+
+ + + + +
@@ -176,4 +186,4 @@ $myStartups = $stmt->fetchAll(); - + \ No newline at end of file