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

exportable expense API and date range filter for expense group view API #454

Merged
merged 9 commits into from
Nov 29, 2023

Conversation

Ashutosh619-sudo
Copy link
Contributor

No description provided.

Copy link

Tests Skipped Failures Errors Time
209 0 💤 0 ❌ 0 🔥 20.666s ⏱️

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Merging #454 (b56a659) into master (3ebce04) will decrease coverage by 0.09%.
The diff coverage is 89.83%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #454      +/-   ##
==========================================
- Coverage   95.12%   95.04%   -0.09%     
==========================================
  Files          49       49              
  Lines        4636     4682      +46     
==========================================
+ Hits         4410     4450      +40     
- Misses        226      232       +6     
Files Coverage Δ
apps/fyle/helpers.py 97.65% <100.00%> (+0.17%) ⬆️
apps/fyle/models.py 97.34% <100.00%> (+0.04%) ⬆️
apps/fyle/serializers.py 100.00% <100.00%> (ø)
apps/fyle/tasks.py 100.00% <100.00%> (ø)
apps/netsuite/tasks.py 95.12% <100.00%> (+0.03%) ⬆️
apps/fyle/views.py 87.79% <76.92%> (-2.15%) ⬇️

Copy link

Tests Skipped Failures Errors Time
210 0 💤 0 ❌ 0 🔥 21.037s ⏱️

Copy link

Tests Skipped Failures Errors Time
210 0 💤 0 ❌ 0 🔥 20.125s ⏱️

workspace_id=self.kwargs['workspace_id'],
exported_at__isnull=True,
fund_source__in=fund_source
).values_list('id', flat=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can move all of the above code to a helper function and get ids from there
can help make the view look a bit cleaner

assert response.status_code==200

response = json.loads(response.content)
assert response['exportable_expense_group_ids'] == [1, 2]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

Copy link

Tests Skipped Failures Errors Time
216 0 💤 0 ❌ 0 🔥 20.553s ⏱️

Copy link

Tests Skipped Failures Errors Time
216 0 💤 0 ❌ 0 🔥 20.873s ⏱️

from apps.workspaces.models import Configuration


def get_expense_group_ids(workspace_id, ):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

action file should do some sort of updates. This seem more like a helper func, move it to helpers.py

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra comma in arg

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name it get_exportable_expense_group_ids()

Copy link

Tests Skipped Failures Errors Time
216 0 💤 0 ❌ 0 🔥 22.616s ⏱️

* employee email added to expense group

* added field export_url in expense group and util to generate URL (#457)

* add employee name in expense and script to populate data

* test fixture changes

* added field export_url in expense group and util to generate URL

* updated test and fixtures

* changed scripts to batch update export url

* bug fix

* comment resolved

* added more fields in expense serializer for redirection (#458)

* added more fields in expense serializer

* Sync import API (#459)

* added expense group sync API

* minor changes

* added url for expense group sync view

* remove redundant script
Copy link

Tests Skipped Failures Errors Time
216 0 💤 0 ❌ 0 🔥 23.043s ⏱️

Copy link

Tests Skipped Failures Errors Time
216 0 💤 0 ❌ 0 🔥 20.761s ⏱️

@Ashutosh619-sudo Ashutosh619-sudo merged commit 9387018 into master Nov 29, 2023
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants