bentocorp / ios

The customer iOS app
2 stars 0 forks source link

Coupons are being floored (2.75 becomes 2.00) #515

Open vcardillo opened 8 years ago

vcardillo commented 8 years ago

I've checked, and there appears to be a bug in both Android ​and​ iOS where coupons with cents (e.g. $2.75) are being floored (e.g. to $2.00). (edited)

[10:11] The backend is returning the float as a string, but it seems like you guys are casting it to an int

https://bentonow.slack.com/archives/engineering/p1456294206000002

josephlausf commented 8 years ago

fixed

simulator screen shot feb 24 2016 11 22 50 am

{"data":"{\"Stripe\":{\"stripeToken\":\"NULL\"},\"OrderDetails\":{\"tax_percentage\":\"8.75\",\"delivery_price\":\"1.99\",\"tax_cents\":\"98\",\"total_cents\":\"1447\",\"coords\":{\"lat\":\"37.787360\",\"long\":\"-122.408219\"},\"items_total\":\"15.00\",\"address\":{\"number\":\"246-298\",\"state\":\"CA\",\"street\":\"Powell Street\",\"city\":\"San Francisco\",\"zip\":\"94102\"},\"subtotal\":\"12.22\",\"tip_cents\":\"225\",\"total_cents_without_coupon\":\"2073\",\"tip_percentage\":\"15\",\"coupon_discount_cents\":\"575\"},\"order_type\":\"2\",\"OrderItems\":[{\"items\":[{\"id\":\"58\",\"type\":\"main\",\"name\":\"Hawaiian Shrimp Poke\"},{\"id\":\"62\",\"type\":\"side1\",\"name\":\"Cucumber Salad\"},{\"id\":\"60\",\"type\":\"side2\",\"name\":\"Dungeness Crab Roll\"},{\"id\":\"1\",\"type\":\"side3\",\"name\":\"Eggplant\"},{\"id\":\"48\",\"type\":\"side4\",\"name\":\"Enoki Mushrooms\"}],\"unit_price\":\"15.00\",\"item_type\":\"CustomerBentoBox\"}],\"AppVersion\":\"2.68\",\"kitchen\":\"1\",\"CouponCode\":\"ridev\",\"for_date\":\"2016-02-25\",\"Platform\":\"iOS\",\"scheduled_window_start\":\"11:00\",\"scheduled_window_end\":\"12:00\",\"OrderAheadZone\":\"1\",\"Eta\":{\"min\":\"15\",\"max\":\"25\"},\"MenuId\":\"321\",\"IdempotentToken\":\"CB6B7791-B0F7-427B-9D6E-959450996C69\"}"}