feat(invoice): add send route
This commit is contained in:
31
pkg/invoice/report/resource.go
Normal file
31
pkg/invoice/report/resource.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package report
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.schreifuchs.ch/lou-taylor/accounting/pkg/invoice/issue"
|
||||
"git.schreifuchs.ch/lou-taylor/accounting/pkg/invoice/model"
|
||||
"git.schreifuchs.ch/lou-taylor/accounting/pkg/invoice/report/qrbill"
|
||||
)
|
||||
|
||||
type Report struct {
|
||||
Date time.Time
|
||||
Issues []issue.Issue
|
||||
Invoice qrbill.Invoice
|
||||
Rate float64
|
||||
Company model.Entity
|
||||
Client model.Entity
|
||||
}
|
||||
|
||||
func New(issues []issue.Issue, company, client model.Entity, rate float64) *Report {
|
||||
r := &Report{
|
||||
Date: time.Now(),
|
||||
Issues: issues,
|
||||
Rate: rate,
|
||||
Company: company,
|
||||
Client: client,
|
||||
}
|
||||
// r.Invoice = qrbill.New(r.applyRate(r.Total()), r.Company, &r.Client)
|
||||
|
||||
return r
|
||||
}
|
||||
Reference in New Issue
Block a user