X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fquotation.pm;h=38e73188958400e76156471a0ad10d32a77c0f39;hb=167dbdad01e2c1b62fd9be43cc05212e8c874a02;hp=774495a978fb6821da4623e6b858a6c835a5e449;hpb=f13c9d8580d02851b150e21ea9beb6fc1dfbd3c8;p=freeside.git diff --git a/FS/FS/quotation.pm b/FS/FS/quotation.pm index 774495a97..38e731889 100644 --- a/FS/FS/quotation.pm +++ b/FS/FS/quotation.pm @@ -183,10 +183,7 @@ sub email { # this is where we set the From: address $from ||= $conf->config('quotation_from', $self->cust_or_prospect->agentnum ) - || ($conf->config('invoice_from_name', $self->cust_or_prospect->agentnum ) ? - $conf->config('invoice_from_name', $self->cust_or_prospect->agentnum ) . ' <' . - $conf->config('invoice_from', $self->cust_or_prospect->agentnum ) . '>' : - $conf->config('invoice_from', $self->cust_or_prospect->agentnum )); + || $conf->invoice_from_full( $self->cust_or_prospect->agentnum ); $self->SUPER::email( { 'from' => $from, %$opt, @@ -634,6 +631,27 @@ sub search_sql_where { } +=item _items_pkg + +Return line item hashes for each package on this quotation. Differs from the +base L version in that it recalculates each quoted package +first, and doesn't implement the "condensed" option. + +=cut + +sub _items_pkg { + my ($self, %options) = @_; + my @quotation_pkg = $self->quotation_pkg; + foreach (@quotation_pkg) { + my $error = $_->estimate; + die "error calculating estimate for pkgpart " . $_->pkgpart.": $error\n" + if $error; + } + + # run it through the Template_Mixin engine + return $self->_items_cust_bill_pkg(\@quotation_pkg, %options); +} + =back =head1 BUGS