Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
new_excelso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Prasetya Saputra
new_excelso
Commits
d12dd814
Commit
d12dd814
authored
Aug 27, 2020
by
William Goszal
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix order detail salah tampilin nilai total dan discount (harusnya pake detail_trans.trans_voucher
parent
32978458
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
OrderDetail.js
view/OrderDetail.js
+30
-6
No files found.
view/OrderDetail.js
View file @
d12dd814
...
@@ -568,6 +568,7 @@ class OrderDetail extends React.Component {
...
@@ -568,6 +568,7 @@ class OrderDetail extends React.Component {
)
)
}
}
{
/* -- DISCOUNT --**/
}
{
{
this
.
state
.
detail_trans
!=
''
?
(
this
.
state
.
detail_trans
!=
''
?
(
this
.
state
.
detail_trans
.
used_reward
.
length
?
(
this
.
state
.
detail_trans
.
used_reward
.
length
?
(
...
@@ -577,12 +578,16 @@ class OrderDetail extends React.Component {
...
@@ -577,12 +578,16 @@ class OrderDetail extends React.Component {
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right' }}>- {this.state.detail_trans.trans_discount}</Text> */
}
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right' }}>- {this.state.detail_trans.trans_discount}</Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
state
.
detail_trans
.
used_reward
[
0
].
reward
.
value
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
textAlign
:
'right'
}}
>-
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
state
.
detail_trans
.
trans_voucher
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
textAlign
:
'right'
}}
>-
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
:
(
null
)
)
:
(
null
)
)
:
(
null
)
)
:
(
null
)
}
}
{
/* -- DELIVERY RATE --**/
}
{
{
this
.
state
.
detail_trans
!=
''
?
(
this
.
state
.
detail_trans
!=
''
?
(
this
.
state
.
detail_trans
.
trans_type
==
2
?
(
this
.
state
.
detail_trans
.
trans_type
==
2
?
(
...
@@ -601,12 +606,13 @@ class OrderDetail extends React.Component {
...
@@ -601,12 +606,13 @@ class OrderDetail extends React.Component {
}
}
})
})
}
}
{
/* <NumberFormat decimalScale={0} value={this.state.detail_trans.trans_discount} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', textAlign: 'right' }}>- Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> */
}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
:
(
null
)
)
:
(
null
)
)
:
(
null
)
)
:
(
null
)
}
}
{
/* -- TOTAL --**/
}
{
this
.
state
.
detail_trans
!=
""
?
(
{
this
.
state
.
detail_trans
!=
""
?
(
this
.
state
.
detail_trans
.
used_reward
.
length
?
(
this
.
state
.
detail_trans
.
used_reward
.
length
?
(
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
marginHorizontal
:
10
,
marginTop
:
5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
marginHorizontal
:
10
,
marginTop
:
5
}}
>
...
@@ -614,8 +620,18 @@ class OrderDetail extends React.Component {
...
@@ -614,8 +620,18 @@ class OrderDetail extends React.Component {
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
{
i18n
.
t
(
'total'
)}
<
/Text
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
{
i18n
.
t
(
'total'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
{
/* <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', textAlign: 'right', color: '#CFB368' }}>{this.state.detail_trans.trans_total}</Text> */
}
<
NumberFormat
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
parseInt
(
this
.
state
.
detail_trans
.
trans_total
)
-
parseInt
(
this
.
state
.
detail_trans
.
used_reward
[
0
].
reward
.
value
)}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
decimalScale
=
{
0
}
value
=
{
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
>
}
displayType
=
{
'text'
}
thousandSeparator
=
{
true
}
prefix
=
{
''
}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
:
(
)
:
(
...
@@ -624,8 +640,16 @@ class OrderDetail extends React.Component {
...
@@ -624,8 +640,16 @@ class OrderDetail extends React.Component {
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
{
i18n
.
t
(
'total'
)}
<
/Text
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
{
i18n
.
t
(
'total'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
{
/* <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', textAlign: 'right', color: '#CFB368' }}>{this.state.detail_trans.trans_total}</Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
state
.
detail_trans
.
trans_total
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
value
=
{
this
.
state
.
detail_trans
.
trans_total
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
Rp
.
{
value
}
<
/Text
>
}
displayType
=
{
'text'
}
thousandSeparator
=
{
true
}
prefix
=
{
''
}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
))
:
null
))
:
null
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment