Fix amountString formatting for categories and transactions
This commit is contained in:
parent
8e4f9a10ab
commit
b242974544
2 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ extension Category {
|
|||
}
|
||||
|
||||
public var amountString: String {
|
||||
return self.amount > 0 ? String(format: "%.02d", Double(self.amount) / 100.0) : ""
|
||||
return self.amount > 0 ? String(format: "%.02f", Double(self.amount) / 100.0) : ""
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ extension Transaction {
|
|||
}
|
||||
|
||||
public var amountString: String {
|
||||
return self.amount > 0 ? String(format: "%.02d", Double(self.amount) / 100.0) : ""
|
||||
return self.amount > 0 ? String(format: "%.02f", Double(self.amount) / 100.0) : ""
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue