Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2023-01-17 11:49:44 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ddf13914bf2ffb31d427ec6509dde9c2f2e83704
ddf13914
1 parent
1b03d4c1
fix AnalysisItemViewCell value
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisItemViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
ddf1391
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisItemViewCell.swift
View file @
ddf1391
...
...
@@ -70,7 +70,7 @@ extension AnalysisItemViewCell {
dateLabel
.
text
=
item
.
_date
// titleLabel.text = item._name
let
priceFloat
=
Float
(
round
(
100
*
(
Float
(
item
.
_
discount
)
??
0.0
))
/
100
)
let
priceFloat
=
Float
(
round
(
100
*
(
Float
(
item
.
_
final_price
)
))
/
100
)
var
priceString
=
"0"
priceString
=
String
(
format
:
"%.2f"
,
priceFloat
)
.
replacingOccurrences
(
of
:
"."
,
with
:
","
,
options
:
.
literal
,
range
:
nil
)
priceLabel
.
text
=
priceString
+
"€"
...
...
@@ -106,7 +106,7 @@ extension AnalysisItemViewCell {
// itemImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
// titleLabel.text = couponSetData?.name ?? ""
let
priceFloat
=
Float
(
round
(
100
*
(
Float
(
item
.
discount
??
""
)
??
0.0
))
/
100
)
let
priceFloat
=
Float
(
round
(
100
*
(
Float
(
couponSetData
?
.
final_price
??
0.0
)
))
/
100
)
var
priceString
=
"0"
priceString
=
String
(
format
:
"%.2f"
,
priceFloat
)
.
replacingOccurrences
(
of
:
"."
,
with
:
","
,
options
:
.
literal
,
range
:
nil
)
priceLabel
.
text
=
priceString
+
"€"
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
ddf1391
...
...
@@ -5327,6 +5327,7 @@ public class swiftApi {
private
var
name
:
String
?
private
var
receiver_msisdn
:
String
?
private
var
sender_msisdn
:
String
?
private
var
final_price
:
Float
?
public
init
()
{
self
.
couponset_uuid
=
""
...
...
@@ -5338,6 +5339,7 @@ public class swiftApi {
self
.
name
=
""
self
.
receiver_msisdn
=
""
self
.
sender_msisdn
=
""
self
.
final_price
=
0.0
}
public
init
(
dictionary
:
[
String
:
Any
])
{
...
...
@@ -5348,10 +5350,12 @@ public class swiftApi {
// self.transaction_metadata = dictionary["transaction_metadata"] as? String? ?? ""
self
.
name
=
""
self
.
final_price
=
0.0
let
couponsetsList
=
swiftApi
()
.
getCouponSetList
()
for
item
in
couponsetsList
{
if
(
item
.
uuid
==
self
.
couponset_uuid
)
{
self
.
name
=
item
.
name
??
""
self
.
final_price
=
item
.
final_price
??
0.0
break
;
}
}
...
...
@@ -5472,6 +5476,15 @@ public class swiftApi {
self
.
sender_msisdn
=
newValue
}
}
public
var
_final_price
:
Float
{
get
{
// getter
return
self
.
final_price
??
0.0
}
set
(
newValue
)
{
//setter
self
.
final_price
=
newValue
}
}
}
...
...
Please
register
or
login
to post a comment