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 <FONT CLASS="fsinnerbox-title"><% emt('Search options') %></FONT>
9 <TABLE CLASS="fsinnerbox">
11 % unless ( $custnum ) {
12 <& /elements/tr-select-agent.html,
13 'curr_value' => scalar( $cgi->param('agentnum') ),
14 'label' => emt('Quotations for agent: '),
19 <& /elements/tr-input-beginning_ending.html &>
21 <& /elements/tr-input-lessthan_greaterthan.html,
22 label => emt('Setup'),
23 field => 'total_setup',
26 <& /elements/tr-input-lessthan_greaterthan.html,
27 label => emt('Recurring'),
28 field => 'total_recur',
34 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
38 <& /elements/footer.html &>
42 unless $FS::CurrentUser::CurrentUser->access_right('List quotations');
44 my $conf = new FS::Conf;
46 my $title = 'Quotation Report';
47 #false laziness w/report_cust_pkg.html
51 my $prospect_main = '';
52 if ( $cgi->param('prospectnum') =~ /^(\d+)$/ ) {
54 $prospect_main = qsearchs({
55 'table' => 'prospect_main',
56 'hashref' => { 'prospectnum' => $prospectnum },
57 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
58 }) or die "unknown prospectnum $prospectnum";
60 push @title_arg, $prospect_main->name;
65 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
67 $cust_main = qsearchs({
68 'table' => 'cust_main',
69 'hashref' => { 'custnum' => $custnum },
70 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
71 }) or die "unknown custnum $custnum";
73 push @title_arg, $cust_main->name;