Skip to content

Commit

Permalink
Added KD-Bank as well known
Browse files Browse the repository at this point in the history
  • Loading branch information
mtotschnig committed Sep 9, 2024
1 parent 7b8223b commit f1399b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fints/src/main/java/org/totschnig/fints/WellKnownBank.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.graphics.Color
import androidx.annotation.DrawableRes
import org.totschnig.myexpenses.model2.Bank

enum class WellKnownBank(@DrawableRes val icon: Int, val color: Int, val blz: String? = null) {
enum class WellKnownBank(@DrawableRes val icon: Int, val color: Int, vararg val blz: String) {
DKB(R.drawable.dkb, Color.rgb(20, 141, 234), "12030000"),
GLS(R.drawable.gls, Color.rgb(38, 230, 101), "43060967"),
ING(R.drawable.ing, Color.rgb(255, 98, 0), "50010517"),
Expand All @@ -20,12 +20,12 @@ enum class WellKnownBank(@DrawableRes val icon: Int, val color: Int, val blz: St
MLP(R.drawable.mlp, Color.rgb(190, 182, 170), "67230000"),
DIREKT1822(R.drawable.direkt1822_96, Color.rgb(0, 58, 107), "50050222"),
PSD(R.drawable.psd, Color.rgb(1, 153, 102)),
COMMERZBANK(R.drawable.commerz, Color.rgb(254, 213, 41))

COMMERZBANK(R.drawable.commerz, Color.rgb(254, 213, 41)),
KD(R.drawable.kd, Color.rgb(162, 181, 45), "10061006", "44064406", "81068106", "35060190")
}

val Bank.asWellKnown: WellKnownBank?
get() = WellKnownBank.entries.find { it.blz == blz } ?: when {
get() = WellKnownBank.entries.find { it.blz.contains(blz) } ?: when {
blz.startsWith("200411") -> WellKnownBank.COMDIRECT
bankName.contains("Commerzbank") -> WellKnownBank.COMMERZBANK
bankName.contains("sparda", ignoreCase = true) -> WellKnownBank.SPARDA
Expand Down
Binary file added fints/src/main/res/drawable-xxhdpi/kd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f1399b5

Please sign in to comment.