Commit 34881b06 authored by Trisno's avatar Trisno

fix total di order detail minus

parent 09a88a5d
......@@ -553,7 +553,7 @@ class OrderDetail extends React.Component {
</View>
<View style={{ flex: 0.5, marginVertical: 5, alignItems: 'flex-end', marginRight: 10 }}>
{/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.detail_trans.point_booked}</Text> */}
<NumberFormat decimalScale={0} value={parseInt(this.state.detail_trans.trans_total) - (parseInt(this.state.detail_trans.point_reduce) + parseInt(this.state.detail_trans.kaspro_point_reduce))} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
<NumberFormat decimalScale={0} value={Math.max(0, parseInt(this.state.detail_trans.trans_total) - (parseInt(this.state.detail_trans.point_reduce) + parseInt(this.state.detail_trans.kaspro_point_reduce)))} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View>
</View>
) : null
......@@ -650,7 +650,7 @@ class OrderDetail extends React.Component {
<NumberFormat
decimalScale={0}
value={
parseInt(this.state.detail_trans.trans_total) - parseInt(this.state.detail_trans.trans_voucher)
Math.max(0, parseInt(this.state.detail_trans.trans_total) - parseInt(this.state.detail_trans.trans_voucher))
}
renderText={
value => <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', textAlign: 'right', color: '#CFB368' }}>Rp. {value}</Text>
......
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