1 <& /elements/header.html, mt('Quotation View'), $menubar &>
7 XXX resending quotations
9 % if ( $curuser->access_right('Resend invoices') ) {
11 <A HREF="<% $p %>misc/send-invoice.cgi?method=print;<% $link %>"><% mt('Re-print this invoice') |h %></A>
13 % if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) {
14 | <A HREF="<% $p %>misc/send-invoice.cgi?method=email;<% $link %>"><% mt('Re-email this invoice') |h %></A>
17 % if ( $conf->exists('hylafax') && length($cust_bill->cust_main->fax) ) {
18 | <A HREF="<% $p %>misc/send-invoice.cgi?method=fax;<% $link %>"><% mt('Re-fax this invoice') |h %></A>
27 % if ( $curuser->access_right('Order customer package') ) {
28 <& /elements/order_pkg_link.html,
29 'label' => emt('Add package'),
30 'actionlabel' => emt('Add package'),
31 map { $_ => $quotation->$_ } qw( quotationnum custnum prospectnum )
35 % if ( $conf->exists('quotation_latex') ) {
36 | <A HREF="<% $p %>view/quotation-pdf.cgi?<% $link %>"><% mt('View typeset quotation PDF') |h %></A>
40 % if ( $conf->exists('quotation_html') ) {
41 <% join('', $quotation->print_html() ) %>
43 % die "quotation_html config missing";
45 % #plaintext quotations? <PRE><% join('', $quotation->print_text() ) %></PRE>
47 <& /elements/footer.html &>
50 my $curuser = $FS::CurrentUser::CurrentUser;
53 # unless $curuser->access_right('View quotations');
56 my($query) = $cgi->keywords;
57 if ( $query =~ /^(\d+)$/ ) {
60 $quotationnum = $cgi->param('quotationnum');
63 my $conf = new FS::Conf;
65 my $quotation = qsearchs({
66 'select' => 'quotation.*',
67 'table' => 'quotation',
68 #'addl_from' => 'LEFT JOIN cust_main USING ( custnum )',
69 'hashref' => { 'quotationnum' => $quotationnum },
70 #'extra_sql' => ' AND '. $curuser->agentnums_sql,
72 die "Quotation #$quotationnum not found!" unless $quotation;
75 if ( my $custnum = $quotation->custnum ) {
76 my $display_custnum = $quotation->cust_main->display_custnum;
78 emt("View this customer (#[_1])",$display_custnum) => "${p}view/cust_main.cgi?$custnum",
80 } elsif ( my $prospectnum = $quotation->prospectnum ) {
82 emt("View this prospect (#[_1])",$prospectnum) => "${p}view/prospect_main.html?$prospectnum",
86 my $link = "quotationnum=$quotationnum";
87 #$link .= ';template='. uri_escape($template) if $template;
88 #$link .= ';notice_name='. $notice_name if $notice_name;