fix: include Fee Type in export when Start Date not in fields
Append membership_fee_type to column list when it is visible but membership_fee_start_date was not in the selection (MemberExport, export_column_order, build_export_member_fields_list). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3b6c0b9fc9
commit
83264325f1
1 changed files with 8 additions and 0 deletions
|
|
@ -433,6 +433,14 @@ defmodule Mv.Membership.MemberExport do
|
|||
expand_field_with_computed(f, member_fields, computed_fields)
|
||||
end)
|
||||
|
||||
# If fee type is visible but start_date was not in the list, it won't be in db_with_insert
|
||||
db_with_insert =
|
||||
if "membership_fee_type" in member_fields and "membership_fee_type" not in db_with_insert do
|
||||
db_with_insert ++ ["membership_fee_type"]
|
||||
else
|
||||
db_with_insert
|
||||
end
|
||||
|
||||
remaining = Enum.reject(computed_fields, &(&1 in db_with_insert))
|
||||
db_with_insert ++ remaining
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue