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.

Update route.tsx

Kiran K7583898c8a53
diff --git a/apps/web/app/(ee)/api/partner-profile/payouts/[payoutId]/invoice/route.tsx b/apps/web/app/(ee)/api/partner-profile/payouts/[payoutId]/invoice/route.tsx
index b4c1532f90..774c006171 100644
--- a/apps/web/app/(ee)/api/partner-profile/payouts/[payoutId]/invoice/route.tsx
+++ b/apps/web/app/(ee)/api/partner-profile/payouts/[payoutId]/invoice/route.tsx
@@ -1,7 +1,12 @@
import { DubApiError } from "@/lib/api/errors";
import { withPartnerProfile } from "@/lib/auth/partner";
import { prisma } from "@dub/prisma";
-import { currencyFormatter, DUB_WORDMARK, formatDate } from "@dub/utils";
+import {
+ currencyFormatter,
+ DUB_WORDMARK,
+ EU_COUNTRY_CODES,
+ formatDate,
+} from "@dub/utils";
import {
Document,
Image,
@@ -111,18 +116,23 @@ export const GET = withPartnerProfile(async ({ partner, params }) => {
</Text>
),
},
- {
- label: "VAT",
- value: (
- <Text style={tw("text-neutral-800 w-2/3")}>
- VAT to be paid on reverse charge basis.
- </Text>
- ),
- },
{
label: "Payout reference number",
value: <Text style={tw("text-neutral-800 w-2/3")}>{payout.id}</Text>,
},
+ // if partner is in EU, add VAT reverse charge note:
+ ...(partner.country && EU_COUNTRY_CODES.includes(partner.country)
+ ? [
+ {
+ label: "VAT",
+ value: (
+ <Text style={tw("text-neutral-800 w-2/3")}>
+ VAT to be paid on reverse charge basis.
+ </Text>
+ ),
+ },
+ ]
+ : []),
];
const supportEmail = payout.program.supportEmail || "[email protected]";