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
2022-10-06 13:39:10 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4f1ff3f9ea397bac8ce8e6ed9f7169c9162ececc
4f1ff3f9
1 parent
b0634156
fix oldCoupons final_price total value
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
4f1ff3f
...
...
@@ -3951,7 +3951,8 @@ public class swiftApi {
let
loyaltyBadge
=
LoyaltyBadgeModel
()
let
totalCouponDiscount
=
oldCoupons
.
reduce
(
0
)
{
$0
+
(
Float
(
$1
.
discount
??
""
)
??
0
)
}
// let totalCouponDiscount = oldCoupons.reduce(0) { $0 + (Float($1.discount ?? "") ?? 0) }
let
totalCouponDiscount
=
oldCoupons
.
reduce
(
0
)
{
$0
+
(
$1
.
couponset_data
?
.
final_price
??
0.0
)
}
loyaltyBadge
.
_value
=
totalCouponDiscount
loyaltyBadge
.
_couponCount
=
oldCoupons
.
count
...
...
Please
register
or
login
to post a comment