Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
go_sku_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f6f91ad9
authored
Dec 26, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改含税逻辑
parent
22792f28
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
service/service_ly_common.go
service/service_ly_common.go
View file @
f6f91ad9
...
...
@@ -317,11 +317,15 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
// 香港自营(L0018562)WMS同步过来的未税成本单价(美金)
//需更新到 基石该SKU的 成本价——香港交货($)且也需乘美金转人民币汇率, 再乘以关税,填入到基石该SKU的 成本价——国内含税(¥)价
//这里要获取一个第一个阶梯的未税成本价
// L0003270 这个供应商的话,两种情况都会有
var
costNoTax
float64
if
sku
.
Canal
==
"L0018319"
{
if
sku
.
Canal
==
"L0018319"
||
sku
.
Canal
==
"L0003270"
{
for
index
,
price
:=
range
sku
.
OriginalPrice
{
if
index
==
0
{
costNoTax
=
price
.
PriceCn
if
costNoTax
==
0
{
continue
}
}
originalPrice
=
append
(
originalPrice
,
model
.
OriginPrice
{
Purchases
:
price
.
Purchases
,
...
...
@@ -334,7 +338,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
}
}
if
sku
.
Canal
==
"L0018562"
{
if
sku
.
Canal
==
"L0018562"
||
sku
.
Canal
==
"L0003270"
{
redisCon
:=
gredis
.
Conn
(
"default_r"
)
defer
redisCon
.
Close
()
usdRatio
,
_
:=
redis
.
Float64
(
redisCon
.
Do
(
"HGET"
,
"erp_rate"
,
2
))
...
...
@@ -342,6 +346,9 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
priceCnNoTax
:=
c
.
MulFloat
(
price
.
PriceUs
,
usdRatio
)
if
index
==
0
{
costNoTax
=
priceCnNoTax
if
costNoTax
==
0
{
continue
}
}
originalPrice
=
append
(
originalPrice
,
model
.
OriginPrice
{
Purchases
:
price
.
Purchases
,
...
...
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