func (h C1G2Summary) Execute(report gr.GoReport) { report.Font("MPBOLD", 9, "") y := 15.0 report.CellRight(123, y, 20, "Total:") report.CellRight(150, y, 20, gr.AddComma(strconv.FormatFloat( report.SumWork["g2hrcum"], 'f', 1, 64))+" Hrs") report.CellRight(170, y, 26, gr.AddComma(strconv.FormatFloat( report.SumWork["g2amtcum"], 'f', 2, 64))+" USD") y = 25.0 report.CellRight(123, y, 20, "Tax:") report.CellRight(150, y, 20, "7.75%") tax := report.SumWork["g2amtcum"] * 0.0775 report.CellRight(170, y, 26, gr.AddComma(strconv.FormatFloat( tax, 'f', 2, 64))+" USD") report.LineType("straight", 0.3) report.LineH(170, 33, 199) y = 39.0 report.Font("MPBOLD", 11, "") report.CellRight(123, y, 20, "AMOUT DUE:") report.CellRight(170, y, 26, gr.AddComma(strconv.FormatFloat( report.SumWork["g2amtcum"]+tax, 'f', 2, 64))+" USD") report.NewPage(true) report.SumWork["g2item"] = 0.0 report.SumWork["g2hrcum"] = 0.0 report.SumWork["g2amtcum"] = 0.0 }
func (h C2G2Summary) Execute(report gr.GoReport) { x := 25.0 y := 1.5 report.LineType("straight", 15) report.GrayStroke(0.85) report.LineH(x+116, 0, x+160) report.LineType("straight", 0.3) report.GrayStroke(0) report.Rect(x+116, 0, x+160, 5) report.Rect(x+116, 5, x+160, 10) report.Rect(x+116, 10, x+160, 15) report.Font("IPAexゴシック", 10, "") report.CellRight(x+159, y, 0, "\u00A5"+gr.AddComma( strconv.FormatFloat(report.SumWork["g2amtcum"], 'f', 0, 64))) report.Cell(x+117, y, "合計") amt := report.SumWork["g2amtcum"] report.CellRight(x+159, y, 0, "\u00A5"+gr.AddComma( strconv.FormatFloat(amt, 'f', 0, 64))) cons := amt * 0.08 report.Cell(x+117, y+5, "消費税(8%)") report.CellRight(x+159, y+5, 0, "\u00A5"+gr.AddComma( strconv.FormatFloat(cons, 'f', 0, 64))) report.Cell(x+117, y+10, "請求金額") report.CellRight(x+159, y+10, 0, "\u00A5"+gr.AddComma( strconv.FormatFloat(amt+cons, 'f', 0, 64))) report.SumWork["g2amtcum"] = 0.0 report.SumWork["g2item"] = 0.0 report.NewPage(true) }
func (h M1G2Summary) Execute(report gr.GoReport) { report.Cell(150, 2, "Dept Total") report.CellRight(180, 2, 30, strconv.FormatFloat( report.SumWork["g2cum"], 'f', 2, 64)) report.SumWork["g2cum"] = 0.0 //Force New Page report.NewPage(false) }