Skip to content

Commit

Permalink
Use new function
Browse files Browse the repository at this point in the history
  • Loading branch information
Sha-yol committed Oct 21, 2024
1 parent a5df628 commit 9f706fa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,19 +349,15 @@ def getExpenseTransactionBody(exp: Expense, myshare: ExpenseUser, data: list[str
"destination_name": dest,
"category_name": category,
"type": "withdrawal",
"amount": myshare.getOwedShare(),
"date": getDate(exp.getCreatedAt()).isoformat(),
"payment_date": getDate(exp.getDate()).isoformat(),
"description": description,
"reconciled": False,
"notes": notes,
"external_url": getSWUrlForExpense(exp),
"tags": [],
}
if getAccountCurrencyCode(source) != exp.getCurrencyCode():
newTxn["foreign_currency_code"] = exp.getCurrencyCode()
newTxn["foreign_amount"] = myshare.getOwedShare()
newTxn["amount"] = 0.1
newTxn["tags"] = [conf["FOREIGN_CURRENCY_TOFIX_TAG"]]
newTxn = applyExpenseAmountToTransaction(newTxn, exp, myshare)
print(
f"Processing {category} {formatExpense(exp, myshare)} from {source} to {dest}")
return newTxn
Expand Down

0 comments on commit 9f706fa

Please sign in to comment.