func WeekCalls(people []string) string { start, end := week.This() //research html/template - it escapes/unescapes left tags s := "<tbody&rt;<tr&rt;<td&rt;" + start + " - " + end + "</td&rt;</tr&rt;<tr&rt;" for _, v := range people { s += "<td>" + v + "</td>" } return s + "<tr></tbody>" }
func NewSales() float64 { start, end := week.This() q, _ := Query("UDA", "SELECT sum(amount) from paypal where date between '"+start+"' and '"+end+"' and result = 0 and [comment 2] not like 'Recurring%'") for _, v := range stringutil.Tokens(q, "\n\r ") { if f, e := strconv.ParseFloat(v, 64); e == nil { return f } } return 0.00 }