积分与余额账务系统硬切重构
This commit is contained in:
1 parent
ca12226b39
commit
5cae5b5c93
159 files changed
+7275
-4718
No files matched your search
@@ -39,7 +39,14 @@ $page_url = static function (int $target_page) use ($base_url): string {
|
||||
);
|
||||
};
|
||||
$format = static function ($amount, string $unit): string {
|
||||
return number_format_i18n((float) $amount, $unit === 'points' ? 0 : 2);
|
||||
if ($unit === 'points') {
|
||||
return aksrt_format_points(max(0, (int) $amount));
|
||||
}
|
||||
try {
|
||||
return \AKSRT\Ledger\AssetAmount::balance(is_string($amount) ? $amount : '')->formatted();
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
return '0.00';
|
||||
}
|
||||
};
|
||||
$note = trim((string) ($settings['note'] ?? ''));
|
||||
if ($note === '') {
|
||||
|
||||
Reference in new issue
Block a user