update
This commit is contained in:
@@ -34,4 +34,15 @@ export function numSum(arr) {
|
||||
return a + b * 100
|
||||
}, 0)
|
||||
return (sum / 100).toFixed(2)
|
||||
}
|
||||
export function mathFloorPrice(price,item) {
|
||||
if( item ){
|
||||
if( item.productType == 'weight' || item.type == 'weight'){
|
||||
return (Math.floor(price * 100)/100).toFixed(2)
|
||||
} else {
|
||||
return parseFloat(price).toFixed(2)
|
||||
}
|
||||
} else {
|
||||
return parseFloat(price).toFixed(2)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user