price calulator changed 2
This commit is contained in:
@@ -98,8 +98,10 @@ export function calcPayablePriceRial(
|
|||||||
targetRialCash?: number | null
|
targetRialCash?: number | null
|
||||||
) {
|
) {
|
||||||
if (feeDeductFromGold.value) {
|
if (feeDeductFromGold.value) {
|
||||||
|
if (targetRialCash != null && Number(targetRialCash) > 0) {
|
||||||
|
return Number(targetRialCash)
|
||||||
|
}
|
||||||
if (isBuy) return finalPriceRial + feeInRial
|
if (isBuy) return finalPriceRial + feeInRial
|
||||||
if (targetRialCash != null && Number(targetRialCash) > 0) return Number(targetRialCash)
|
|
||||||
return finalPriceRial
|
return finalPriceRial
|
||||||
}
|
}
|
||||||
return isBuy ? finalPriceRial : Math.max(0, finalPriceRial - feeInRial)
|
return isBuy ? finalPriceRial : Math.max(0, finalPriceRial - feeInRial)
|
||||||
|
|||||||
@@ -466,7 +466,7 @@ const payablePrice = computed(() =>
|
|||||||
finalPrice.value,
|
finalPrice.value,
|
||||||
feeInRial.value,
|
feeInRial.value,
|
||||||
isBuy.value,
|
isBuy.value,
|
||||||
!isBuy.value && inputLock.value === 'rial' ? form.value?.goldCash : undefined
|
inputLock.value === 'rial' ? form.value?.goldCash : undefined
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
const sellGoldDebit = computed(() => calcSellGoldDebit(orderGoldAmount.value, feeInGrams.value))
|
const sellGoldDebit = computed(() => calcSellGoldDebit(orderGoldAmount.value, feeInGrams.value))
|
||||||
|
|||||||
Reference in New Issue
Block a user