mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
11 lines
288 B
TypeScript
11 lines
288 B
TypeScript
/* bill common */
|
|
import { PRICE_SCALE } from './constants';
|
|
import { BillItemType, BillSchema } from './type';
|
|
|
|
/**
|
|
* dataset price / PRICE_SCALE = real price
|
|
*/
|
|
export const formatPrice = (val = 0, multiple = 1) => {
|
|
return Number(((val / PRICE_SCALE) * multiple).toFixed(10));
|
|
};
|