Add the payments section
This actually should be the “payments and receivables” section, however
this is quite a mouthful; a “receivable” is a payment made **to** you,
therefore “payments” is ok.
In fact, there is still no receivables in there, as they should be in
a separate relation, to constraint them to invoices instead of expenses.
It will be done in a separate commit.
Since this section will be, in a sense, sort of simplified accounting,
i needed to introduce the “payment account” concept. There is no way,
yet, for users to add them, because i have to revamp the “tax details”
section, but this commit started to grow too big already.
The same reasoning for the attachment payment slips as PDF to payment:
something i have to add, but not yet in this commit.
2024-08-10 02:34:07 +00:00
|
|
|
{{ define "title" -}}
|
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.PaymentAccountIndexPage*/ -}}
|
|
|
|
{{( pgettext "Payment Accounts" "title" )}}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ define "breadcrumbs" -}}
|
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.PaymentAccountIndexPage*/ -}}
|
Remove almost all data-hx-boost attributes
Since 16e80b5ae, <body> no longer has overflow, thus no scroll. As a
consequence, htmx no longer is able to scroll up <main> when it changes
due to the default, implicit `show:true` applied to the request: is
calls <main>’s scrollIntoView, however there is nothing to scroll to.
I probably could fix it by changing the target of `show`, or even add
a `scroll` directive to all boosted links, but at this point i think it
is better no not boost links at all, as they do what i want—show the new
page from the top—with less markup, plus the browser now show a loading
animation, and it is not that slower, too.
2024-09-07 23:29:30 +00:00
|
|
|
<nav>
|
|
|
|
<p>
|
Add the payments section
This actually should be the “payments and receivables” section, however
this is quite a mouthful; a “receivable” is a payment made **to** you,
therefore “payments” is ok.
In fact, there is still no receivables in there, as they should be in
a separate relation, to constraint them to invoices instead of expenses.
It will be done in a separate commit.
Since this section will be, in a sense, sort of simplified accounting,
i needed to introduce the “payment account” concept. There is no way,
yet, for users to add them, because i have to revamp the “tax details”
section, but this commit started to grow too big already.
The same reasoning for the attachment payment slips as PDF to payment:
something i have to add, but not yet in this commit.
2024-08-10 02:34:07 +00:00
|
|
|
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
|
|
|
|
<a>{{( pgettext "Payment Accounts" "title" )}}</a>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<a class="primary button"
|
|
|
|
href="{{ companyURI "/payment-accounts/new" }}">{{( pgettext "New payment account" "action" )}}</a>
|
|
|
|
</nav>
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ define "content" }}
|
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.PaymentAccountIndexPage*/ -}}
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>{{( pgettext "Name" "title" )}}</th>
|
|
|
|
<th>{{( pgettext "Type" "title" )}}</th>
|
|
|
|
<th>{{( pgettext "Number" "title" )}}</th>
|
|
|
|
<th>{{( pgettext "Expiration Date" "title" )}}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{ with .Accounts }}
|
|
|
|
{{- range . }}
|
|
|
|
<tr>
|
|
|
|
<td><a href="{{ companyURI "/payment-accounts/" }}{{ .Slug }}">{{ .Name }}</a></td>
|
|
|
|
<td>{{ .TypeLabel }}</td>
|
|
|
|
<td>
|
|
|
|
{{- if eq .Type "bank" -}}
|
|
|
|
{{ .IBAN }}
|
|
|
|
{{- else if eq .Type "card" -}}
|
|
|
|
•••• •••• •••• {{ .LastFourDigits }}
|
|
|
|
{{- end -}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ .ExpirationDate }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{- end }}
|
|
|
|
{{ else }}
|
|
|
|
<tr>
|
|
|
|
<td colspan="3">{{( gettext "No payment accounts added yet." )}}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{- end }}
|