summaryrefslogtreecommitdiff
path: root/interact.go
diff options
context:
space:
mode:
Diffstat (limited to 'interact.go')
-rw-r--r--interact.go32
1 files changed, 31 insertions, 1 deletions
diff --git a/interact.go b/interact.go
index 71e40a3..d849eca 100644
--- a/interact.go
+++ b/interact.go
@@ -699,7 +699,7 @@ func interact(fulldb bool) {
showcmd.AddCmd(&ishell.Cmd{
Name: "project",
Help: "<id> - Show details of the project with given id.",
- LongHelp: ` Usage: show invoice <id>
+ LongHelp: ` Usage: show project <id>
Show detailed information of Project with given id. If no <id> is specified a selection screen is shown.`,
Func: func(c *ishell.Context) {
arg := "none"
@@ -724,6 +724,36 @@ func interact(fulldb bool) {
c.Println(promptcol("______________________"))
},
})
+ showcmd.AddCmd(&ishell.Cmd{
+ Name: "payment",
+ Help: "<id> - Show details of the payment with given id.",
+ LongHelp: ` Usage: show invoice <id>
+ Show detailed information of payment with given id. If no <id> is specified a selection screen is shown.`,
+ 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 {
+ ShowPayment(argi)
+ //fmt.Println("COMING SOON")
+ //ShowProjectStatus(argi)
+ //allProjects()
+ //stdOut()
+ } else {
+ c.Println(boldRed(arg, "is not a valid id!"))
+ }
+ } else {
+ //pids := GetProjectIds()
+ selids, lids := GetPaymentList()
+ choice := c.MultiChoice(lids, "Select a Payment to Show")
+ if choice > -1 {
+ ShowPayment(selids[choice])
+ }
+ }
+ c.Println(promptcol("______________________"))
+ },
+ })
shell.AddCmd(showcmd)
}
/*