summaryrefslogtreecommitdiff
path: root/interact.go
diff options
context:
space:
mode:
authorNikolaus Gotsche <n@softwarefools.com>2018-09-15 17:21:35 +0200
committerNikolaus Gotsche <n@softwarefools.com>2018-09-15 17:21:35 +0200
commita2a9adcb56650555ce2d2b1e47f4d13bec96f73e (patch)
tree1e612c8ba39238a258375f7b86142ed16d8386a4 /interact.go
parente38358c2e09c12346e3ea1e818b4591afd99f5e1 (diff)
Fixed Billing Bugs, and Missing Libs in Makefile0.2.5
Diffstat (limited to 'interact.go')
-rw-r--r--interact.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/interact.go b/interact.go
index 765c3c3..fd6c576 100644
--- a/interact.go
+++ b/interact.go
@@ -396,7 +396,10 @@ func interact() {
selids := out()
//bids,str2 := getTaskList(selids,false)
//c.Println(bids,str2)
- c.Println(len(out()),"Tasks Selected")
+ c.Println(len(selids),"Tasks Selected")
+ if len(selids) == 0 {
+ return
+ }
multicust, multiproj,projids := checkCustomerProjects(selids)
// CHECK IF ONLY ONE CUSTOMER
billprojid := 0
@@ -413,11 +416,17 @@ func interact() {
}else{
billprojid = projids[0]
}
+
seltasks := getSelectedTasks(selids)
count,hours,dur := analyzeTasks(seltasks)
//c.Printf("%v Tasks Selected. Totaling %.2f (h) - Dates: %s\n",count,hours,dur)
proj,cust := getProject(billprojid)
+ if cust.id == 0 {
+ c.Println(boldRed("Customer ",cust.name," Cannot be billed. Please move ",proj.name," to a valid Customer"))
+ return
+ }
+
billid,billident := newBill(billprojid)
//prs,cus := getProjectName(billprojid)
//c.Println("For",cust.company,"-",cust.name)