Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
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
bltdc
data-center-auto
Commits
996d2ed7
Commit
996d2ed7
authored
Mar 03, 2023
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化fba费计算
parent
1fc08b12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
dc_base_amazon_fee.cs
AutoTurnOver.Models/dc_base_amazon_fee.cs
+1
-0
AmazonDataSynchroService.cs
AutoTurnOver.Services/AmazonDataSynchroService.cs
+3
-1
No files found.
AutoTurnOver.Models/dc_base_amazon_fee.cs
View file @
996d2ed7
...
...
@@ -34,6 +34,7 @@ namespace AutoTurnOver.Models
public
decimal
marketplace_withheld_tax
{
get
;
set
;
}
public
decimal
selling_fees
{
get
;
set
;
}
public
decimal
fba_fees
{
get
;
set
;
}
public
string
fee_types
{
get
;
set
;
}
public
decimal
other_transaction_fees
{
get
;
set
;
}
public
decimal
other
{
get
;
set
;
}
public
decimal
total
{
get
;
set
;
}
...
...
AutoTurnOver.Services/AmazonDataSynchroService.cs
View file @
996d2ed7
...
...
@@ -842,6 +842,7 @@ namespace AutoTurnOver.Services
{
feeShipmentEvent
.
fba_fees
=
item
.
ItemFees
.
Fee
.
Where
(
s
=>
fbaFeeTypeList
.
Any
(
f1
=>
f1
.
Equals
(
s
.
Type
,
StringComparison
.
InvariantCultureIgnoreCase
))).
Sum
(
s
=>
s
.
Amount
.
Text
??
0
);
feeShipmentEvent
.
selling_fees
=
item
.
ItemFees
.
Fee
.
Where
(
s
=>
sellingFeesList
.
Any
(
f1
=>
s
.
Type
.
Equals
(
f1
,
StringComparison
.
InvariantCultureIgnoreCase
))).
Sum
(
s
=>
s
.
Amount
.
Text
??
0
);
feeShipmentEvent
.
fee_types
=
string
.
Join
(
","
,
item
.
ItemFees
.
Fee
.
Select
(
s
=>
s
.
Type
))
;
}
...
...
@@ -915,7 +916,7 @@ namespace AutoTurnOver.Services
public
List
<
dc_base_amazon_fee
>
ApiRefundDataMapDbData
(
AmazonAccountDto
account
,
ApiAmazonSettlementDto
.
AmazonEnvelopeDto
.
MessageDto
.
SettlementReportDto
.
SettlementDataDto
xmlSettlementData
,
ApiAmazonSettlementDto
.
AmazonEnvelopeDto
.
MessageDto
.
SettlementReportDto
.
RefundDto
xmlSettlementOrderData
)
{
var
fbaFeeTypeList
=
new
List
<
string
>
{
"FBAPerOrderFulfillmentFee"
,
"FBAPerUnitFulfillmentFee"
,
"FBAWeightBasedFee"
};
var
fbaFeeTypeList
=
new
List
<
string
>
{
"FBAPerOrderFulfillmentFee"
,
"FBAPerUnitFulfillmentFee"
,
"FBAWeightBasedFee"
,
"ShippingChargeback"
};
var
sellingFeesList
=
new
List
<
string
>
{
"Commission"
,
"RefundCommission"
};
var
datas
=
new
List
<
dc_base_amazon_fee
>
{
};
foreach
(
var
itemFeeAdjustment
in
xmlSettlementOrderData
.
Fulfillment
.
AdjustedItem
)
...
...
@@ -936,6 +937,7 @@ namespace AutoTurnOver.Services
{
feeShipmentEvent
.
fba_fees
=
itemFeeAdjustment
.
ItemFeeAdjustments
.
Fee
.
Where
(
s
=>
fbaFeeTypeList
.
Any
(
f1
=>
f1
.
Equals
(
s
.
Type
,
StringComparison
.
InvariantCultureIgnoreCase
))).
Sum
(
s
=>
s
.
Amount
.
Text
??
0
);
feeShipmentEvent
.
selling_fees
=
itemFeeAdjustment
.
ItemFeeAdjustments
.
Fee
.
Where
(
s
=>
sellingFeesList
.
Any
(
f1
=>
s
.
Type
.
Equals
(
f1
,
StringComparison
.
InvariantCultureIgnoreCase
))).
Sum
(
s
=>
s
.
Amount
.
Text
??
0
);
feeShipmentEvent
.
fee_types
=
string
.
Join
(
","
,
item
.
ItemFees
.
Fee
.
Select
(
s
=>
s
.
Type
));
}
...
...
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