From 0285c7b5fe23b0d296a7ef76d592d0ce4278b592 Mon Sep 17 00:00:00 2001 From: Ashutosh619-sudo Date: Wed, 29 May 2024 22:18:38 +0530 Subject: [PATCH 1/4] Remove settlement from QBD --- .../0005_remove_expense_settlement_id.py | 17 +++++++++++++++++ apps/fyle/models.py | 2 -- tests/test_fyle/fixtures.py | 12 ------------ 3 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 apps/fyle/migrations/0005_remove_expense_settlement_id.py diff --git a/apps/fyle/migrations/0005_remove_expense_settlement_id.py b/apps/fyle/migrations/0005_remove_expense_settlement_id.py new file mode 100644 index 0000000..a5d660c --- /dev/null +++ b/apps/fyle/migrations/0005_remove_expense_settlement_id.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.14 on 2024-05-15 09:04 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('fyle', '0004_expense_posted_at'), + ] + + operations = [ + migrations.RemoveField( + model_name='expense', + name='settlement_id', + ), + ] diff --git a/apps/fyle/models.py b/apps/fyle/models.py index 3d8a729..d28c217 100644 --- a/apps/fyle/models.py +++ b/apps/fyle/models.py @@ -40,7 +40,6 @@ class Expense(models.Model): currency = models.CharField(max_length=5, help_text='Home Currency') foreign_amount = models.FloatField(null=True, help_text='Foreign Amount') foreign_currency = models.CharField(null=True, max_length=5, help_text='Foreign Currency') - settlement_id = models.CharField(max_length=255, help_text='Settlement ID', null=True) reimbursable = models.BooleanField(default=False, help_text='Expense reimbursable or not') state = models.CharField(max_length=255, help_text='Expense state') vendor = models.CharField(max_length=255, null=True, blank=True, help_text='Vendor') @@ -93,7 +92,6 @@ def create_expense_objects(expenses: List[Dict], workspace_id: int): 'currency': expense['currency'], 'foreign_amount': expense['foreign_amount'], 'foreign_currency': expense['foreign_currency'], - 'settlement_id': expense['settlement_id'], 'reimbursable': expense['reimbursable'], 'state': expense['state'], 'vendor': expense['vendor'][:250] if expense['vendor'] else None, diff --git a/tests/test_fyle/fixtures.py b/tests/test_fyle/fixtures.py index 228637a..d70c1b4 100644 --- a/tests/test_fyle/fixtures.py +++ b/tests/test_fyle/fixtures.py @@ -119,7 +119,6 @@ 'reimbursement_id': 'reimv8ED0Yzxi0', 'reimbursement_seq_num': 'P/2022/05/R/6', 'seq_num': 'C/2022/05/R/6', - 'settlement_id': 'set0mrwTTgoHA', 'state': 'PAYMENT_PROCESSING', 'title': '#6: May 2022', }, @@ -236,7 +235,6 @@ 'reimbursement_id': 'reimIWuET63w9n', 'reimbursement_seq_num': 'P/2022/05/R/5', 'seq_num': 'C/2022/05/R/5', - 'settlement_id': 'setfqoiqUVRYd', 'state': 'PAYMENT_PROCESSING', 'title': '#5: May 2022', }, @@ -353,7 +351,6 @@ 'reimbursement_id': 'reimo1VO1yzyK6', 'reimbursement_seq_num': 'P/2022/05/R/4', 'seq_num': 'C/2022/05/R/4', - 'settlement_id': 'setUzZd9WDh4b', 'state': 'PAYMENT_PROCESSING', 'title': '#4: May 2022', }, @@ -470,7 +467,6 @@ 'reimbursement_id': 'reimThZc9jwVDM', 'reimbursement_seq_num': 'P/2022/05/R/3', 'seq_num': 'C/2022/05/R/3', - 'settlement_id': 'set0LnL005MA7', 'state': 'PAYMENT_PROCESSING', 'title': '#3: May 2022', }, @@ -587,7 +583,6 @@ 'reimbursement_id': 'reimvj3so5zBl7', 'reimbursement_seq_num': 'P/2022/05/R/2', 'seq_num': 'C/2022/05/R/2', - 'settlement_id': 'setlBZs14zpck', 'state': 'PAYMENT_PROCESSING', 'title': '#2: May 2022', }, @@ -709,7 +704,6 @@ 'reimbursement_id': 'reimv8ED0Yzxi0', 'reimbursement_seq_num': 'P/2022/05/R/6', 'seq_num': 'C/2022/05/R/6', - 'settlement_id': 'set0mrwTTgoHA', 'state': 'PAYMENT_PROCESSING', 'title': '#6: May 2022', 'posted_at': '2022-05-06T17:00:00+00:00', @@ -828,7 +822,6 @@ 'reimbursement_id': 'reimIWuET63w9n', 'reimbursement_seq_num': 'P/2022/05/R/5', 'seq_num': 'C/2022/05/R/5', - 'settlement_id': 'setfqoiqUVRYd', 'state': 'PAYMENT_PROCESSING', 'title': '#5: May 2022', }, @@ -946,7 +939,6 @@ 'reimbursement_id': 'reimo1VO1yzyK6', 'reimbursement_seq_num': 'P/2022/05/R/4', 'seq_num': 'C/2022/05/R/4', - 'settlement_id': 'setUzZd9WDh4b', 'state': 'PAYMENT_PROCESSING', 'title': '#4: May 2022', }, @@ -1064,7 +1056,6 @@ 'reimbursement_id': 'reimThZc9jwVDM', 'reimbursement_seq_num': 'P/2022/05/R/3', 'seq_num': 'C/2022/05/R/3', - 'settlement_id': 'set0LnL005MA7', 'state': 'PAYMENT_PROCESSING', 'title': '#3: May 2022', }, @@ -1182,7 +1173,6 @@ 'reimbursement_id': 'reimvj3so5zBl7', 'reimbursement_seq_num': 'P/2022/05/R/2', 'seq_num': 'C/2022/05/R/2', - 'settlement_id': 'setlBZs14zpck', 'state': 'PAYMENT_PROCESSING', 'title': '#2: May 2022', }, @@ -1250,7 +1240,6 @@ 'currency': 'USD', 'foreign_amount': None, 'foreign_currency': None, - 'settlement_id': 'seteYqkAfuWOS', 'reimbursable': False, 'billable': False, 'state': 'PAID', @@ -1290,7 +1279,6 @@ 'currency': 'USD', 'foreign_amount': None, 'foreign_currency': None, - 'settlement_id': 'set5PSfKaloaC', 'reimbursable': True, 'billable': False, 'state': 'PAID', From 66abae119c89f9b66ce7dacc480a77c422afd1f0 Mon Sep 17 00:00:00 2001 From: Ashutosh619-sudo Date: Fri, 31 May 2024 14:04:00 +0530 Subject: [PATCH 2/4] Change integrations-platform-connector version --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 416b45d..674fe91 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.26.0 -fyle-integrations-platform-connector==1.36.3 +fyle-integrations-platform-connector==1.37.3 # Postgres Dependincies psycopg2-binary==2.8.4 @@ -48,4 +48,4 @@ pytest-mock==3.8.2 # Sendgrid for sending emails_selected sendgrid==6.9.7 -sentry-sdk==1.19.1 \ No newline at end of file +sentry-sdk==1.19.1 From b9f6d7d0f7f8482e375eb74732695cd8d6d994c5 Mon Sep 17 00:00:00 2001 From: Ashutosh619-sudo Date: Mon, 3 Jun 2024 10:37:06 +0530 Subject: [PATCH 3/4] change version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 674fe91..2505704 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.26.0 -fyle-integrations-platform-connector==1.37.3 +fyle-integrations-platform-connector==1.37.4 # Postgres Dependincies psycopg2-binary==2.8.4 From 6276d854472bf1f68e8eb2065cb566252030b618 Mon Sep 17 00:00:00 2001 From: Ashutosh619-sudo Date: Mon, 3 Jun 2024 10:47:11 +0530 Subject: [PATCH 4/4] change accounting mapping version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2505704..b7c12e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,7 +28,7 @@ fyle==0.36.1 # Reusable Fyle Packages fyle-rest-auth==1.7.2 -fyle-accounting-mappings==1.26.0 +fyle-accounting-mappings==1.32.3 fyle-integrations-platform-connector==1.37.4 # Postgres Dependincies