generated from kedaya_haitao/template
This commit is contained in:
parent
d6a767ca3b
commit
1f77559f49
@ -73,6 +73,7 @@ func (c *Controller) Rate(ctx context.Context, idString string) error {
|
||||
// 到这里说明成本和售价有变动
|
||||
article.CostPrice = Decimal(cost)
|
||||
article.SellPrice = Decimal(sell)
|
||||
article.Available = available
|
||||
if cost > 0 {
|
||||
article.Rate = Decimal((article.SellPrice - article.CostPrice) * 100 / article.CostPrice)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user