Skip to content

Commit

Permalink
Receipt: fix "bill to" with host (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree authored Dec 27, 2023
1 parent 27235c7 commit 53d7f66
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions lib/graphql/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ const receiptTransactionFragment = gql`
address
country
}
... on AccountWithHost {
host {
id
name
legalName
slug
type
expensePolicy
settings
location {
address
country
}
}
}
}
toAccount {
id
Expand Down
2 changes: 1 addition & 1 deletion pages/receipts/transactions/[id]/[filename].js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TransactionReceipt extends React.Component {
transactions: [transaction],
host,
fromAccount: transaction.fromAccount,
fromAccountHost: transaction.oppositeTransaction?.host,
fromAccountHost: transaction.fromAccount.host,
template,
};
}
Expand Down

1 comment on commit 53d7f66

@vercel
Copy link

@vercel vercel bot commented on 53d7f66 Dec 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.