From d0ba11be1c76f44e8cfc1d527144c124710f25c0 Mon Sep 17 00:00:00 2001 From: Suvodip Date: Mon, 3 Mar 2025 14:30:57 +0530 Subject: [PATCH] s33 --- .hta_slug/_nav.php | 3 ++ admin/.hta_slug/_404.php | 0 admin/.hta_slug/_home.php | 1 + admin/.hta_slug/stat.php | 60 ++++++++++++++++++++++++ admin/.htaccess | 8 ++++ admin/index.php | 18 +++++++ admin/sample-page.php | 1 + customers/.hta_slug/generate-invoice.php | 18 ++++--- 8 files changed, 103 insertions(+), 6 deletions(-) create mode 100644 admin/.hta_slug/_404.php create mode 100644 admin/.hta_slug/_home.php create mode 100644 admin/.hta_slug/stat.php create mode 100644 admin/.htaccess create mode 100644 admin/index.php create mode 100644 admin/sample-page.php diff --git a/.hta_slug/_nav.php b/.hta_slug/_nav.php index adbf370..22da05c 100644 --- a/.hta_slug/_nav.php +++ b/.hta_slug/_nav.php @@ -15,6 +15,9 @@ + diff --git a/admin/.hta_slug/_404.php b/admin/.hta_slug/_404.php new file mode 100644 index 0000000..e69de29 diff --git a/admin/.hta_slug/_home.php b/admin/.hta_slug/_home.php new file mode 100644 index 0000000..c21b770 --- /dev/null +++ b/admin/.hta_slug/_home.php @@ -0,0 +1 @@ +sample route home \ No newline at end of file diff --git a/admin/.hta_slug/stat.php b/admin/.hta_slug/stat.php new file mode 100644 index 0000000..63d9956 --- /dev/null +++ b/admin/.hta_slug/stat.php @@ -0,0 +1,60 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $currentMonth = date('Y-m'); + $stmt = $db->prepare(" SELECT e.customerId, c.name, e.emiAmount, e.emiDate, e.payStatus, e.outstanding FROM emi e JOIN customers c ON e.customerId = c.customerId WHERE DATE_FORMAT(e.emiDate, '%Y-%m') = :currentMonth ORDER BY e.emiDate ASC"); + $stmt->bindParam(':currentMonth', $currentMonth); + $stmt->execute(); + $emiPlans = $stmt->fetchAll(PDO::FETCH_ASSOC); + + // Calculate total demand amount + $totalDemand = array_sum(array_column($emiPlans, 'emiAmount')); +} catch (PDOException $e) { + die("Database error: " . $e->getMessage()); +} +?> +
+

Pending EMIs for

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Customer NameEMI AmountEMI DatePay StatusOutstanding
+ + Pending + + Paid + +
No pending EMIs this month
+ +
+

Total Demand EMI Amount: ₹

+
+ +
diff --git a/admin/.htaccess b/admin/.htaccess new file mode 100644 index 0000000..ffcc268 --- /dev/null +++ b/admin/.htaccess @@ -0,0 +1,8 @@ +RewriteEngine On +#RewriteCond %{HTTPS} !=on +#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] +RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] +RewriteRule ^(.*)$ https://%1/$1 [R=301,L] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*) index.php diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..b39e111 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,18 @@ +bindParam(':invoiceDate', $bookingDate); $stmt2->bindParam(':paymentMode', $paymentMode); $stmt2->bindParam(':salesAgent', $salesAgent); - $stmt2->bindParam(':marketingAgent', $marketingAgent); + $stmt2->bindParam(':marketingAgent', $marketingAgentList); $stmt2->bindParam(':tenure', $tenure); $stmt2->bindParam(':item', $item); $stmt2->bindParam(':description', $description); @@ -174,8 +175,13 @@
- + + + + + + @@ -215,10 +221,10 @@ - + - +