fixed to admin interface categories & stats
This commit is contained in:
parent
1730592afb
commit
e524f1d421
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ sub create {
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
|
|
||||||
my $validation = $c->validation;
|
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');
|
my $category_name = $validation->param('category');
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ sub post_customer {
|
||||||
|
|
||||||
my @all_weeks = $week_transaction_rs->all;
|
my @all_weeks = $week_transaction_rs->all;
|
||||||
my $first = $all_weeks[0]->get_column('count') || 0;
|
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 $max = max( map { $_->get_column('count') } @all_weeks );
|
||||||
my $sum = sum( map { $_->get_column('count') } @all_weeks );
|
my $sum = sum( map { $_->get_column('count') } @all_weeks );
|
||||||
my $count = $week_transaction_rs->count;
|
my $count = $week_transaction_rs->count;
|
||||||
|
|
Reference in a new issue