use SL::DB::Letter;
use SL::DB;
+__PACKAGE__->run_before('check_auth');
sub action_list_turnover {
my ($self) = @_;
my $cv = $::form->{id};
- my $query = <<SQL
+ my $query = <<SQL;
SELECT CONCAT(EXTRACT (MONTH FROM d.transdate),'/',EXTRACT (YEAR FROM d.transdate)) AS date_part,
count(d.id),
max(d.dunning_level)
$self->render('customer_vendor_turnover/letter_statistic', { layout => 0 }, letters => $letters);
}
+sub check_auth {
+ $::auth->assert('show_extra_record_tab_customer | show_extra_record_tab_vendor');
+}
+
1;
__END__