liujiandao
2024-04-19 0e731c4e93a1a8a29aceb2834741e276006e2e1b
controllers/operation.go
@@ -947,9 +947,9 @@
      f.SetCellValue("Sheet1", "B"+strconv.Itoa(rowIndex), v.Product.Type)
      f.SetCellValue("Sheet1", "C"+strconv.Itoa(rowIndex), v.Product.Unit)
      f.SetCellValue("Sheet1", "D"+strconv.Itoa(rowIndex), v.Amount.String())
      f.SetCellValue("Sheet1", "E"+strconv.Itoa(rowIndex), v.Product.PurchasePrice.String())
      if !v.Product.PurchasePrice.IsZero() {
         ap := v.Amount.Mul(v.Product.PurchasePrice)
      f.SetCellValue("Sheet1", "E"+strconv.Itoa(rowIndex), v.Product.SalePrice.String())
      if !v.Product.SalePrice.IsZero() {
         ap := v.Amount.Mul(v.Product.SalePrice)
         totalPrice = totalPrice.Add(ap)
         price := ap.String()
         split := strings.Split(price, ".")