Fix orderTotal conversion - server returns dollars not cents
This commit is contained in:
parent
40b1ee5d60
commit
c020fca1d6
1 changed files with 2 additions and 3 deletions
|
|
@ -182,9 +182,8 @@ struct TaskDetailScreen: View {
|
|||
private var orderTotalCents: Int {
|
||||
let fromDetails = details?.orderTotal ?? 0
|
||||
let fromTask = task.orderTotal
|
||||
let cents = fromDetails > 0 ? fromDetails : fromTask
|
||||
NSLog("[Cash] orderTotal fromDetails=%.2f, fromTask=%.2f, using=%.2f, asInt=%d", fromDetails, fromTask, cents, Int(cents))
|
||||
return Int(cents)
|
||||
let dollars = fromDetails > 0 ? fromDetails : fromTask
|
||||
return Int(dollars * 100)
|
||||
}
|
||||
|
||||
private var cashAmountBanner: some View {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue