From 81978af92ecdaaefeff5156d9ab3b4f99586df1c Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 3 Jul 2012 18:51:51 -0700 Subject: quotations, RT#16996 --- conf/quotation_html | 266 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 conf/quotation_html (limited to 'conf/quotation_html') diff --git a/conf/quotation_html b/conf/quotation_html new file mode 100644 index 000000000..1dfb94434 --- /dev/null +++ b/conf/quotation_html @@ -0,0 +1,266 @@ + + +
+ + + + + + + + + + + + <%= $ship_enable ? ('' + ) + : '' + %> + + + +
"><%= $returnaddress %> + + + + + + + + + + + + + +
+ <%= emt('Quotation date') %>
+ <%= $date %> +
+ + <%= emt('Quotation #') %>
+ <%= $quotationnum %> +
+ + <%= $custnum ? emt('Customer #') : $prospectnum ? emt('Prospect #') : '' %>
+ <%= $custnum || $prospectnum %> +
  + <%= substr(emt($notice_name),0,1) %><%= substr(emt($notice_name),1) %> +  
+
+ + <%= $name %>
+ <%= join('
', grep length($_), $company, + $address1, + $address2, + "$city, $state  $zip", + $country, + ) + %> +
'. + join('
',grep length($_), ''.emt('Service Address').'', + $ship_company, + $ship_address1, + $ship_address2, + "$ship_city, $ship_state $ship_zip", + $ship_country, + ' ', + ' ', + ). + '
+ <%= + if($barcode_cid) { + $OUT .= qq!
!; + } + elsif($barcode_img) { + $OUT .= qq!
!; + } + %> + <%= $terms ? emt('Terms') . ": $terms" : '' %>
+ <%= $po_line %> +
+ <%= $summary %> + <%= + my $notfirst = 0; + my $columncount = $unitprices ? 5 : 3; + foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) { + if ($section->{'pretotal'} && !$summary) { + $OUT .= '
' if $notfirst; + $OUT .= + ''; + } + unless ($section->{'summarized'}) { + $OUT .= '
'. + '

'. + uc(substr($section->{'pretotal'},0,1)). + ''. uc(substr($section->{'pretotal'},1)). + ''. + '

'. + '

' if ( $notfirst || $section->{'pretotal'} && !$summary ); + $OUT .= '
'; + my $sectionhead = $section->{'description'} || emt('Charges'); + $OUT .= + '

'. substr($sectionhead,0,1). + ''. substr($sectionhead,1). + ''. + '

'. + '

'; + + $OUT .= + ''. + ''; + + if ($section->{header_generator}) { + my $header = &{$section->{header_generator}}(); + $OUT .= $header; + $columncount = scalar(my @array = split /<\/th>'. + ( $unitprices + ? ''. + '' + : '' ). + ''; + } + $OUT .= ''; + + my $lastref = 0; + foreach my $line ( + grep { ( scalar(@sections) > 1 + ? $section->{'description'} eq $_->{'section'}->{'description'} + : 1 + ) } + @detail_items ) + { + $OUT .= + ''. + ''. + ''. + ( $unitprices + ? ''. + '' + : '' + ). + + ''; + } + $OUT .= ''; + $lastref = $line->{'ref'}; + if ( @{$line->{'ext_description'} } ) { + unless ( $section->{description_generator} ) { + $OUT .= '{'ext_description'} } ) { + $OUT .= + ''. + ( $section->{'description_generator'} ? '' : '' ). + ''. + '' + } + unless ( $section->{description_generator} ) { + $OUT .= '
'. + '' . emt('Description') . '' . emt('Unit Price') . '' . emt('Quantity') . '' . emt('Amount') . '
'. + ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ''. $line->{'description'}. ''. $line->{'unit_amount'}. ''. $line->{'quantity'}. ''. $line->{'amount'}. '
/i ? '' : 'colspan=99' ). '>'. + '  '. $ext_desc. + '
'; + } + $OUT .= ''; + } + } + + + if ($section->{'description'} || $multisection and !$section->{no_subtotal}) { + my $style = 'border-top: 3px solid #000000;'. + 'border-bottom: 3px solid #000000;'; + $OUT .= + ''. + qq( ); + if ($section->{total_generator}) { + $OUT .= &{$section->{total_generator}}($section); + } else { + $OUT .= qq(' : '>' ). + $section->{'description'}. ' ' . emt('Total') . ''. + qq(). + $section->{'subtotal'}. ''; + } + $OUT .= ''; + } + } + if ($section->{'posttotal'}) { + $OUT .= ''; + $OUT .= + '

'. $section->{'posttotal'}. + ''. + '

'; + $OUT .= ''; + } + + $notfirst++; + + } + + my $style = 'border-top: 3px solid #000000;'; + my $linenum = 0; + + foreach my $line ( @total_items ) { + + $style .= 'border-bottom: 3px solid #000000;' + if ++$linenum == scalar(@total_items) - ( $balance_due_below_line ? 1 : 0 ); + + $OUT .= + ''; + if ($section->{total_line_generator}) { + $OUT .= &{$section->{total_line_generator}}($line); + } else { + $OUT .= qq( ). + qq('. + $line->{'total_item'}. ''. + qq(). + $line->{'total_amount'}. ''; + } + $OUT .= ''; + + $style=''; + + } + + %> + +

+ +<%= length($summary) + ? '' + : ( $smallernotes + ? ''.$notes.'' + : $notes + ) +%> + +


+

><%= $footer %> + + -- cgit v1.2.1