diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-12-05 10:45:26 -0800 |
---|---|---|
committer | Jeremy Davis <jeremyd@freeside.biz> | 2014-12-10 11:23:48 -0500 |
commit | a83f6bb859327c0ff55d6aa30e39e8a0f657be75 (patch) | |
tree | 45626acc9ee47f7253cac441186a8adc60d76f78 /FS/FS/part_event | |
parent | 36a9d4661fffb85b8d9ec099ee2dc0ced8991e99 (diff) |
agent-ize invoice_default_terms, RT#32513
Diffstat (limited to 'FS/FS/part_event')
-rw-r--r-- | FS/FS/part_event/Condition/cust_bill_past_due.pm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/FS/FS/part_event/Condition/cust_bill_past_due.pm b/FS/FS/part_event/Condition/cust_bill_past_due.pm index 47a90cf4a..5e24acfc9 100644 --- a/FS/FS/part_event/Condition/cust_bill_past_due.pm +++ b/FS/FS/part_event/Condition/cust_bill_past_due.pm @@ -35,13 +35,14 @@ sub condition { $as_of >= ($cust_bill->due_date || $cust_bill->_date); } -sub condition_sql { - my( $class, $table, %opt ) = @_; - return 'true' if $opt{'driver_name'} ne 'Pg'; - my $delay = $class->condition_sql_option_integer('delay', 'Pg'); - my ($sec,$min,$hour,$mday,$mon,$year) = (localtime($opt{'time'}))[0..5]; - my $as_of = timelocal(0,0,0,$mday,$mon,$year) . " - ($delay * 86400)"; - "( $as_of ) >= ".FS::cust_bill->due_date_sql; -} +#->due_date_sql can't cope with agent-specific invoice_default_terms +#sub condition_sql { +# my( $class, $table, %opt ) = @_; +# return 'true' if $opt{'driver_name'} ne 'Pg'; +# my $delay = $class->condition_sql_option_integer('delay', 'Pg'); +# my ($sec,$min,$hour,$mday,$mon,$year) = (localtime($opt{'time'}))[0..5]; +# my $as_of = timelocal(0,0,0,$mday,$mon,$year) . " - ($delay * 86400)"; +# "( $as_of ) >= ".FS::cust_bill->due_date_sql; +#} 1; |