Skip to content

Commit

Permalink
Honour group currency in new transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
ymeiron committed Jan 2, 2024
1 parent 2ddfaf9 commit 56debda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/libs/redux/src/lib/transactions/transactionSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,18 +275,19 @@ export const createTransaction = createAsyncThunk<
>
>;
},
{ state: ITransactionRootState }
{ state: IRootState }
>("createPurchase", async ({ groupId, type, data }, { getState, dispatch }) => {
const state = getState();
const transactionId = state.transactions.nextLocalTransactionId;
const group = state.groups.groups.byId[groupId];
const transactionBase = {
id: transactionId,
group_id: groupId,
name: "",
description: "",
value: 0,
currency_conversion_rate: 1.0,
currency_symbol: "€",
currency_symbol: group.currency_symbol,
billed_at: toISODateString(new Date()),
creditor_shares: {},
debitor_shares: {},
Expand Down

0 comments on commit 56debda

Please sign in to comment.