package FS::Template_Mixin; use strict; use vars qw( $DEBUG $me $money_char $date_format $rdate_format $date_format_long ); # but NOT $conf use vars qw( $invoice_lines @buf ); #yuck use List::Util qw(sum); use Date::Format; use Date::Language; use Text::Template 1.20; use File::Temp 0.14; use HTML::Entities; use Locale::Country; use Cwd; use FS::UID; use FS::Record qw( qsearch qsearchs ); use FS::Misc qw( generate_ps generate_pdf ); use FS::pkg_category; use FS::pkg_class; use FS::L10N; $DEBUG = 0; $me = '[FS::Template_Mixin]'; FS::UID->install_callback( sub { my $conf = new FS::Conf; #global $money_char = $conf->config('money_char') || '$'; $date_format = $conf->config('date_format') || '%x'; #/YY $rdate_format = $conf->config('date_format') || '%m/%d/%Y'; #/YYYY $date_format_long = $conf->config('date_format_long') || '%b %o, %Y'; } ); =item print_text HASHREF | [ TIME [ , TEMPLATE [ , OPTION => VALUE ... ] ] ] Returns an text invoice, as a list of lines. Options can be passed as a hashref (recommended) or as a list of time, template and then any key/value pairs for any other options. I