Skip to content

Commit

Permalink
config(constant): add cash flow group kinds
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed May 11, 2024
1 parent 3c3458f commit e05eb15
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions app/Config/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,37 @@
define("SEARCH_WITH_DELETED", "WITH_DELETED");
define("SEARCH_ONLY_DELETED", "ONLY_DELETED");

/*
| --------------------------------------------------------------------------
| Cash Flow Group Kinds
| --------------------------------------------------------------------------
|
| There are different cash flow group kinds that the system can handle.
| - UNKNOWN_CASH_FLOW_GROUP_KIND. Cash flow group that may represent other kinds not supported
| by the system at the current version. This case may happen when the system downgraded.
| - LIQUID_CASH_FLOW_GROUP_KIND. Cash flow group kind that may hold cash and other
| cash-equivalent accounts.
| - ILLIQUID_CASH_FLOW_GROUP_KIND. Cash flow group kind that may hold that are hard to convert
| back into cash.
|
| When the user creates a cash flow group, certain kinds can be accepted by the server.
| When the server finds a cash flow group kind not existing in the current version,
| it will be labeled as unknown.
*/
define("UNKNOWN_CASH_FLOW_GROUP_KIND", "unknown");
define("LIQUID_CASH_FLOW_GROUP_KIND", "liquid");
define("ILLIQUID_CASH_FLOW_GROUP_KIND", "illiquid");

define("ACCEPTABLE_CASH_FLOW_GROUP_KINDS", [
LIQUID_CASH_FLOW_GROUP_KIND,
ILLIQUID_CASH_FLOW_GROUP_KIND,
]);

define("CASH_FLOW_GROUP_KINDS", [
UNKNOWN_CASH_FLOW_GROUP_KIND,
...ACCEPTABLE_CASH_FLOW_GROUP_KINDS
]);

/*
| --------------------------------------------------------------------------
| Account Kinds
Expand Down

0 comments on commit e05eb15

Please sign in to comment.