Skip to content

Commit

Permalink
resolved comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashutosh619-sudo committed Oct 26, 2023
1 parent 8016d3d commit aa56ca4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
7 changes: 3 additions & 4 deletions apps/workspaces/apis/export_settings/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ class Meta:
'reimbursable_expenses_object',
'corporate_credit_card_expenses_object',
'is_simplify_report_closure_enabled',
'auto_map_employees',
'employee_field_mapping'
]

read_only_fields = ['is_simplify_report_closure_enabled']
Expand All @@ -53,16 +51,19 @@ def get_reimbursable_account(self, instance: GeneralMapping):
'id': instance.reimbursable_account_id,
'name': instance.reimbursable_account_name
}

def get_default_ccc_account(self, instance: GeneralMapping):
return {
'id': instance.default_ccc_account_id,
'name': instance.default_ccc_account_name
}

def get_accounts_payable(self, instance: GeneralMapping):
return {
'id': instance.accounts_payable_id,
'name': instance.accounts_payable_name
}

def get_default_ccc_vendor(self, instance: GeneralMapping):
return {
'id': instance.default_ccc_vendor_id,
Expand Down Expand Up @@ -121,8 +122,6 @@ def update(self, instance: Workspace, validated_data):
defaults={
'reimbursable_expenses_object': configurations['reimbursable_expenses_object'],
'corporate_credit_card_expenses_object': configurations['corporate_credit_card_expenses_object'],
'employee_field_mapping': configurations['employee_field_mapping'],
'auto_map_employees': configurations['auto_map_employees']
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
'configuration': {
'reimbursable_expenses_object': 'EXPENSE REPORT',
'corporate_credit_card_expenses_object': 'EXPENSE REPORT',
'auto_map_employees': 'NAME',
'is_simplify_report_closure_enabled': False,
'employee_field_mapping': 'EMPLOYEE'
},
'expense_group_settings': {
'reimbursable_expense_group_fields': [
Expand Down Expand Up @@ -49,10 +47,8 @@
'response': {
'configuration': {
'reimbursable_expenses_object': 'EXPENSE_REPORT',
'corporate_credit_card_expenses_object': 'CHARGE_CARD_TRANSACTION',
'auto_map_employees': 'NAME',
'corporate_credit_card_expenses_object': 'CHARGE_CARD_TRANSACTION',
'is_simplify_report_closure_enabled': False,
'employee_field_mapping': 'EMPLOYEE'
},
'expense_group_settings': {
'reimbursable_expense_group_fields': [
Expand Down Expand Up @@ -139,9 +135,7 @@
'configurations': {
'reimbursable_expenses_object': 'EXPENSE_REPORT',
'corporate_credit_card_expenses_object': 'CHARGE_CARD_TRANSACTION',
'auto_map_employees': 'NAME',
'is_simplify_report_closure_enabled': False,
'employee_field_mapping': 'EMPLOYEE'
},
'expense_group_settings': {},
'general_mappings': {
Expand All @@ -167,9 +161,7 @@
'configurations': {
'reimbursable_expenses_object': 'EXPENSE_REPORT',
'corporate_credit_card_expenses_object': 'CHARGE_CARD_TRANSACTION',
'auto_map_employees': 'NAME',
'is_simplify_report_closure_enabled': False,
'employee_field_mapping': 'EMPLOYEE'
},
'expense_group_settings': {
'reimbursable_expense_group_fields': [
Expand Down

0 comments on commit aa56ca4

Please sign in to comment.