You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
315 B
15 lines
315 B
// 10.00 10.60
|
|
function convertPrice(str) {
|
|
if (str == undefined || str == null || str == '')
|
|
return ''
|
|
if (str.endsWith('.00')) {
|
|
return str.substring(0, str.length - 3)
|
|
} else if (str.endsWith('0') && str.includes('.')) {
|
|
return str.substring(0, str.length - 1)
|
|
}
|
|
|
|
return str
|
|
}
|
|
export {
|
|
convertPrice
|
|
}
|