[freeside-commits] freeside/FS/FS cust_bill.pm, 1.163.2.23, 1.163.2.24
Ivan,,,
ivan at wavetail.420.am
Thu May 29 20:55:54 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv14546/FS/FS
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cust_bill.pm
Log Message:
1.7 sucks. add a "balance over" option to the 1.7 style agent-specific invoice send event
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.163.2.23
retrieving revision 1.163.2.24
diff -u -d -r1.163.2.23 -r1.163.2.24
--- cust_bill.pm 19 May 2008 04:07:41 -0000 1.163.2.23
+++ cust_bill.pm 30 May 2008 03:55:52 -0000 1.163.2.24
@@ -750,6 +750,9 @@
INVOICE_FROM, if specified, overrides the default email invoice From: address.
+AMOUNT, if specified, only sends the invoice if the total amount owed on this
+invoice and all older invoices is greater than the specified amount.
+
=cut
sub queueable_send {
@@ -780,6 +783,11 @@
? shift
: ( $self->_agent_invoice_from || $conf->config('invoice_from') );
+ my $balance_over = ( scalar(@_) && $_[0] !~ /^\s*$/ ) ? shift : 0;
+
+ return ''
+ unless $self->cust_main->total_owed_date($self->_date) > $balance_over;
+
my @invoicing_list = $self->cust_main->invoicing_list;
$self->email($template, $invoice_from)
More information about the freeside-commits
mailing list