Skip to content

Commit

Permalink
Remove settlement from QBD
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashutosh619-sudo committed May 29, 2024
1 parent 71cb4fb commit 0285c7b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
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
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

0 comments on commit 0285c7b

Please sign in to comment.