Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove settlement from QBD #79

Merged
merged 4 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions apps/fyle/migrations/0005_remove_expense_settlement_id.py
Original file line number Diff line number Diff line change
@@ -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',
),
]
2 changes: 0 additions & 2 deletions apps/fyle/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.4

# Postgres Dependincies
psycopg2-binary==2.8.4
Expand All @@ -48,4 +48,4 @@ pytest-mock==3.8.2

# Sendgrid for sending emails_selected
sendgrid==6.9.7
sentry-sdk==1.19.1
sentry-sdk==1.19.1
12 changes: 0 additions & 12 deletions tests/test_fyle/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down Expand Up @@ -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',
},
Expand Down Expand Up @@ -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',
},
Expand Down Expand Up @@ -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',
},
Expand Down Expand Up @@ -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',
},
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
},
Expand Down Expand Up @@ -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',
},
Expand Down Expand Up @@ -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',
},
Expand Down Expand Up @@ -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',
},
Expand Down Expand Up @@ -1250,7 +1240,6 @@
'currency': 'USD',
'foreign_amount': None,
'foreign_currency': None,
'settlement_id': 'seteYqkAfuWOS',
'reimbursable': False,
'billable': False,
'state': 'PAID',
Expand Down Expand Up @@ -1290,7 +1279,6 @@
'currency': 'USD',
'foreign_amount': None,
'foreign_currency': None,
'settlement_id': 'set5PSfKaloaC',
'reimbursable': True,
'billable': False,
'state': 'PAID',
Expand Down
Loading