diff options
| author | Nikolaus Gotsche <n@softwarefools.com> | 2019-03-29 12:20:08 +0100 |
|---|---|---|
| committer | Nikolaus Gotsche <n@softwarefools.com> | 2019-03-29 12:20:08 +0100 |
| commit | 8ae371a94cd1fa75e74e91960783648e82aaf031 (patch) | |
| tree | 1c4f86aa309d16cb39c640b7e3a4cc73b58a06d2 /interact.go | |
| parent | a568e743b5ffd6bd7308c526e76a3ec551614f9f (diff) | |
Show Bills, no interface yet
Diffstat (limited to 'interact.go')
| -rw-r--r-- | interact.go | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/interact.go b/interact.go index 640723e..4cdb1a7 100644 --- a/interact.go +++ b/interact.go @@ -789,6 +789,7 @@ func interact(fulldb bool) { //allaccounted := false //resttasks := seltasks + //SELECT SUBSET AND NAME BILLITEM //c.clear()//Println(some,"Str2:",str2) for { @@ -849,34 +850,40 @@ func interact(fulldb bool) { break } } - c.Printf("%T %v - %T %v\n", tsk, tsk, hrf, hrf) + //c.Printf("%T %v - %T %v\n", tsk, tsk, hrf, hrf) allitems = append(allitems, billitem{tsk, itdur, hrf, Round(hrf*cust.Satz, 1)}) c.Print("<<Continue>>") c.ReadLine() //c.ShowPrompt(true) } } - billid, billident := newBill(billprojid) + halfbill := bill{0, "None", dur, proj.Id, proj.Name, time.Time{}, time.Time{}, allitems} + ShowBill(halfbill,false) + if isInterSure("Is this bill Correct?") { + billid, billident := newBill(billprojid) //c.Println(green("Bill Completed")) - fullbill := bill{billid, billident, dur, proj.Id, proj.Name, time.Time{}, time.Time{}, allitems} - saveBill(fullbill) - checkTasks(selids, billid) - c.ProgressBar().Indeterminate(true) - c.ProgressBar().Start() - testid := []int{billid} - testbill := loadBills(testid) + fullbill := bill{billid, billident, dur, proj.Id, proj.Name, time.Time{}, time.Time{}, allitems} + saveBill(fullbill) + checkTasks(selids, billid) + c.ProgressBar().Indeterminate(true) + c.ProgressBar().Start() + testid := []int{billid} + testbill := loadBills(testid) //c.Println(testbill[0].projectname,testbill[0].items) - files := billTemplate(testbill[0], cust) - c.Println(files) - err = runLatex(files.Main, testbill[0].identity) - c.ProgressBar().Stop() - if err == nil { - c.Println("Finished without Errors") - } else { - c.Println("Finished with error:", err) + files := billTemplate(testbill[0], cust) + c.Println(files) + err = runLatex(files.Main, testbill[0].identity) + c.ProgressBar().Stop() + if err == nil { + c.Println("Finished without Errors") + } else { + c.Println("Finished with error:", err) + } + c.Print("<<Continue>>") + c.ReadLine() + }else{ + c.Println(boldRed("Charging Aborted")) } - c.Print("<<Continue>>") - c.ReadLine() stdOut() } c.Println(promptcol("______________________")) |
