Commit b68a6e02 authored by Trisno's avatar Trisno

build 132 and fixing bug shopping cart

parent fd4ec96a
{
"expo": {
"extra" : {
"buildNumber" : "131",
"buildNumber" : "132",
"remarks": ""
},
......
......@@ -361,10 +361,10 @@ class ShoppingCart extends React.Component {
pointsused: this.state.kasproPoint
})
}
} else {
if (this.state.kasproPoint - ((parseInt(this.props.order_total) - parseInt(this.props.voucher.reward.value)) + this.props.grabamount) >= -1) {
} else {
if (this.state.kasproPoint - (Math.max(0,(parseInt(this.props.order_total) - parseInt(this.props.voucher.reward.value))) + this.props.grabamount) >= -1) {
this.setState({
pointsused: (parseInt(this.props.order_total) - parseInt(this.props.voucher.reward.value)) + this.props.grabamount,
pointsused: (Math.max(0,parseInt(this.props.order_total) - parseInt(this.props.voucher.reward.value) + this.props.grabamount)),
balanceused: 0
})
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment