105 lines
4.1 KiB
Plaintext
105 lines
4.1 KiB
Plaintext
{{ define "title" -}}
|
|
{{( pgettext "Tax Details" "title" )}}
|
|
{{- end }}
|
|
|
|
{{ define "content" }}
|
|
<nav>
|
|
<p>
|
|
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
|
|
<a>{{( pgettext "Tax Details" "title" )}}</a>
|
|
</p>
|
|
</nav>
|
|
<section class="dialog-content">
|
|
<h2>{{(pgettext "Tax Details" "title")}}</h2>
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.TaxDetailsPage*/ -}}
|
|
{{ with .DetailsForm }}
|
|
<form id="details" method="POST">
|
|
{{ csrfToken }}
|
|
{{ template "input-field" .BusinessName }}
|
|
{{ template "input-field" .VATIN }}
|
|
{{ template "input-field" .TradeName }}
|
|
{{ template "input-field" .Phone }}
|
|
{{ template "input-field" .Email }}
|
|
{{ template "input-field" .Web }}
|
|
{{ template "input-field" .Address | addInputAttr `class="width-2x"` }}
|
|
{{ template "input-field" .City }}
|
|
{{ template "input-field" .Province }}
|
|
{{ template "input-field" .PostalCode }}
|
|
{{ template "select-field" .Country | addSelectAttr `class="width-fixed"` }}
|
|
|
|
<fieldset>
|
|
<legend id="currency-legend">{{( pgettext "Currency" "title" )}}</legend>
|
|
|
|
{{ template "select-field" .Currency }}
|
|
</fieldset>
|
|
</form>
|
|
{{ end }}
|
|
|
|
<form id="newtax" method="POST" action="{{ companyURI "/tax" }}">
|
|
{{ csrfToken }}
|
|
</form>
|
|
|
|
<fieldset>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th width="50%"></th>
|
|
<th>{{( pgettext "Tax Name" "title" )}}</th>
|
|
<th>{{( pgettext "Rate (%)" "title" )}}</th>
|
|
<th>{{( pgettext "Class" "title" )}}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ with .Taxes }}
|
|
{{- range $tax := . }}
|
|
<tr>
|
|
<td></td>
|
|
<td>{{ .Name }}</td>
|
|
<td>{{ .Rate }}</td>
|
|
<td>{{ .Class }}</td>
|
|
<td>
|
|
<form method="POST" action="{{ companyURI "/tax"}}/{{ .Id }}">
|
|
{{ csrfToken }}
|
|
{{ deleteMethod }}
|
|
<button class="icon" aria-label="{{( gettext "Delete tax" )}}" type="submit"><i
|
|
class="ri-delete-back-2-line"></i></button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{- end }}
|
|
{{ else }}
|
|
<tr>
|
|
<td colspan="4">{{( gettext "No taxes added yet." )}}</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th scope="row">{{( pgettext "New Line" "title")}}</th>
|
|
<td>
|
|
{{ template "input-field" .NewTaxForm.Name | addInputAttr `form="newtax"` }}
|
|
</td>
|
|
<td>
|
|
{{ template "input-field" .NewTaxForm.Rate | addInputAttr `form="newtax"` }}
|
|
</td>
|
|
<td>
|
|
{{ template "select-field" .NewTaxForm.Class | addSelectAttr `form="newtax"` }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"></td>
|
|
<td colspan="2">
|
|
<button form="newtax" type="submit">{{( pgettext "Add new tax" "action" )}}</button>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<button form="details" type="submit">{{( pgettext "Save changes" "action" )}}</button>
|
|
</fieldset>
|
|
</section>
|
|
{{- end }}
|