an updated and hopefully faster version of the ST Toolbox
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
942 B

{{define "invoice_search_results"}}
{{if .Error}}
<div class="not-found">
{{.ErrorMsg}}
<p>Search term: "{{.SearchTerm}}"</p>
</div>
{{else if .NotFound}}
<div class="not-found">
{{.ErrorMsg}}
<p>Search term: "{{.SearchTerm}}"</p>
</div>
{{else if .MultipleInvoices}}
<div class="multiple-invoices">
<h3>Multiple Invoices Found</h3>
<div class="invoice-summary">
<p>Found <strong>{{.TotalFound}}</strong> of {{.TotalSearched}} invoices for: "{{.SearchTerm}}"</p>
{{if gt .FailedCount 0}}
<p class="error-text">Failed to find {{.FailedCount}} invoices: {{range $i, $id := .FailedIDs}}{{if $i}},
{{end}}{{$id}}{{end}}</p>
{{end}}
</div>
{{range .Invoices}}
{{template "invoice_card" .}}
{{end}}
</div>
{{else if .invoiceNumber}}
<div class="multiple-invoices">
<h3>Invoice Details</h3>
{{template "invoice_card" .}}
</div>
{{else}}
<p>Unexpected response. Please try again.</p>
{{end}}
{{end}}