blob: a6548e4e8c8f0baf8dc60bbd5c5ba420abeb9521 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package net.taler.merchantpos
import android.text.Editable
import androidx.lifecycle.ViewModel
class PosTerminalViewModel : ViewModel() {
var activeSubject: Editable? = null
var merchantConfig: MerchantConfig? = null
var activeOrderId: String? = null
var activeAmount: String? = null
var activeTalerPayUri: String? = null
fun activeAmountPretty(): String? {
val amount = activeAmount ?: return null
val components = amount.split(":")
return "${components[1]} ${components[0]}"
}
}
|