handle huge things!
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import type { Product } from '@/models/products'
|
||||
import { lastPrice } from '@/utils/price'
|
||||
import { getTradeBuyPrice, lastPrice } from '@/utils/price'
|
||||
|
||||
/** قیمت خرید نمایشی محصول (همان مقداری که در لیست و اکشنشیت نشان داده میشود) */
|
||||
export function getProductBuyPrice(product: Product): number {
|
||||
if (product.group_type === 'آبشده') {
|
||||
return lastPrice.value?.buy ?? 0
|
||||
return getTradeBuyPrice(lastPrice.value)
|
||||
}
|
||||
|
||||
if (['مس', 'نقره'].includes(product.group_type)) {
|
||||
|
||||
Reference in New Issue
Block a user