Skip to content

Commit

Permalink
fix: Plaid syncs deposit imports as withdrawals (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
abouolia authored Jun 3, 2024
1 parent 175bc24 commit f241e2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/server/src/services/Banking/Plaid/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ export const transformPlaidTrxsToCashflowCreate = R.curry(
): CreateUncategorizedTransactionDTO => {
return {
date: plaidTranasction.date,
amount: plaidTranasction.amount,

// Plaid: Positive values when money moves out of the account; negative values
// when money moves in. For example, debit card purchases are positive;
// credit card payments, direct deposits, and refunds are negative.
amount: -1 * plaidTranasction.amount,

description: plaidTranasction.name,
payee: plaidTranasction.payment_meta?.payee,
currencyCode: plaidTranasction.iso_currency_code,
Expand Down

0 comments on commit f241e2b

Please sign in to comment.