fix borcecu edits 2

This commit is contained in:
2026-07-23 12:27:24 +03:30
parent bc642e91ed
commit 149f82edd4
2 changed files with 26 additions and 7 deletions
+3 -4
View File
@@ -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) {