Skip to content

Commit

Permalink
Merge pull request #182 from ymeiron/groupcurrency
Browse files Browse the repository at this point in the history
Honour group currency in new transactions
  • Loading branch information
mikonse authored Jan 2, 2024
2 parents aa0af67 + 56debda commit 9e9ddfd
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 9e9ddfd

Please sign in to comment.