1 <& /elements/header.html, mt($title, @title_arg) &>
3 <FORM ACTION="quotation.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="_date">
5 <INPUT TYPE="hidden" NAME="prospectnum" VALUE="<% $prospectnum %>">
6 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
8 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
10 % unless ( $custnum ) {
11 <& /elements/tr-select-agent.html,
12 'curr_value' => scalar( $cgi->param('agentnum') ),
13 'label' => emt('Quotations for agent: '),
18 <& /elements/tr-input-beginning_ending.html &>
20 <& /elements/tr-input-lessthan_greaterthan.html,
21 label => emt('Setup'),
22 field => 'total_setup',
25 <& /elements/tr-input-lessthan_greaterthan.html,
26 label => emt('Recurring'),
27 field => 'total_recur',
33 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
37 <& /elements/footer.html &>
41 unless $FS::CurrentUser::CurrentUser->access_right('List quotations');
43 my $conf = new FS::Conf;
45 my $title = 'Quotation Report';
46 #false laziness w/report_cust_pkg.html
50 my $prospect_main = '';
51 if ( $cgi->param('prospectnum') =~ /^(\d+)$/ ) {
53 $prospect_main = qsearchs({
54 'table' => 'prospect_main',
55 'hashref' => { 'prospectnum' => $prospectnum },
56 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
57 }) or die "unknown prospectnum $prospectnum";
59 push @title_arg, $prospect_main->name;
64 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
66 $cust_main = qsearchs({
67 'table' => 'cust_main',
68 'hashref' => { 'custnum' => $custnum },
69 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
70 }) or die "unknown custnum $custnum";
72 push @title_arg, $cust_main->name;