Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fix invoice details

Steven Tey66de6632fcfd
diff --git a/apps/web/app/(ee)/app.dub.co/invoices/[invoiceId]/route.tsx b/apps/web/app/(ee)/app.dub.co/invoices/[invoiceId]/route.tsx
index 9079d09a01..f071ab589d 100644
--- a/apps/web/app/(ee)/app.dub.co/invoices/[invoiceId]/route.tsx
+++ b/apps/web/app/(ee)/app.dub.co/invoices/[invoiceId]/route.tsx
@@ -82,11 +82,21 @@ export const GET = withSession(async ({ session, params }) => {
});
}
- const customer = invoice.workspace.stripeId
- ? ((await stripe.customers.retrieve(invoice.workspace.stripeId, {
- expand: ["tax_ids"],
- })) as Stripe.Customer | null)
- : null;
+ let customer: Stripe.Customer | null = null;
+
+ if (invoice.workspace.stripeId) {
+ try {
+ const response = await stripe.customers.retrieve(
+ invoice.workspace.stripeId,
+ {
+ expand: ["tax_ids"],
+ },
+ );
+ customer = response as Stripe.Customer;
+ } catch (error) {
+ console.error(error);
+ }
+ }
const { amount: chargeAmount, currency: chargeCurrency } =
invoice.stripeChargeMetadata
diff --git a/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx b/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx
index 06b12021b6..a696293ab6 100644
--- a/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx
@@ -190,6 +190,9 @@ export const GET = withPartnerProfile(async ({ partner, params }) => {
<Text style={tw("text-sm text-neutral-500 leading-6")}>
San Francisco, CA 94114
</Text>
+ <Text style={tw("text-sm text-neutral-500 leading-6")}>
+ Tax ID: US EIN {process.env.DUB_EIN}
+ </Text>
<Text style={tw("text-sm text-neutral-800 leading-6")}>
Invoice Number: <Text style={tw("font-bold")}>{payout.id}</Text>
</Text>
diff --git a/apps/web/next.config.js b/apps/web/next.config.js
index 38f7977e67..7c1e00fac9 100644
--- a/apps/web/next.config.js
+++ b/apps/web/next.config.js
@@ -17,9 +17,7 @@ module.exports = withAxiom({
"@dub/utils",
"@team-plain/typescript-sdk",
],
- ...(process.env.NODE_ENV === "production" && {
- esmExternals: "loose",
- }),
+ esmExternals: "loose",
},
webpack: (config, { webpack, isServer }) => {
if (isServer) {
diff --git a/apps/web/package.json b/apps/web/package.json
index 2c1a8a231a..beebe01b37 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -3,7 +3,7 @@
"private": true,
"license": "AGPL-3.0-or-later",
"scripts": {
- "dev": "concurrently --kill-others \"pnpm prisma:generate && next dev --turbo --port 8888\" \"pnpm prisma:generate && pnpm prisma:studio --browser none\"",
+ "dev": "concurrently --kill-others \"pnpm prisma:generate && next dev --port 8888\" \"pnpm prisma:generate && pnpm prisma:studio --browser none\"",
"build": "pnpm prisma:generate && next build",
"lint": "next lint",
"start": "next start",