Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ios1x
Overview
Overview
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
cemarose
ios1x
Commits
7e3a65bd
Commit
7e3a65bd
authored
7 years ago
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update order currencyCode
parent
0dc28325
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
KWMOrderCell.m
iCemarose/Class/UI/Mine/Cell/KWMOrderCell.m
+4
-2
KWMCurrencyUtil.h
iCemarose/Class/Util/KWMCurrencyUtil.h
+1
-0
KWMCurrencyUtil.m
iCemarose/Class/Util/KWMCurrencyUtil.m
+6
-0
No files found.
iCemarose/Class/UI/Mine/Cell/KWMOrderCell.m
View file @
7e3a65bd
...
@@ -55,7 +55,8 @@
...
@@ -55,7 +55,8 @@
_order
=
order
;
_order
=
order
;
_lbOrderNum
.
text
=
[
NSString
stringWithFormat
:
@"订单 %@"
,
order
.
identifier
?
order
.
identifier
.
stringValue
:
@""
];
_lbOrderNum
.
text
=
[
NSString
stringWithFormat
:
@"订单 %@"
,
order
.
identifier
?
order
.
identifier
.
stringValue
:
@""
];
// _lbTotalPrice.text = [NSString stringWithFormat:@"%@",[KWMStringUtil getEUR2CNYstring:order.totalPrice]];
// _lbTotalPrice.text = [NSString stringWithFormat:@"%@",[KWMStringUtil getEUR2CNYstring:order.totalPrice]];
_lbTotalPrice
.
text
=
[[
KWMCurrencyUtil
sharedInstance
]
priceFormattedByCurrencyCode
:
order
.
totalPrice
];
// _lbTotalPrice.text = [[KWMCurrencyUtil sharedInstance] priceFormattedByCurrencyCode:order.totalPrice];
_lbTotalPrice
.
text
=
[[
KWMCurrencyUtil
sharedInstance
]
priceFormatted
:
order
.
totalPrice
currencyCode
:
order
.
currency
];
__block
NSInteger
fulfilledCount
=
0
;
__block
NSInteger
fulfilledCount
=
0
;
[
order
.
lineItems
enumerateObjectsUsingBlock
:
^
(
BUYLineItem
*
_Nonnull
obj
,
NSUInteger
idx
,
BOOL
*
_Nonnull
stop
)
{
[
order
.
lineItems
enumerateObjectsUsingBlock
:
^
(
BUYLineItem
*
_Nonnull
obj
,
NSUInteger
idx
,
BOOL
*
_Nonnull
stop
)
{
...
@@ -72,7 +73,8 @@
...
@@ -72,7 +73,8 @@
if
(
lineItem
!=
nil
)
{
if
(
lineItem
!=
nil
)
{
_lineItem
=
lineItem
;
_lineItem
=
lineItem
;
// self.lbPrice.text = [NSString stringWithFormat:@"¥%@",[KWMStringUtil getEUR2CNYstring:lineItem.price]];
// self.lbPrice.text = [NSString stringWithFormat:@"¥%@",[KWMStringUtil getEUR2CNYstring:lineItem.price]];
self
.
lbPrice
.
text
=
[[
KWMCurrencyUtil
sharedInstance
]
priceFormattedByCurrencyCode
:
lineItem
.
price
];
// self.lbPrice.text = [[KWMCurrencyUtil sharedInstance] priceFormattedByCurrencyCode:lineItem.price];
self
.
lbPrice
.
text
=
[[
KWMCurrencyUtil
sharedInstance
]
priceFormatted
:
lineItem
.
price
currencyCode
:
@"EUR"
];
self
.
lbName
.
text
=
lineItem
.
title
;
self
.
lbName
.
text
=
lineItem
.
title
;
self
.
lbSize
.
text
=
[
NSString
stringWithFormat
:
@"x%@/%@"
,
lineItem
.
quantity
,
lineItem
.
variantTitle
];
self
.
lbSize
.
text
=
[
NSString
stringWithFormat
:
@"x%@/%@"
,
lineItem
.
quantity
,
lineItem
.
variantTitle
];
}
}
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/Util/KWMCurrencyUtil.h
View file @
7e3a65bd
...
@@ -16,5 +16,6 @@
...
@@ -16,5 +16,6 @@
-
(
NSString
*
)
priceFormattedByCurrencyCode
:(
NSDecimalNumber
*
)
pric
;
-
(
NSString
*
)
priceFormattedByCurrencyCode
:(
NSDecimalNumber
*
)
pric
;
-
(
NSString
*
)
fixFormatted
:(
NSString
*
)
price
;
-
(
NSString
*
)
fixFormatted
:(
NSString
*
)
price
;
-
(
NSDecimalNumber
*
)
calcPriceByCurrencyCode
:(
NSDecimalNumber
*
)
price
;
-
(
NSDecimalNumber
*
)
calcPriceByCurrencyCode
:(
NSDecimalNumber
*
)
price
;
-
(
NSString
*
)
priceFormatted
:(
NSDecimalNumber
*
)
price
currencyCode
:(
NSString
*
)
code
;
@end
@end
This diff is collapsed.
Click to expand it.
iCemarose/Class/Util/KWMCurrencyUtil.m
View file @
7e3a65bd
...
@@ -76,4 +76,10 @@
...
@@ -76,4 +76,10 @@
return
price
;
return
price
;
}
}
-
(
NSString
*
)
priceFormatted
:
(
NSDecimalNumber
*
)
price
currencyCode
:
(
NSString
*
)
code
{
NSNumberFormatter
*
formatter
=
[
self
numberFormatter
];
formatter
.
currencyCode
=
code
;
return
[
formatter
stringFromNumber
:
price
];
}
@end
@end
This diff is collapsed.
Click to expand it.
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