projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'patch-19' of https://github.com/gjones2/Freeside
[freeside.git]
/
FS
/
FS
/
cust_bill.pm
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
b3ae290
..
8b156c6
100644
(file)
--- a/
FS/FS/cust_bill.pm
+++ b/
FS/FS/cust_bill.pm
@@
-1330,6
+1330,8
@@
invoice and all older invoices is greater than the specified amount.
I<notice_name>, if specified, overrides "Invoice" as the name of the sent document (templates from 10/2009 or newer required)
I<notice_name>, if specified, overrides "Invoice" as the name of the sent document (templates from 10/2009 or newer required)
+I<lpr>, if specified, is passed to
+
=cut
sub queueable_send {
=cut
sub queueable_send {
@@
-1354,6
+1356,7
@@
sub send {
my( $template, $invoice_from, $notice_name );
my $agentnums = '';
my $balance_over = 0;
my( $template, $invoice_from, $notice_name );
my $agentnums = '';
my $balance_over = 0;
+ my $lpr = '';
if ( ref($_[0]) ) {
my $opt = shift;
if ( ref($_[0]) ) {
my $opt = shift;
@@
-1364,6
+1367,7
@@
sub send {
$invoice_from = $opt->{'invoice_from'};
$balance_over = $opt->{'balance_over'} if $opt->{'balance_over'};
$notice_name = $opt->{'notice_name'};
$invoice_from = $opt->{'invoice_from'};
$balance_over = $opt->{'balance_over'} if $opt->{'balance_over'};
$notice_name = $opt->{'notice_name'};
+ $lpr = $opt->{'lpr'}
} else {
$template = scalar(@_) ? shift : '';
if ( scalar(@_) && $_[0] ) {
} else {
$template = scalar(@_) ? shift : '';
if ( scalar(@_) && $_[0] ) {
@@
-1397,10
+1401,12
@@
sub send {
if ( grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list or !@invoicing_list )
&& ! $self->invoice_noemail;
if ( grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list or !@invoicing_list )
&& ! $self->invoice_noemail;
+ $opt{'lpr'} = $lpr;
#$self->print_invoice(\%opt)
$self->print(\%opt)
if grep { $_ eq 'POST' } @invoicing_list; #postal
#$self->print_invoice(\%opt)
$self->print(\%opt)
if grep { $_ eq 'POST' } @invoicing_list; #postal
+ #this has never been used post-$ORIGINAL_ISP afaik
$self->fax_invoice(\%opt)
if grep { $_ eq 'FAX' } @invoicing_list; #fax
$self->fax_invoice(\%opt)
if grep { $_ eq 'FAX' } @invoicing_list; #fax
@@
-1564,14
+1570,16
@@
sub print {
return if $self->hide;
my $conf = $self->conf;
return if $self->hide;
my $conf = $self->conf;
- my( $template, $notice_name );
+ my( $template, $notice_name
, $lpr
);
if ( ref($_[0]) ) {
my $opt = shift;
$template = $opt->{'template'} || '';
$notice_name = $opt->{'notice_name'} || 'Invoice';
if ( ref($_[0]) ) {
my $opt = shift;
$template = $opt->{'template'} || '';
$notice_name = $opt->{'notice_name'} || 'Invoice';
+ $lpr = $opt->{'lpr'}
} else {
$template = scalar(@_) ? shift : '';
$notice_name = 'Invoice';
} else {
$template = scalar(@_) ? shift : '';
$notice_name = 'Invoice';
+ $lpr = '';
}
my %opt = (
}
my %opt = (
@@
-1587,6
+1595,7
@@
sub print {
do_print(
$self->lpr_data(\%opt),
'agentnum' => $self->cust_main->agentnum,
do_print(
$self->lpr_data(\%opt),
'agentnum' => $self->cust_main->agentnum,
+ 'lpr' => $lpr,
);
}
}
);
}
}
@@
-2121,10
+2130,13
@@
sub print_csv {
$previous_balance = sprintf('%.2f', $previous_balance);
my $totaldue = sprintf('%.2f', $self->owed + $previous_balance);
my @items = map {
$previous_balance = sprintf('%.2f', $previous_balance);
my $totaldue = sprintf('%.2f', $self->owed + $previous_balance);
my @items = map {
- ($_->{pkgnum} || ''),
- $_->{description},
- $_->{amount}
- } $self->_items_pkg;
+ $_->{pkgnum},
+ $_->{description},
+ $_->{amount}
+ }
+ $self->_items_pkg, #_items_nontax? no sections or anything
+ # with this format
+ $self->_items_tax;
$csv->combine(
$cust_main->agentnum,
$csv->combine(
$cust_main->agentnum,
@@
-3125,11
+3137,16
@@
sub _items_payments {
#something more elaborate if $_->amount ne ->cust_pay->paid ?
#something more elaborate if $_->amount ne ->cust_pay->paid ?
+ my $desc = $self->mt('Payment received').' '.
+ time2str($date_format,$_->cust_pay->_date );
+ $desc .= $self->mt(' via ' . $_->cust_pay->payby_payinfo_pretty)
+ if ( $self->conf->exists('invoice_payment_details') );
+
push @b, {
push @b, {
- 'description' => $self->mt('Payment received').' '.
- time2str($date_format,$_->cust_pay->_date ),
+ 'description' => $desc,
'amount' => sprintf("%.2f", $_->amount )
};
'amount' => sprintf("%.2f", $_->amount )
};
+
}
@b;
}
@b;