X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=ea2785bdf0793abc8ebf1656c3929f5cd327b23b;hp=8ca2c1ba26b95a1b422855cdd85884f75d6bc991;hb=df185d34f354c5788e8c4693182b7689a3333839;hpb=beba6672fb9c9c5769c81f8029bb88cd2bc910e9
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 8ca2c1ba2..ea2785bdf 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -95,6 +95,21 @@ sub config {
}
}
+=item config_binary KEY
+
+Returns the exact scalar value for key.
+
+=cut
+
+sub config_binary {
+ my($self,$file)=@_;
+ my($dir)=$self->dir;
+ my $fh = new IO::File "<$dir/$file" or return;
+ local $/;
+ my $content = <$fh>;
+ $content;
+}
+
=item exists KEY
Returns true if the specified key exists, even if the corresponding value
@@ -209,6 +224,31 @@ sub config_items {
new FS::ConfItem {
'key' => $basename,
'section' => 'billing',
+ 'description' => 'Alternate HTML template for invoices. See the billing documentation for details.',
+ 'type' => 'textarea',
+ }
+ } glob($self->dir. '/invoice_html_*')
+ ),
+ ( map {
+ my $basename = basename($_);
+ $basename =~ /^(.*)$/;
+ $basename = $1;
+ ($latexname = $basename ) =~ s/latex/html/;
+ new FS::ConfItem {
+ 'key' => $basename,
+ 'section' => 'billing',
+ 'description' => "Alternate Notes section for HTML invoices. Defaults to the same data in $latexname if not specified.",
+ 'type' => 'textarea',
+ }
+ } glob($self->dir. '/invoice_htmlnotes_*')
+ ),
+ ( map {
+ my $basename = basename($_);
+ $basename =~ /^(.*)$/;
+ $basename = $1;
+ new FS::ConfItem {
+ 'key' => $basename,
+ 'section' => 'billing',
'description' => 'Alternate LaTeX template for invoices. See the billing documentation for details.',
'type' => 'textarea',
}
@@ -540,9 +580,38 @@ httemplate/docs/config.html
},
{
+ 'key' => 'invoice_html',
+ 'section' => 'billing',
+ 'description' => 'Optional HTML template for invoices. See the billing documentation for details.',
+
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_htmlnotes',
+ 'section' => 'billing',
+ 'description' => 'Notes section for HTML invoices. Defaults to the same data in invoice_latexnotes if not specified.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_htmlfooter',
+ 'section' => 'billing',
+ 'description' => 'Footer for HTML invoices. Defaults to the same data in invoice_latexfooter if not specified.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_htmlreturnaddress',
+ 'section' => 'billing',
+ 'description' => 'Return address for HTML invoices. Defaults to the same data in invoice_latexreturnaddress if not specified.',
+ 'type' => 'textarea',
+ },
+
+ {
'key' => 'invoice_latex',
'section' => 'billing',
- 'description' => 'Optional LaTeX template for typeset PostScript invoices.',
+ 'description' => 'Optional LaTeX template for typeset PostScript invoices. See the billing documentation for details.',
'type' => 'textarea',
},
@@ -561,6 +630,13 @@ httemplate/docs/config.html
},
{
+ 'key' => 'invoice_latexreturnaddress',
+ 'section' => 'billing',
+ 'description' => 'Return address for LaTeX typeset PostScript invoices.',
+ 'type' => 'textarea',
+ },
+
+ {
'key' => 'invoice_latexsmallfooter',
'section' => 'billing',
'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',