Skip to content

Commit

Permalink
add expense to accounting export serializer (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
NileshPant1999 authored Dec 1, 2023
1 parent cf64fa4 commit 1dcabfd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion apps/accounting_exports/serializers.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
from rest_framework import serializers

from .models import AccountingExport, Error, AccountingExportSummary
from .models import AccountingExport, Error, AccountingExportSummary, Expense


class ExpenseSerializer(serializers.ModelSerializer):
"""
Expense serializer
"""

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']


class AccountingExportSerializer(serializers.ModelSerializer):
"""
Accounting Export serializer
"""

expenses = ExpenseSerializer(many=True)

class Meta:
model = AccountingExport
fields = '__all__'
Expand Down

0 comments on commit 1dcabfd

Please sign in to comment.