projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 76093 - added ability for processing fee to be used with batch processing. V3...
[freeside.git]
/
FS
/
FS
/
Template_Mixin.pm
diff --git
a/FS/FS/Template_Mixin.pm
b/FS/FS/Template_Mixin.pm
index
39495f7
..
1499993
100644
(file)
--- a/
FS/FS/Template_Mixin.pm
+++ b/
FS/FS/Template_Mixin.pm
@@
-2246,13
+2246,12
@@
sub generate_email {
if (!@text) {
if (!@text) {
- if ( $conf->
config
($tc.'template') ) {
+ if ( $conf->
exists
($tc.'template') ) {
warn "$me generating plain text invoice"
if $DEBUG;
warn "$me generating plain text invoice"
if $DEBUG;
- # 'print_text' argument is no longer used
- @text = map Encode::encode_utf8($_), $self->print_text(\%args);
+ @text = $self->print_text(\%args);
} else {
} else {
@@
-2268,7
+2267,11
@@
sub generate_email {
'Encoding' => 'quoted-printable',
'Charset' => 'UTF-8',
#'Encoding' => '7bit',
'Encoding' => 'quoted-printable',
'Charset' => 'UTF-8',
#'Encoding' => '7bit',
- 'Data' => \@text,
+ 'Data' => [
+ map
+ { Encode::encode('UTF-8', $_, Encode::FB_WARN | Encode::LEAVE_SRC ) }
+ @text
+ ],
'Disposition' => 'inline',
);
'Disposition' => 'inline',
);
@@
-2347,7
+2350,11
@@
sub generate_email {
' </title>',
' </head>',
' <body bgcolor="#e8e8e8">',
' </title>',
' </head>',
' <body bgcolor="#e8e8e8">',
- Encode::encode_utf8($html),
+ Encode::encode(
+ 'UTF-8',
+ $html,
+ Encode::FB_WARN | Encode::LEAVE_SRC
+ ),
' </body>',
'</html>',
],
' </body>',
'</html>',
],
@@
-2479,7
+2486,7
@@
use CAM::PDF;
use IO::Socket::SSL;
use LWP::UserAgent;
use HTTP::Request::Common qw( POST );
use IO::Socket::SSL;
use LWP::UserAgent;
use HTTP::Request::Common qw( POST );
-use JSON::XS;
+use
Cpanel::
JSON::XS;
use MIME::Base64;
sub postal_mail_fsinc {
my ( $self, %opt ) = @_;
use MIME::Base64;
sub postal_mail_fsinc {
my ( $self, %opt ) = @_;
@@
-3112,9
+3119,9
@@
sub _items_fee {
my @cust_bill_pkg = grep { $_->feepart } $self->cust_bill_pkg;
my $escape_function = $options{escape_function};
my @cust_bill_pkg = grep { $_->feepart } $self->cust_bill_pkg;
my $escape_function = $options{escape_function};
- my $locale = $self->
quotationnum
- ? $self->
prospec
t_main->locale
- : $self->
cus
t_main->locale;
+ my $locale = $self->
cust_main
+ ? $self->
cus
t_main->locale
+ : $self->
prospec
t_main->locale;
my @items;
foreach my $cust_bill_pkg (@cust_bill_pkg) {
my @items;
foreach my $cust_bill_pkg (@cust_bill_pkg) {