feat(sale): 添加销售税率字段支持

- 在benefit结构体中新增AddTaxRate字段
- 更新导入包顺序,将time包移到标准库位置
- 为销售相关数据模型增加正向税率计算支持
This commit is contained in:
2026-06-04 14:33:21 +08:00
parent adfe22c78b
commit 68184b3e5e

View File

@@ -2,9 +2,10 @@ package sale
import (
"context"
"time"
"git.kumo.work/shama/service/client"
"github.com/shopspring/decimal"
"time"
)
type benefit struct {
@@ -32,6 +33,7 @@ type BenefitProductItem struct {
CurrencyName string `json:"currencyName"`
CurrencyRate decimal.Decimal `json:"currencyRate"`
MinusTaxRate *decimal.Decimal `json:"minusTaxRate"`
AddTaxRate *decimal.Decimal `json:"addTaxRate"`
SalePrice decimal.Decimal `json:"salePrice"`
SaleAmount decimal.Decimal `json:"saleAmount"`
SaleCurrency string `json:"saleCurrency"`