the silver amount are now ceil to prevent decimals
This commit is contained in:
@@ -70,7 +70,7 @@ function startEdit(initial?: number) {
|
||||
}
|
||||
|
||||
function save() {
|
||||
const v = Math.round(Number(inputValue.value))
|
||||
const v = Math.ceil(Number(inputValue.value))
|
||||
if (!inputValue.value && inputValue.value !== 0) {
|
||||
clearManualPrice(props.itemId, city.value)
|
||||
} else if (v > 0) {
|
||||
|
||||
@@ -379,7 +379,7 @@ function startEdit(itemId: string, current: number) {
|
||||
}
|
||||
|
||||
function saveEdit(itemId: string) {
|
||||
const v = Math.round(Number(inputValue.value))
|
||||
const v = Math.ceil(Number(inputValue.value))
|
||||
if (!inputValue.value && inputValue.value !== 0) {
|
||||
clearManualPrice(itemId, filters.value.city)
|
||||
} else if (v > 0) {
|
||||
|
||||
@@ -244,14 +244,15 @@ export function tierStyle(tier: number): { backgroundColor: string; color: strin
|
||||
}
|
||||
|
||||
export function formatSilver(value: number): string {
|
||||
if (value === 0) return '0'
|
||||
if (Math.abs(value) >= 1_000_000) {
|
||||
return (value / 1_000_000).toFixed(2) + 'M'
|
||||
const v = Math.ceil(value)
|
||||
if (v === 0) return '0'
|
||||
if (Math.abs(v) >= 1_000_000) {
|
||||
return (v / 1_000_000).toFixed(2) + 'M'
|
||||
}
|
||||
if (Math.abs(value) >= 1_000) {
|
||||
return (value / 1_000).toFixed(1) + 'k'
|
||||
if (Math.abs(v) >= 1_000) {
|
||||
return (v / 1_000).toFixed(1) + 'k'
|
||||
}
|
||||
return value.toLocaleString()
|
||||
return v.toLocaleString()
|
||||
}
|
||||
|
||||
export function formatRoi(roi: number): string {
|
||||
|
||||
Reference in New Issue
Block a user