添加物品单位功能

This commit is contained in:
zxj
2025-08-05 16:51:11 +08:00
parent 2eec3ec1d4
commit d99c0e6e79
14 changed files with 533 additions and 127 deletions
@@ -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