From b185f311494d929bdf1a076a138606eb5797f53b Mon Sep 17 00:00:00 2001 From: Shwetabh Kumar Date: Wed, 19 Jun 2024 16:42:13 +0530 Subject: [PATCH] fix: Removing URL link for C1 (#373) * fix: Removing URL link for C1 * changing to f string * changing to f string --- apps/xero/utils.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/apps/xero/utils.py b/apps/xero/utils.py index b68b628b..eb85c09a 100644 --- a/apps/xero/utils.py +++ b/apps/xero/utils.py @@ -574,11 +574,7 @@ def __construct_bill(self, bill: Bill, bill_lineitems: List[BillLineItem]) -> Di bill_payload = { "Type": "ACCPAY", "Contact": {"ContactID": bill.contact_id}, - "Url": "{}/app/admin/#/reports/{}?org_id={}".format( - settings.FYLE_APP_URL, - bill_lineitems[0].expense.report_id, - workspace.fyle_org_id, - ), + "Url": f'{settings.FYLE_APP_URL}/app/admin/#/view_expense/{bill_lineitems[0].expense.expense_id}?org_id={workspace.fyle_org_id}' if settings.BRAND_ID == 'fyle' else None, "LineAmountTypes": "Exclusive" if general_settings.import_tax_codes else "NoTax", @@ -699,11 +695,7 @@ def __construct_bank_transaction( "Type": "SPEND", "Contact": {"ContactID": bank_transaction.contact_id}, "BankAccount": {"AccountID": bank_transaction.bank_account_code}, - "Url": "{}/app/admin/#/view_expense/{}?org_id={}".format( - settings.FYLE_APP_URL, - bank_transaction_lineitems[0].expense.expense_id, - workspace.fyle_org_id, - ), + "Url": f'{settings.FYLE_APP_URL}/app/admin/#/view_expense/{bank_transaction_lineitems[0].expense.expense_id}?org_id={workspace.fyle_org_id}' if settings.BRAND_ID == 'fyle' else None, "LineAmountTypes": "Exclusive" if general_settings.import_tax_codes else "NoTax",