diff options
author | ivan <ivan> | 2009-10-10 00:00:32 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-10-10 00:00:32 +0000 |
commit | bdf4497fd8d3778e9cc0f8b90dd8a742f3a84158 (patch) | |
tree | f721e2efecfea352e5fbde4177e2b9b026b161ee /FS/FS/cust_bill.pm | |
parent | f04616ad2c32641c1b85820cb97bcb22edbbc9f5 (diff) |
change invoice terms for one-time charges (& bill them immediately), RT#5891
Diffstat (limited to 'FS/FS/cust_bill.pm')
-rw-r--r-- | FS/FS/cust_bill.pm | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index ac1e450d8..493bc097b 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -96,6 +96,18 @@ L<Time::Local> and L<Date::Parse> for conversion functions. =item charged - amount of this invoice +=item invoice_terms - optional terms override for this specific invoice + +=back + +Customer info at invoice generation time + +=over 4 + +=item previous_balance + +=item billing_balance + =back Deprecated @@ -2989,10 +3001,10 @@ sub _translate_old_latex_format { $line_item_line =~ s/\$(\w+)/'. \$_tr_line->{$1}. '/g; push @template, " \$OUT .= '$line_item_line';"; } - + push @template, '}', '--@]'; - + #' doh, gvim } elsif ( $line =~ /^%%TotalDetails\s*$/ ) { push @template, '[@--', @@ -3026,11 +3038,12 @@ sub _translate_old_latex_format { sub terms { my $self = shift; - #check for an invoice- specific override (eventually) + #check for an invoice-specific override + return $self->invoice_terms if $self->invoice_terms; #check for a customer- specific override - return $self->cust_main->invoice_terms - if $self->cust_main->invoice_terms; + my $cust_main = $self->cust_main; + return $cust_main->invoice_terms if $cust_main->invoice_terms; #use configured default $conf->config('invoice_default_terms') || ''; |