fixed to admin interface categories & stats

This commit is contained in:
Finn 2018-01-18 14:24:47 +00:00
parent 8c8da1f795
commit e64e4bcbc8
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ sub create {
my $c = shift;
my $validation = $c->validation;
$validation->required('category', 'trim')->like(qr/^[\w]*$/)->not_in_resultset('name', $c->result_set);
$validation->required('category', 'trim')->not_in_resultset('name', $c->result_set);
my $category_name = $validation->param('category');

View file

@ -93,7 +93,7 @@ sub post_customer {
my @all_weeks = $week_transaction_rs->all;
my $first = $all_weeks[0]->get_column('count') || 0;
my $second = $all_weeks[1]->get_column('count') || 0;
my $second = defined $all_weeks[1] ? $all_weeks[1]->get_column('count') || 0 : 0;
my $max = max( map { $_->get_column('count') } @all_weeks );
my $sum = sum( map { $_->get_column('count') } @all_weeks );
my $count = $week_transaction_rs->count;