diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /FS/FS/part_event/Condition/balance_under.pm | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'FS/FS/part_event/Condition/balance_under.pm')
-rw-r--r-- | FS/FS/part_event/Condition/balance_under.pm | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/FS/FS/part_event/Condition/balance_under.pm b/FS/FS/part_event/Condition/balance_under.pm deleted file mode 100644 index 2002c70..0000000 --- a/FS/FS/part_event/Condition/balance_under.pm +++ /dev/null @@ -1,42 +0,0 @@ -package FS::part_event::Condition::balance_under; - -use strict; -use FS::cust_main; - -use base qw( FS::part_event::Condition ); - -sub description { 'Customer balance (under)'; } - -sub option_fields { - ( - 'balance' => { 'label' => 'Balance under (or equal to)', - 'type' => 'money', - 'value' => '0.00', #default - }, - ); -} - -sub condition { - my($self, $object) = @_; - - my $cust_main = $self->cust_main($object); - - my $under = $self->option('balance'); - $under = 0 unless length($under); - - $cust_main->balance <= $under; -} - -sub condition_sql { - my( $class, $table ) = @_; - - my $under = $class->condition_sql_option('balance'); - - my $balance_sql = FS::cust_main->balance_sql; - - "$balance_sql <= CAST( $under AS DECIMAL(10,2) )"; - -} - -1; - |