add option to credit customer sales person if there is no package sales person to...
[freeside.git] / FS / FS / part_event / Condition / cust_bill_owed.pm
index e90d3db..d8c77c7 100644 (file)
@@ -16,6 +16,12 @@ sub eventtable_hashref {
     };
 }
 
+sub implicit_flag { 30; }
+
+sub remove_warning {
+  'Are you sure you want to remove this condition?  Doing so will allow this event to run even for invoices which have no outstanding balance.  Perhaps you want to reset "Amount owed over" to 0 instead of removing the condition entirely?'; #better error msg?
+}
+
 sub option_fields {
   (
     'owed' => { 'label'      => 'Amount owed over',
@@ -42,7 +48,7 @@ sub condition_sql {
 
   my $owed_sql = FS::cust_bill->owed_sql;
 
-  "$owed_sql > $over";
+  "$owed_sql > CAST( $over AS DECIMAL(10,2) )";
 }
 
 1;