%# /templates/receipts/index.html.ep %> % layout 'default'; % title icon('receipts') . ' Receipts'; <% my $get_store_icon = sub { my $name = shift; return undef unless $name; my $slug = lc($name); $slug =~ s/[^a-z0-9]/-/g; $slug =~ s/-+/-/g; for my $ext (qw(png jpg jpeg gif svg)) { my $path = "public/images/shops/$slug.$ext"; return "/images/shops/$slug.$ext" if -e $path; } return undef; }; %> % content_for 'head' => begin % end
| Preview | Filename | Store | Date | Total | Uploaded By | Actions |
|---|---|---|---|---|---|---|
|
% if ($r->{mime_type} =~ /^image/) {
|
<%= $r->{original_filename} %> |
% if ($r->{description}) {
<%= $r->{description} %> % } | <%= $r->{formatted_date} || '-' %> | $<%= sprintf("%.2f", $r->{total_amount} // 0) %> | <%= $r->{uploaded_by} %> | |
| ð No receipts found. Upload one to get started. | ||||||