<% use Mojo::JSON qw/decode_json encode_json/; my $invoices = &subs::db_query('select * from appointments where type=? and app = ? order by timestamp', 'invoice', $a)->hashes; @{$invoices} = grep { $_->{'status'} ne 'completed' } @{$invoices}; my $informations = $invoices; foreach my $i ( @{$informations} ) { $i->{'data'} = eval { return decode_json $i->{'data'} } || {}; } %> {$a}->{'setting'}->{'record_vendor'} eq 'on') { %>checked<% } %>>
{$a}->{'setting'}->{'record_manufacturer'} eq 'on') { %>checked<% } %>>
<% if (scalar @{$appts->{$a}->{'model'}} == 0) { %> <% if ($appts->{$a}->{'models'} != undef) { %> <% } %> <% } else { %> <% } %> {$a}->{'setting'}->{'record_input'} eq 'on') { %>checked<% } %>>
<% if (scalar @{$appts->{$a}->{'model'}} == 0) { %> <% if ($appts->{$a}->{'models'} != undef) { %> <% } %> <% } else { %> <%= include 'apps/transaction/models', settings => $appts->{$a}->{'setting'}, models => $appts->{$a}->{'model'}, l => $appts->{$a}->{'list'}->[0], source => 'transaction' %>
<% } %>