|
|
|
@ -63,6 +63,10 @@ function formateWeight(weight) { |
|
|
|
return (parseFloat(weight) / 1000).toFixed(2) |
|
|
|
} |
|
|
|
|
|
|
|
function formatePrice(weight) { |
|
|
|
return (parseFloat(weight) * 1000).toFixed(0) |
|
|
|
} |
|
|
|
|
|
|
|
function maxWeight(fweight, sweight) { |
|
|
|
if(fweight && sweight){ |
|
|
|
if(fweight > sweight){ |
|
|
|
@ -91,6 +95,7 @@ function minWeight(fweight, sweight) { |
|
|
|
|
|
|
|
module.exports = { |
|
|
|
formateAmount: formateAmount, |
|
|
|
formatePrice: formatePrice, |
|
|
|
formateWeight: formateWeight, |
|
|
|
formatTime: formatTime, |
|
|
|
formateDate: formateDate, |
|
|
|
|