added pdf in withdraw and deposit and fix bug

This commit is contained in:
2026-06-09 21:06:29 +03:30
parent 8582ce4d1b
commit cf3dbbceb1
21 changed files with 454 additions and 85 deletions
+15
View File
@@ -0,0 +1,15 @@
export const TRADE_WEIGHT_UNIT_GRAM = 'گرم'
export const TRADE_WEIGHT_UNIT_KILOGRAM = 'کیلوگرم'
export function isKilogramUnit(unit?: string | null) {
const value = (unit ?? '').trim()
return value === TRADE_WEIGHT_UNIT_KILOGRAM || value === 'kilogram' || value === 'kg'
}
export function resolveTradeWeightUnit(settingValue?: string | number | null) {
return isKilogramUnit(settingValue?.toString()) ? TRADE_WEIGHT_UNIT_KILOGRAM : TRADE_WEIGHT_UNIT_GRAM
}
export function weightFieldLabelForUnit(unit?: string | null) {
return isKilogramUnit(unit) ? 'وزن به کیلوگرم' : 'وزن به گرم'
}