diff --git a/apps/accounting_exports/serializers.py b/apps/accounting_exports/serializers.py index 5563d83d..8f11f325 100644 --- a/apps/accounting_exports/serializers.py +++ b/apps/accounting_exports/serializers.py @@ -11,7 +11,7 @@ class ExpenseSerializer(serializers.ModelSerializer): class Meta: model = Expense - fields = ['updated_at', 'claim_number', 'employee_email', 'employee_name', 'fund_source', 'expense_number', 'payment_number', 'vendor', 'category', 'amount', 'report_id', 'settlement_id', 'expense_id', 'org_id'] + fields = ['updated_at', 'claim_number', 'employee_email', 'employee_name', 'fund_source', 'expense_number', 'payment_number', 'vendor', 'category', 'amount', 'report_id', 'expense_id', 'org_id'] class AccountingExportSerializer(serializers.ModelSerializer): diff --git a/apps/fyle/migrations/0004_remove_expense_settlement_id.py b/apps/fyle/migrations/0004_remove_expense_settlement_id.py new file mode 100644 index 00000000..8e111f8c --- /dev/null +++ b/apps/fyle/migrations/0004_remove_expense_settlement_id.py @@ -0,0 +1,17 @@ +# Generated by Django 4.1.2 on 2024-05-29 16:54 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('fyle', '0003_alter_expensefilter_custom_field_type'), + ] + + operations = [ + migrations.RemoveField( + model_name='expense', + name='settlement_id', + ), + ] diff --git a/apps/fyle/models.py b/apps/fyle/models.py index 82766e64..5e1d145b 100644 --- a/apps/fyle/models.py +++ b/apps/fyle/models.py @@ -87,7 +87,6 @@ class Expense(BaseForeignWorkspaceModel): currency = StringNotNullField(max_length=5, help_text='Home Currency') foreign_amount = FloatNullField(help_text='Foreign Amount') foreign_currency = StringNullField(max_length=5, help_text='Foreign Currency') - settlement_id = StringNullField(help_text='Settlement ID') reimbursable = BooleanFalseField(help_text='Expense reimbursable or not') state = StringNotNullField(help_text='Expense state') vendor = StringNullField(help_text='Vendor') @@ -148,7 +147,6 @@ def create_expense_objects(expenses: List[Dict], workspace_id: int): 'foreign_currency': expense['foreign_currency'], 'tax_amount': expense['tax_amount'], 'tax_group_id': expense['tax_group_id'], - 'settlement_id': expense['settlement_id'], 'reimbursable': expense['reimbursable'], 'billable': expense['billable'] if expense['billable'] else False, 'state': expense['state'], diff --git a/requirements.txt b/requirements.txt index 999ef640..7597ac15 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,7 +29,7 @@ fyle==0.36.1 # Reusable Fyle Packages fyle-rest-auth==1.7.2 fyle-accounting-mappings==1.32.3 -fyle-integrations-platform-connector==1.36.3 +fyle-integrations-platform-connector==1.37.4 # Postgres Dependincies psycopg2-binary==2.9.9 diff --git a/tests/test_fyle/fixtures.py b/tests/test_fyle/fixtures.py index ab662967..4cb64107 100644 --- a/tests/test_fyle/fixtures.py +++ b/tests/test_fyle/fixtures.py @@ -363,7 +363,6 @@ 'currency': 'USD', 'foreign_amount': None, 'foreign_currency': None, - 'settlement_id': 'seteYqkAfuWOS', 'reimbursable': True, 'billable': False, 'state': 'PAID', @@ -409,7 +408,6 @@ 'currency': 'USD', 'foreign_amount': None, 'foreign_currency': None, - 'settlement_id': 'seteYqkAfuWOS', 'reimbursable': True, 'billable': False, 'state': 'PAID', @@ -453,7 +451,6 @@ 'currency': 'USD', 'foreign_amount': None, 'foreign_currency': None, - 'settlement_id': 'seteYqkAfuWOS', 'reimbursable': True, 'billable': False, 'state': 'PAID', @@ -495,7 +492,6 @@ 'currency': 'USD', 'foreign_amount': None, 'foreign_currency': None, - 'settlement_id': 'seteYqkAfuWOS', 'reimbursable': True, 'billable': False, 'state': 'PAID', @@ -539,7 +535,6 @@ 'currency': 'USD', 'foreign_amount': None, 'foreign_currency': None, - 'settlement_id': 'seteYqkAfuWOS', 'reimbursable': True, 'billable': False, 'state': 'PAID', @@ -581,7 +576,6 @@ 'currency': 'USD', 'foreign_amount': None, 'foreign_currency': None, - 'settlement_id': 'seteYqkAfuWOS', 'reimbursable': True, 'billable': False, 'state': 'PAID', diff --git a/tests/test_mappings/fixtures.py b/tests/test_mappings/fixtures.py index 16278c2e..6d9e9eca 100644 --- a/tests/test_mappings/fixtures.py +++ b/tests/test_mappings/fixtures.py @@ -26,7 +26,6 @@ "currency": "USD", "foreign_amount": None, "foreign_currency": None, - "settlement_id": "seteYqkAfuWOS", "reimbursable": True, "billable": False, "state": "PAID", @@ -70,7 +69,6 @@ "currency": "USD", "foreign_amount": None, "foreign_currency": None, - "settlement_id": "seteYqkAfuWOS", "reimbursable": True, "billable": False, "state": "PAID", @@ -151,7 +149,6 @@ "paid_at": None, "purpose": "C/2022/01/R/2;Ashwin", "reimbursement_number": "P/2022/01/R/2", - "settlement_id": "setgCxsr2vTmZ", "updated_at": "2022-01-20T16:30:44.584100", "user_id": "usqywo0f3nBY", } @@ -256,7 +253,6 @@ "category": "Food", "amount": 21.0, "report_id": "dummy_report_id", - "settlement_id": "dummy_settlement_id", "expense_id": "dummy_expense_id", } ], @@ -581,7 +577,6 @@ "paid_at": None, "purpose": "C/2022/05/R/6;Ashwin", "reimbursement_number": "P/2022/05/R/6", - "settlement_id": "set0mrwTTgoHA", "updated_at": "2022-05-06T06:32:51.665316", "user_id": "usqywo0f3nBY", } @@ -746,7 +741,6 @@ "foreign_amount": None, "foreign_currency": None, "report_title": "report title 11", - "settlement_id": "seteYqkAfuWOSs", "reimbursable": True, "billable": False, "state": "PAID", @@ -786,7 +780,6 @@ "foreign_amount": None, "foreign_currency": None, "report_title": "report 21", - "settlement_id": "set5PSfKaloaCs", "employee_name": "Naruto", "reimbursable": True, "billable": False,