| | |
| | | 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, ".") |