From 25f58a5a5e12bd790f87dd710a8917e6137cb5ff Mon Sep 17 00:00:00 2001 From: Nilesh Pant <58652823+NileshPant1999@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:40:38 +0530 Subject: [PATCH] bug fix: remove negetive multiplication from expense amount (#69) --- apps/qbd/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/qbd/models.py b/apps/qbd/models.py index 09429ea..4283a5d 100644 --- a/apps/qbd/models.py +++ b/apps/qbd/models.py @@ -609,7 +609,7 @@ def create_journal( date=get_transaction_date(expenses, date_preference=date_preference), account=corporate_card_name if fund_source == 'CCC' else export_settings.bank_account_name, name=name, - amount=sum([expense.amount for expense in expenses]), + amount=sum([expense.amount for expense in expenses]) * -1, memo=get_top_purpose( workspace_id=workspace_id, expense=expenses[0], @@ -696,7 +696,7 @@ def create_journal_lineitems( and export_settings.mileage_account_name else expense.category, name=journal.name, class_name=class_name, - amount=expense.amount * -1, + amount=expense.amount, memo=get_expense_purpose(workspace_id, expense), journal=journal, expense=expense,