Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
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
黄奎
mall.oytour.com
Commits
0d6821c2
Commit
0d6821c2
authored
Aug 31, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单手续费
parent
2dbe9cf8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+25
-1
No files found.
Mall.Module.Product/OrderModule.cs
View file @
0d6821c2
...
...
@@ -3541,6 +3541,29 @@ namespace Mall.Module.Product
}
demodel
.
PreferPrice
=
TotalMoney
+
CouponsMoney
;
#
region
手续费计算
decimal
ServiceCharge
=
Convert
.
ToDecimal
(
Config
.
SettlementRate
)
/
100
;
if
(
ServiceCharge
>
0
)
{
decimal
TotalFee
=
Math
.
Round
((
demodel
.
Income
??
0
)
*
ServiceCharge
,
2
,
MidpointRounding
.
AwayFromZero
);
if
(
demodel
.
DetailList
.
Any
())
{
int
dcount
=
demodel
.
DetailList
.
Count
();
decimal
avgFee
=
Math
.
Round
(
TotalFee
/
dcount
,
2
,
MidpointRounding
.
AwayFromZero
);
foreach
(
var
item
in
demodel
.
DetailList
)
{
item
.
ServiceCharge
=
avgFee
;
}
if
(
avgFee
*
dcount
!=
TotalFee
)
{
//多余的 直接算在第一个商品里
var
detailmodel
=
demodel
.
DetailList
.
FirstOrDefault
();
detailmodel
.
ServiceCharge
+=
(
TotalFee
-
avgFee
*
dcount
);
}
}
}
#
endregion
var
trans
=
goods_OrderRepository
.
DbTransaction
;
try
{
...
...
@@ -5113,7 +5136,8 @@ namespace Mall.Module.Product
RealMoney
=
0
,
YSMoney
=
0
,
CompanyId
=
demodel
.
CompanyId
,
CompanyProfitRate
=
demodel
.
CompanyProfitRate
CompanyProfitRate
=
demodel
.
CompanyProfitRate
,
ServiceCharge
=
item
.
ServiceCharge
},
trans
);
item
.
Id
=
detailId
;
if
(
detailId
>
0
&&
SatisfiedGoodsList
.
Any
())
...
...
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