liujiandao
2024-04-19 0e731c4e93a1a8a29aceb2834741e276006e2e1b
嘉联打印使用销售价格
1个文件已修改
6 ■■■■ 已修改文件
controllers/operation.go 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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, ".")