This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.schreifuchs.ch/lou-taylor/accounting/internal/email"
|
||||
"git.schreifuchs.ch/lou-taylor/accounting/pkg/invoice"
|
||||
)
|
||||
|
||||
type createFlags struct {
|
||||
@@ -30,7 +31,10 @@ func create(arguments []string, c any) {
|
||||
fmt.Printf("could not get repos: %v", err)
|
||||
return
|
||||
}
|
||||
invoice, report, err := invoicer.Generate(req.Creditor, req.Debtor, time.Duration(req.DurationThreshold), req.HourlyRate, repos)
|
||||
|
||||
opts := invoice.DefaultOptions
|
||||
opts.Mindur = time.Duration(req.DurationThreshold)
|
||||
invoice, report, err := invoicer.Generate(req.Creditor, req.Debtor, req.HourlyRate, repos, &opts)
|
||||
if err != nil {
|
||||
log.Error(fmt.Sprintf("Error while creating invoice: %v", err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user