fix
wangpengfei
2023-09-05 20acdf9648c20c4b1e0b03af98bd0010bab66f7b
model/purchase/purchase.go
@@ -94,7 +94,7 @@
func (slf Purchase) CalcRealTotalPrice() decimal.Decimal {
   totalPrice := slf.TotalPrice
   if slf.WholeDiscountType == WholeDiscountTypePercent {
      totalPrice = totalPrice.Mul(slf.WholeDiscount).Div(decimal.NewFromInt(100))
      totalPrice = totalPrice.Mul(decimal.NewFromInt(1).Sub(slf.WholeDiscount.Div(decimal.NewFromInt(100))))
   } else if slf.WholeDiscountType == WholeDiscountTypeDiscount {
      totalPrice = totalPrice.Sub(slf.WholeDiscount)
   }