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

feat: add masked corporate card number and employee name #673

Merged
merged 5 commits into from
Nov 26, 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
18 changes: 18 additions & 0 deletions apps/fyle/migrations/0035_expense_masked_corporate_card_number.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.14 on 2024-11-19 18:25

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('fyle', '0034_expense_is_posted_at_null'),
]

operations = [
migrations.AddField(
model_name='expense',
name='masked_corporate_card_number',
field=models.CharField(help_text='Masked Corporate Card Number', max_length=255, null=True),
),
]
1 change: 1 addition & 0 deletions apps/fyle/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class Expense(models.Model):
custom_properties = JSONField(null=True)
is_skipped = models.BooleanField(null=True, default=False, help_text='Expense is skipped or not')
accounting_export_summary = JSONField(default=dict)
masked_corporate_card_number = models.CharField(max_length=255, help_text='Masked Corporate Card Number', null=True)
anishfyle marked this conversation as resolved.
Show resolved Hide resolved
previous_export_state = models.CharField(max_length=255, help_text='Previous export state', null=True)
workspace = models.ForeignKey(
Workspace, on_delete=models.PROTECT, help_text='To which workspace this expense belongs to', null=True
Expand Down
2 changes: 2 additions & 0 deletions apps/netsuite/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ def get_expense_purpose(lineitem, category, configuration) -> str:

details = {
'employee_email': lineitem.employee_email,
'employee_name': lineitem.employee_name,
'card_number': '{0}'.format(lineitem.masked_corporate_card_number) if lineitem.masked_corporate_card_number else '',
'merchant': '{0}'.format(lineitem.vendor) if lineitem.vendor else '',
'category': '{0}'.format(category) if lineitem.category else '',
'purpose': '{0}'.format(lineitem.purpose) if lineitem.purpose else '',
Expand Down
Loading