fix(coupon): correct knows issues

This commit is contained in:
xboard
2025-01-23 16:14:18 +08:00
parent 8f88e11403
commit caade5c791
6 changed files with 41 additions and 10 deletions
+2 -1
View File
@@ -114,7 +114,8 @@ class PlanService
*/
public static function convertToLegacyPeriod(string $period): string
{
return Plan::LEGACY_PERIOD_MAPPING[$period] ?? $period;
$flippedMapping = array_flip(Plan::LEGACY_PERIOD_MAPPING);
return $flippedMapping[$period] ?? $period;
}
/**