优化交易创建流程,客户管理新增折扣与来源字段及功能
This commit is contained in:
@@ -13,7 +13,7 @@ type ProductDiscount struct {
|
||||
Discount int32 `json:"discount" gorm:"column:discount"` // 产品折扣
|
||||
}
|
||||
|
||||
func (pd ProductDiscount) Decimal() decimal.Decimal {
|
||||
func (pd ProductDiscount) Rate() decimal.Decimal {
|
||||
return decimal.NewFromInt32(pd.Discount).
|
||||
Div(decimal.NewFromInt32(100))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user