添加物品单位功能
This commit is contained in:
@@ -90,7 +90,7 @@ fun Float?.toSafeFloat(decimalPlaces: Int = 2): Float {
|
||||
*/
|
||||
private fun getDecimalPlaces(unitName: String?): Int {
|
||||
val decimalPlaces = when (unitName) {
|
||||
"斤", "公斤", "升" -> 2
|
||||
"斤", "公斤", "升", "千克" -> 2
|
||||
else -> 0
|
||||
}
|
||||
return decimalPlaces
|
||||
|
||||
Reference in New Issue
Block a user