1405/02/15-fix bug in adding 0.001 amount in create order
This commit is contained in:
@@ -324,10 +324,10 @@ function calculateCash(val: number) {
|
||||
// console.log(val)
|
||||
if (form.value.price) {
|
||||
if (form.value.direction === 1) {
|
||||
if (val >= 0.01) form.value.goldCash = parseFloat((val * form.value.price).toFixed(0))
|
||||
if (val >= 0.001) form.value.goldCash = parseFloat((val * form.value.price).toFixed(0))
|
||||
else form.value.goldCash = undefined
|
||||
} else {
|
||||
if (val >= 0.01) form.value.goldCash = parseFloat((val * form.value.price).toFixed(0))
|
||||
if (val >= 0.001) form.value.goldCash = parseFloat((val * form.value.price).toFixed(0))
|
||||
else form.value.goldCash = undefined
|
||||
}
|
||||
}
|
||||
@@ -338,7 +338,7 @@ function calculateGold(val: number) {
|
||||
// form.value.goldCash = usePriceWithoutType(form.value.goldCash)
|
||||
if (form.value.price) {
|
||||
if (form.value.direction === 1) {
|
||||
if (val / form.value.price >= 0.01)
|
||||
if (val / form.value.price >= 0.001)
|
||||
form.value.goldValue = toFixedDownTwoChar(parseFloat(val / form.value.price))
|
||||
else if (val.toString() === '') form.value.goldValue = undefined
|
||||
else form.value.goldValue = 0
|
||||
|
||||
Reference in New Issue
Block a user