diff options
author | Ivan Kohler <ivan@freeside.biz> | 2018-01-10 22:46:31 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2018-01-10 22:46:31 -0800 |
commit | 77daf007ef522ae71041d9b094643cf868d8ecce (patch) | |
tree | 3849fd8c41fc7fcd08567fab7ec90ae533808b0a /FS | |
parent | dd43be3233e0411109342c691a47d1b6d6747015 (diff) | |
parent | 5136b6e7f17e6d86911f7feb520dd5b4248532bb (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Conf.pm | 7 | ||||
-rw-r--r-- | FS/FS/Template_Mixin.pm | 23 | ||||
-rw-r--r-- | FS/FS/cust_bill.pm | 9 |
3 files changed, 20 insertions, 19 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 59f9b69fc..9b891879b 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2753,13 +2753,6 @@ and customer address. Include units.', }, { - 'key' => 'manual_process-single_invoice_amount', - 'section' => 'payments', - 'description' => 'When entering manual credit card and ACH payments, amount will not autofill if the customer has more than one open invoice', - 'type' => 'checkbox', - }, - - { 'key' => 'manual_process-pkgpart', 'section' => 'payments', 'description' => 'Package to add to each manual credit card and ACH payment entered by employees from the backend. WARNING: Although recently permitted to US merchants in general, specific consumer protection laws may prohibit or restrict this practice in California, Colorado, Connecticut, Florda, Kansas, Maine, Massachusetts, New York, Oklahome, and Texas. Surcharging is also generally prohibited in most countries outside the US, AU and UK.', diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 7d92d21af..b9f3e9274 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -1955,6 +1955,23 @@ sub due_date2str { $self->due_date ? $self->time2str_local(shift, $self->due_date) : ''; } +=item invoice_pay_by_msg + + displays the invoice_pay_by_msg or default Please pay by [_1] if empty. + +=cut + +sub invoice_pay_by_msg { + my $self = shift; + my $msg = ''; + my $please_pay_by = + $self->conf->config('invoice_pay_by_msg', $self->agentnum) + || 'Please pay by [_1]'; + $msg .= ' - ' . $self->mt($please_pay_by, $self->due_date2str('short')) . ' '; + + $msg; +} + =item balance_due_msg =cut @@ -1969,11 +1986,7 @@ sub balance_due_msg { # _items_total) and not here # (yes, or if invoice_sections is enabled; this is just for compatibility) if ( $self->due_date ) { - my $please_pay_by = - $self->conf->config('invoice_pay_by_msg', $self->agentnum) - || 'Please pay by [_1]'; - $msg .= ' - ' . $self->mt($please_pay_by, $self->due_date2str('short')). - ' ' + $msg .= $self->invoice_pay_by_msg unless $self->conf->config_bool('invoice_omit_due_date',$self->agentnum); } elsif ( $self->terms ) { $msg .= ' - '. $self->mt($self->terms); diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 5ae4f3686..8b94dcc87 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -3450,17 +3450,12 @@ sub _items_total { $total_descr = $self->mt('Total Charges'); } - if ( $conf->exists('invoice_show_prior_due_date') ) { + if ( $conf->exists('invoice_show_prior_due_date') && !$conf->exists('invoice_omit_due_date') ) { # then the due date should be shown with Total New Charges, # and should NOT be shown with the Balance Due message. if ( $self->due_date ) { - $total_descr = join(' ', - $total_descr, - '-', - $self->mt('Please pay by'), - $self->due_date2str('short') - ); + $total_descr .= $self->invoice_pay_by_msg; } elsif ( $self->terms ) { $total_descr = join(' ', $total_descr, |