updated git ignore and commented out currently redundant code
This commit is contained in:
parent
a6b818cf89
commit
1eb151d827
2 changed files with 30 additions and 25 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,6 +7,7 @@ hypnotoad.pid
|
||||||
*~
|
*~
|
||||||
/images
|
/images
|
||||||
*.swp
|
*.swp
|
||||||
|
/upload
|
||||||
|
|
||||||
cover_db/
|
cover_db/
|
||||||
schema.png
|
schema.png
|
||||||
|
|
|
@ -335,31 +335,35 @@ sub post_organisation {
|
||||||
$data->{categories}->{$day} = [ sort { $b->{value} <=> $a->{value} } @days ];
|
$data->{categories}->{$day} = [ sort { $b->{value} <=> $a->{value} } @days ];
|
||||||
}
|
}
|
||||||
|
|
||||||
my $start_year_monthly = DateTime->now->truncate( to => 'year' );
|
# my $start_year_monthly = DateTime->now->truncate( to => 'year' );
|
||||||
my $current_year_monthly = DateTime->now->add( months => 1, end_of_month => 'limit' );
|
# my $current_year_monthly = DateTime->now->add( months => 1, end_of_month => 'limit' );
|
||||||
my $monthly_sector_transactions_rs = $c->schema->resultset('ViewQuantisedTransaction' . $driver)->search(
|
# my $monthly_sector_transactions_rs = $c->schema->resultset('ViewQuantisedTransaction' . $driver)->search(
|
||||||
{
|
# {
|
||||||
purchase_time => {
|
# purchase_time => {
|
||||||
-between => [
|
# -between => [
|
||||||
$dtf->format_datetime($start_year_monthly),
|
# $dtf->format_datetime($start_year_monthly),
|
||||||
$dtf->format_datetime($current_year_monthly),
|
# $dtf->format_datetime($current_year_monthly),
|
||||||
],
|
# ],
|
||||||
},
|
# },
|
||||||
buyer_id => $entity->id,
|
# buyer_id => $entity->id,
|
||||||
},
|
# },
|
||||||
{
|
# {
|
||||||
columns => [
|
# columns => [
|
||||||
{
|
# {
|
||||||
quantised => 'quantised_months',
|
# quantised => 'quantised_months',
|
||||||
value => { sum => 'value' },
|
# value => { sum => 'value' },
|
||||||
sector => 'sector',
|
# },
|
||||||
},
|
# ],
|
||||||
],
|
# group_by => [ qw/ quantised_months / ],
|
||||||
group_by => [ qw/ quantised_months sector / ],
|
# }
|
||||||
}
|
# );
|
||||||
);
|
#
|
||||||
|
# for my $sector_transaction ( $monthly_sector_transactions_rs->all ) {
|
||||||
|
# my $quantised = $c->db_datetime_parser->parse_datetime($cat_trans->get_column('quantised'));
|
||||||
|
# my $months = $c->format_iso_date( $quantised ) || 0;
|
||||||
|
# my $category = $cat_trans->get_column('category_id') || 0;
|
||||||
|
# my $value = ($cat_trans->get_column('value') || 0) / 100000;
|
||||||
|
# }
|
||||||
|
|
||||||
return $c->render( json => {
|
return $c->render( json => {
|
||||||
success => Mojo::JSON->true,
|
success => Mojo::JSON->true,
|
||||||
|
|
Reference in a new issue