@@ -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 {
- SetRow(int)
- GetRow() int
@@ -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)
}
@@ -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.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
@@ -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.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)