diff options
Diffstat (limited to 'interact.go')
| -rw-r--r-- | interact.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/interact.go b/interact.go index 67e7f15..24f4e34 100644 --- a/interact.go +++ b/interact.go @@ -112,6 +112,30 @@ func interact() { }) shell.AddCmd(&ishell.Cmd{ + Name: "checkbill", + Help: "<id> check a Bill with the following id as paid", + LongHelp: ` Usage: checkbill <id> + Check the bill of the set <id> as paid on the current date`, + Func: func(c *ishell.Context) { + arg := "none" + if len(c.Args) > 0 { + arg = strings.Join(c.Args, " ") + argi,err := strconv.Atoi(arg) + if err == nil{ + checkBill(argi) + //stdOut() + }else{ + c.Println(boldRed(arg,"is not a valid id!")) + } + }else{ + c.Println(boldRed("checkbill <id> - Please enter an id")) + showLastBills(0) + } + c.Println(promptcol("______________________")) + }, + }) + + shell.AddCmd(&ishell.Cmd{ Name: "deletebill", Help: "<id> Delete a Bill with the following id", LongHelp: ` Usage: deletebill <id> |
