fix borcecu edits 2
This commit is contained in:
@@ -439,7 +439,7 @@ export function formatMainMetalReceiveText(weight?: number | null) {
|
||||
|
||||
export function calcSellReceivedMetalWeight(
|
||||
count?: number | null,
|
||||
product?: ProductUnitSource & { percent_fee_sell?: number | null } | null,
|
||||
product?: ProductUnitSource | null,
|
||||
) {
|
||||
const quantity = Number(count ?? 0)
|
||||
const unitAmount = Number(product?.amount ?? 0)
|
||||
@@ -447,9 +447,8 @@ export function calcSellReceivedMetalWeight(
|
||||
return 0
|
||||
}
|
||||
|
||||
const grossAmount = quantity * unitAmount
|
||||
const feeRate = Number(product?.percent_fee_sell ?? 0)
|
||||
return grossAmount - feeRate * grossAmount
|
||||
// کارمزد محصول تعدادی از ریال است — وزن دریافتی فلز کم نمیشود
|
||||
return quantity * unitAmount
|
||||
}
|
||||
|
||||
export function isCashLikeDealMethod(method?: string | null) {
|
||||
|
||||
Reference in New Issue
Block a user