fix: invoice URL not working for account under master
This commit is contained in:
@@ -60,11 +60,17 @@ export class InvoiceService {
|
||||
with: {
|
||||
customer: {
|
||||
with: {
|
||||
org: true,
|
||||
org: {
|
||||
with: {
|
||||
master: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})) as Invoice & { customer: Customer & { org: Organization } };
|
||||
})) as Invoice & {
|
||||
customer: Customer & { org: Organization & { master: Organization } };
|
||||
};
|
||||
}
|
||||
|
||||
static async list({
|
||||
|
||||
@@ -63,10 +63,12 @@ mainRouter.use(
|
||||
try {
|
||||
const org = invoice.customer.org;
|
||||
const env = invoice.customer.env;
|
||||
|
||||
const stripeCli = createStripeCli({
|
||||
org,
|
||||
env,
|
||||
});
|
||||
|
||||
const stripeInvoice = await stripeCli.invoices.retrieve(
|
||||
invoice.stripe_id,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user