Skip to content

Commit

Permalink
Adding PL and KSeF with QR. Also party labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed May 16, 2024
1 parent 60d917b commit bd35b3c
Show file tree
Hide file tree
Showing 34 changed files with 818 additions and 437 deletions.
6 changes: 5 additions & 1 deletion components/bill/invoice/customer.templ
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import (
templ customer(inv *bill.Invoice) {
<section class="customer">
<h2>
@t.T("billing.invoice.customer.title")
if inv.Customer != nil && inv.Customer.Label != "" {
{ inv.Customer.Label }
} else {
@t.T("billing.invoice.customer.title")
}
</h2>
@org.Party(inv.Customer)
</section>
Expand Down
24 changes: 18 additions & 6 deletions components/bill/invoice/customer_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions components/bill/invoice/invoice.templ
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/invopop/gobl.html/components/regimes/co"
"github.com/invopop/gobl.html/components/regimes/mx"
"github.com/invopop/gobl.html/internal"
"github.com/invopop/gobl.html/components/regimes/pl"
)

// Invoice renders a complete GOBL bill.Invoice object.
Expand Down Expand Up @@ -42,6 +43,7 @@ templ Invoice(env *gobl.Envelope, inv *bill.Invoice) {
@es.TicketBAIQR(env)
@co.DIANQR(env, inv)
@mx.CFDI(env, inv)
@pl.KSeFQR(env)
</div>
</article>
}
Expand Down
43 changes: 24 additions & 19 deletions components/bill/invoice/invoice_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bd35b3c

Please sign in to comment.