animeic 2 jaren geleden
bovenliggende
commit
b029dc83e3

+ 0 - 22
boxcost/api/iFace.go

@@ -1,22 +0,0 @@
-package api
-
-import "box-cost/db/model"
-
-type IPurchBill interface {
-	PrintPurchType() string
-	Draws()
-	SetContent(*model.PurchaseBill)
-	SetOffset(int)
-	SetTitle(string)
-	SetSignatures([]*model.Signature)
-}
-
-type IRPurchBill interface {
-	PrintPurchType() string
-	Draws()
-	SetContent(*model.PurchaseBill)
-	SetOffset(int)
-	SetTitle(string)
-	SetRow(int)
-	GetRow() int
-}

+ 2 - 2
boxcost/api/report-produce-excel.go

@@ -211,8 +211,8 @@ func (b *ReportProduceExcel) drawTableContent() error {
 			deliveryTime := produce.DeliveryTime.Local().Format("2006-01-02")
 			DrawRow(b.Row, produce.Name, produce.Norm, produce.Paper, produce.PaperSize, produce.PrintSize, fmt.Sprintf("%d", produce.OrderCount), realCount, priceStr, budgetAmount, realPrice, deliveryTime, produce.Remark)
 			b.Row++
-			b.BudgetAmount += produce.Price * float64(produce.OrderCount)
-			b.RealAmount += produce.Price * float64(produce.ConfirmCount)
+			b.BudgetAmount += produce.OrderPrice * float64(produce.OrderCount)
+			b.RealAmount += produce.OrderPrice * float64(produce.ConfirmCount)
 		}
 	}
 

+ 2 - 2
boxcost/api/report-product-excel.go

@@ -201,8 +201,8 @@ func (b *ReportProductExcel) drawTableContent() error {
 			b.FormatToEmpty(&price)
 			DrawRow(b.Row, product.Name, product.Norm, orderCount, product.Unit, realCount, price, budgetAmount, realPrice, deliveryTime, product.Remark)
 			b.Row++
-			b.BudgetAmount += float64(product.OrderCount) * product.Price
-			b.RealAmount += float64(product.ConfirmCount) * product.Price
+			b.BudgetAmount += float64(product.OrderCount) * product.OrderPrice
+			b.RealAmount += float64(product.ConfirmCount) * product.OrderPrice
 		}
 	}
 

+ 2 - 2
boxcost/api/report-purchase-excel.go

@@ -254,8 +254,8 @@ func (b *ReportPurchaseExcel) drawTableContent() error {
 
 			DrawRow(b.Row, paper.Name, paper.Norm, paper.Height, paper.Width, fmt.Sprintf("%d", paper.OrderCount), realCount, price, price2, budgetAmount, realPrice, deliveryTime, paper.Remark)
 			b.Row++
-			b.BudgetAmount += paper.Price * float64(paper.OrderCount)
-			b.RealAmount += paper.Price * float64(paper.ConfirmCount)
+			b.BudgetAmount += paper.OrderPrice * float64(paper.OrderCount)
+			b.RealAmount += paper.OrderPrice * float64(paper.ConfirmCount)
 		}
 	}