projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
00fc1cd
)
option for no postal fee on one-time charges
author
jeff
<jeff>
Tue, 30 Sep 2008 20:22:38 +0000
(20:22 +0000)
committer
jeff
<jeff>
Tue, 30 Sep 2008 20:22:38 +0000
(20:22 +0000)
FS/FS/Conf.pm
patch
|
blob
|
history
FS/FS/cust_main.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
79e9feb
..
610d590
100644
(file)
--- a/
FS/FS/Conf.pm
+++ b/
FS/FS/Conf.pm
@@
-2012,6
+2012,13
@@
worry that config_items is freeside-specific and icky.
},
{
},
{
+ 'key' => 'postal_invoice-recurring_only',
+ 'section' => 'billing',
+ 'description' => 'The postal invoice fee is omitted on invoices without reucrring charges when this is set.',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'batch-enable',
'section' => 'billing',
'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.',
'key' => 'batch-enable',
'section' => 'billing',
'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.',
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
b348aaa
..
225854c
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-2147,7
+2147,12
@@
sub bill {
return "can't charge postal invoice fee for customer ".
$self->custnum. ": $postal_pkg";
}
return "can't charge postal invoice fee for customer ".
$self->custnum. ": $postal_pkg";
}
- if ( $postal_pkg ) {
+ if ( $postal_pkg &&
+ ( scalar( grep { $_->recur && $_->recur > 0 } @cust_bill_pkg) ||
+ !$conf->exists('postal_invoice-recurring_only')
+ )
+ )
+ {
foreach my $part_pkg ( $postal_pkg->part_pkg->self_and_bill_linked ) {
my $error =
$self->_make_lines( 'part_pkg' => $part_pkg,
foreach my $part_pkg ( $postal_pkg->part_pkg->self_and_bill_linked ) {
my $error =
$self->_make_lines( 'part_pkg' => $part_pkg,