Index: src/app/api/customers/route.ts
===================================================================
--- src/app/api/customers/route.ts	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/api/customers/route.ts	(revision 92c45a3d4ce7df33941d34706b6684bb837042b7)
@@ -3,6 +3,5 @@
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
-import { CustomerStatus } from '@prisma/client';
-import { Prisma } from '@prisma/client';
+import { Prisma, ClientStatus } from '@prisma/client';
 
 export async function GET(request: NextRequest) {
@@ -25,15 +24,27 @@
     const validatedFilters = customerTableFiltersSchema.parse(filters);
 
-    // Replace Prisma query with raw SQL
-    const customers = await prisma.$queryRaw`
-      SELECT * FROM "Client"
-      WHERE "tenantId" = ${tenantId}
-        AND LOWER(name) LIKE LOWER(${`%${validatedFilters.name}%`})
-        ${
-          validatedFilters.status
-            ? Prisma.sql`AND status = ${validatedFilters.status}::"CustomerStatus"`
-            : Prisma.sql`AND TRUE`
-        }
-    `;
+    //   const customers = await prisma.$queryRaw`
+    //   SELECT * FROM "Client"
+    //   WHERE "tenant_id" = ${tenantId}
+    //     AND LOWER(name) LIKE LOWER(${`%${validatedFilters.name}%`})
+    //     ${
+    //       validatedFilters.status
+    //         ? Prisma.sql`AND status = ${validatedFilters.status}::"CustomerStatus"`
+    //         : Prisma.sql`AND TRUE`
+    //     }
+    // `;
+
+    const customers = await prisma.client.findMany({
+      where: {
+        tenantId,
+        name: {
+          contains: validatedFilters.name,
+          mode: 'insensitive',
+        },
+        ...(validatedFilters.status && {
+          status: validatedFilters.status as ClientStatus,
+        }),
+      },
+    });
 
     return NextResponse.json(customers);
@@ -60,5 +71,4 @@
       data: {
         ...validatedData,
-        // userId,
         tenantId,
       },
Index: src/app/api/invoices/[id]/route.ts
===================================================================
--- src/app/api/invoices/[id]/route.ts	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/api/invoices/[id]/route.ts	(revision 92c45a3d4ce7df33941d34706b6684bb837042b7)
@@ -100,5 +100,5 @@
         data: {
           invoiceNumber: validation.data.invoiceNumber,
-          createDate: validation.data.createDate,
+          issueDate: validation.data.issueDate,
           dueDate: validation.data.dueDate,
           status: validation.data.status,
Index: src/app/api/invoices/route.ts
===================================================================
--- src/app/api/invoices/route.ts	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/api/invoices/route.ts	(revision 92c45a3d4ce7df33941d34706b6684bb837042b7)
@@ -45,5 +45,5 @@
           ? { equals: validatedFilters.status as InvoiceStatus }
           : undefined,
-        createDate: {
+        issueDate: {
           ...(validatedFilters.startDate && { gte: validatedFilters.startDate }),
           ...(validatedFilters.endDate && { lte: validatedFilters.endDate }),
@@ -108,5 +108,5 @@
         quantityType: validatedData.quantityType,
         subTotal: validatedData.subTotal,
-        createDate: validatedData.createDate,
+        issueDate: validatedData.issueDate,
         month: validatedData.month,
         discount: validatedData.discount,
Index: src/app/api/invoices/totals/route.ts
===================================================================
--- src/app/api/invoices/totals/route.ts	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/api/invoices/totals/route.ts	(revision 92c45a3d4ce7df33941d34706b6684bb837042b7)
@@ -20,5 +20,5 @@
     const searchParams = request.nextUrl.searchParams;
     const startDate = searchParams.get('startDate')
-      ? new Date(searchParams.get('startDate')!)
+      ? new Date(searchParams.get('issueDate')!)
       : null;
 
@@ -32,8 +32,8 @@
         status,
         currency,
-        SUM("totalAmount") as total
+        SUM("total_amount") as total
       FROM "Invoice"
-      WHERE "createDate" >= ${startDate}
-        AND "invoiceFromId" = ${tenantId}
+      WHERE "issue_date" >= ${startDate}
+        AND "tenant_id" = ${tenantId}
       GROUP BY status, currency
     `;
Index: src/app/api/user/route.ts
===================================================================
--- src/app/api/user/route.ts	(revision 92c45a3d4ce7df33941d34706b6684bb837042b7)
+++ src/app/api/user/route.ts	(revision 92c45a3d4ce7df33941d34706b6684bb837042b7)
@@ -0,0 +1,30 @@
+import { NextResponse } from 'next/server';
+import { authenticateRequest } from 'src/lib/auth-middleware';
+import { type NextRequest } from 'next/server';
+import prisma from 'src/lib/prisma';
+
+export async function GET(request: NextRequest) {
+  try {
+    const authResult = await authenticateRequest(request);
+
+    if (authResult instanceof NextResponse) {
+      return authResult;
+    }
+
+    // Get user from Prisma
+    const user = await prisma.user.findUnique({
+      where: {
+        id: authResult.userId,
+      },
+    });
+
+    if (!user) {
+      return NextResponse.json({ error: 'User not found' }, { status: 404 });
+    }
+
+    return NextResponse.json(user);
+  } catch (error) {
+    console.error(error);
+    return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
+  }
+}
