Skip to content

Commit

Permalink
Remove Settlemet From Sage300 (#178)
Browse files Browse the repository at this point in the history
* Remove Settlemet From Sage300

* Change integration platform connector version
  • Loading branch information
Ashutosh619-sudo authored Jun 5, 2024
1 parent e722e07 commit 3d919fd
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion apps/accounting_exports/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
17 changes: 17 additions & 0 deletions apps/fyle/migrations/0004_remove_expense_settlement_id.py
Original file line number Diff line number Diff line change
@@ -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',
),
]
2 changes: 0 additions & 2 deletions apps/fyle/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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'],
Expand Down
2 changes: 1 addition & 1 deletion 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.32.3
fyle-integrations-platform-connector==1.36.3
fyle-integrations-platform-connector==1.37.4

# Postgres Dependincies
psycopg2-binary==2.9.9
Expand Down
6 changes: 0 additions & 6 deletions tests/test_fyle/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@
'currency': 'USD',
'foreign_amount': None,
'foreign_currency': None,
'settlement_id': 'seteYqkAfuWOS',
'reimbursable': True,
'billable': False,
'state': 'PAID',
Expand Down Expand Up @@ -409,7 +408,6 @@
'currency': 'USD',
'foreign_amount': None,
'foreign_currency': None,
'settlement_id': 'seteYqkAfuWOS',
'reimbursable': True,
'billable': False,
'state': 'PAID',
Expand Down Expand Up @@ -453,7 +451,6 @@
'currency': 'USD',
'foreign_amount': None,
'foreign_currency': None,
'settlement_id': 'seteYqkAfuWOS',
'reimbursable': True,
'billable': False,
'state': 'PAID',
Expand Down Expand Up @@ -495,7 +492,6 @@
'currency': 'USD',
'foreign_amount': None,
'foreign_currency': None,
'settlement_id': 'seteYqkAfuWOS',
'reimbursable': True,
'billable': False,
'state': 'PAID',
Expand Down Expand Up @@ -539,7 +535,6 @@
'currency': 'USD',
'foreign_amount': None,
'foreign_currency': None,
'settlement_id': 'seteYqkAfuWOS',
'reimbursable': True,
'billable': False,
'state': 'PAID',
Expand Down Expand Up @@ -581,7 +576,6 @@
'currency': 'USD',
'foreign_amount': None,
'foreign_currency': None,
'settlement_id': 'seteYqkAfuWOS',
'reimbursable': True,
'billable': False,
'state': 'PAID',
Expand Down
7 changes: 0 additions & 7 deletions tests/test_mappings/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"currency": "USD",
"foreign_amount": None,
"foreign_currency": None,
"settlement_id": "seteYqkAfuWOS",
"reimbursable": True,
"billable": False,
"state": "PAID",
Expand Down Expand Up @@ -70,7 +69,6 @@
"currency": "USD",
"foreign_amount": None,
"foreign_currency": None,
"settlement_id": "seteYqkAfuWOS",
"reimbursable": True,
"billable": False,
"state": "PAID",
Expand Down Expand Up @@ -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",
}
Expand Down Expand Up @@ -256,7 +253,6 @@
"category": "Food",
"amount": 21.0,
"report_id": "dummy_report_id",
"settlement_id": "dummy_settlement_id",
"expense_id": "dummy_expense_id",
}
],
Expand Down Expand Up @@ -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",
}
Expand Down Expand Up @@ -746,7 +741,6 @@
"foreign_amount": None,
"foreign_currency": None,
"report_title": "report title 11",
"settlement_id": "seteYqkAfuWOSs",
"reimbursable": True,
"billable": False,
"state": "PAID",
Expand Down Expand Up @@ -786,7 +780,6 @@
"foreign_amount": None,
"foreign_currency": None,
"report_title": "report 21",
"settlement_id": "set5PSfKaloaCs",
"employee_name": "Naruto",
"reimbursable": True,
"billable": False,
Expand Down

0 comments on commit 3d919fd

Please sign in to comment.