feat(member): add period-scoped unpaid-cycle payment-aging model
Counts each member's unpaid billing cycles that fall inside the selected period. Cycle boundaries are member-relative — derived from each member's fee-type interval — so "the current cycle" spans different calendar dates per member.
This commit is contained in:
parent
4b647c21e7
commit
95ef3177ac
8 changed files with 456 additions and 0 deletions
|
|
@ -38,6 +38,12 @@ defmodule Mv.Constants do
|
|||
|
||||
@custom_date_filter_prefix "cdf_"
|
||||
|
||||
@payment_period_from_param "pay_from"
|
||||
|
||||
@payment_period_to_param "pay_to"
|
||||
|
||||
@payment_filter_param "pay_filter"
|
||||
|
||||
@max_boolean_filters 50
|
||||
|
||||
@max_mailto_bulk_recipients 50
|
||||
|
|
@ -162,6 +168,38 @@ defmodule Mv.Constants do
|
|||
"""
|
||||
def custom_date_filter_prefix, do: @custom_date_filter_prefix
|
||||
|
||||
@doc """
|
||||
Returns the URL parameter name for the payment-aging period lower bound
|
||||
(ISO-8601 date; scopes both the payment column and the payment filter).
|
||||
|
||||
## Examples
|
||||
|
||||
iex> Mv.Constants.payment_period_from_param()
|
||||
"pay_from"
|
||||
"""
|
||||
def payment_period_from_param, do: @payment_period_from_param
|
||||
|
||||
@doc """
|
||||
Returns the URL parameter name for the payment-aging period upper bound.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> Mv.Constants.payment_period_to_param()
|
||||
"pay_to"
|
||||
"""
|
||||
def payment_period_to_param, do: @payment_period_to_param
|
||||
|
||||
@doc """
|
||||
Returns the URL parameter name for the payment-count filter
|
||||
(`fully_paid` | `unpaid_1` | `unpaid_2` | `unpaid_3`).
|
||||
|
||||
## Examples
|
||||
|
||||
iex> Mv.Constants.payment_filter_param()
|
||||
"pay_filter"
|
||||
"""
|
||||
def payment_filter_param, do: @payment_filter_param
|
||||
|
||||
@doc """
|
||||
Returns the maximum number of boolean custom field filters allowed per request.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue