aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/invoices.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/invoices.ts b/lib/invoices.ts
index d79ead69..0a94334c 100644
--- a/lib/invoices.ts
+++ b/lib/invoices.ts
@@ -39,6 +39,7 @@ export const generate = async ({ invoice, user }) => {
let account = await g(`account:${aid}`);
if (!account) account = await g(`account:${user.id}`);
if (!account) fail("account not found");
+ aid = account.id;
const rates = await g("rates");
if (!currency) currency = user.currency;