From 8ddf2ae7b5e02463c87599186f0279b86ddaeaac Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 4 Dec 2018 14:30:07 -0500 Subject: RT# 81822 - Added new config for remittance coupon location, updated invoice_latex and invoice_latexcoupon to use new config --- FS/FS/Conf.pm | 12 ++++++++++++ FS/FS/Template_Mixin.pm | 1 + 2 files changed, 13 insertions(+) (limited to 'FS') diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 5a744510d..393f068e9 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1479,6 +1479,18 @@ and customer address. Include units.', 'per_agent' => 1, }, + { + 'key' => 'invoice_latexcouponlocation', + 'section' => 'invoicing', + 'description' => 'Location of the remittance coupon.Either top or bottom of page, defaults to bottom.', + 'type' => 'select', + 'select_hash' => [ + 'bottom' => 'Bottom of page (default)', + 'top' => 'Top of page', + ], + 'per_agent' => 1, + }, + { 'key' => 'invoice_latexsmallfooter', 'section' => 'invoice_templates', diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 675dcfacb..c6a9b9fd2 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -597,6 +597,7 @@ sub print_generic { 'amountenclosedsep' => scalar($conf->config('invoice_latexcouponamountenclosedsep', $agentnum)), 'coupontoaddresssep' => scalar($conf->config('invoice_latexcoupontoaddresssep', $agentnum)), 'addcompanytoaddress' => $conf->exists('invoice_latexcouponaddcompanytoaddress', $agentnum), + 'couponlocation' => (scalar($conf->config('invoice_latexcouponlocation', $agentnum)) eq "top") ? 'top' : 'bottom', # better hang on to conf_dir for a while (for old templates) 'conf_dir' => "$FS::UID::conf_dir/conf.$FS::UID::datasrc", -- cgit v1.2.1