Fixing PBT import

csv
Laurent 6 years ago
parent 84ab42c35c
commit fe4129cc1a
  1. 8
      app/src/main/java/net/pokeranalytics/android/util/csv/SessionCSVDescriptor.kt

@ -91,11 +91,11 @@ class SessionCSVDescriptor(source: DataSource, private var isTournament: Boolean
}
val amount = if (buyin != null && buyin!! > 0) {
type = TransactionType.getByValue(TransactionType.Value.DEPOSIT, realm)
buyin
} else if (cashedOut != null && cashedOut!! > 0) {
type = TransactionType.getByValue(TransactionType.Value.WITHDRAWAL, realm)
cashedOut!! * -1
buyin!! * -1
} else if (cashedOut != null && cashedOut!! > 0) {
type = TransactionType.getByValue(TransactionType.Value.DEPOSIT, realm)
cashedOut
} else {
null
}

Loading…
Cancel
Save