[freeside-commits] freeside/FS/FS/part_event/Condition balance_age.pm, 1.3, 1.3.4.1 balance.pm, 1.2, 1.2.4.1 balance_under.pm, 1.2, 1.2.4.1 cust_bill_has_service.pm, 1.5, 1.5.4.1 cust_bill_owed.pm, 1.3, 1.3.4.1 cust_bill_owed_under.pm, 1.2, 1.2.4.1
Ivan,,,
ivan at wavetail.420.am
Sun Apr 4 23:55:46 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/part_event/Condition
In directory wavetail.420.am:/tmp/cvs-serv16312/part_event/Condition
Modified Files:
Tag: FREESIDE_1_9_BRANCH
balance_age.pm balance.pm balance_under.pm
cust_bill_has_service.pm cust_bill_owed.pm
cust_bill_owed_under.pm
Log Message:
mysql billing fixes, 1.9
Index: cust_bill_owed_under.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_event/Condition/cust_bill_owed_under.pm,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -w -d -r1.2 -r1.2.4.1
--- cust_bill_owed_under.pm 22 Nov 2008 22:17:28 -0000 1.2
+++ cust_bill_owed_under.pm 5 Apr 2010 06:55:44 -0000 1.2.4.1
@@ -43,7 +43,7 @@
my $owed_sql = FS::cust_bill->owed_sql;
- "$owed_sql <= CAST( $under AS numeric )";
+ "$owed_sql <= CAST( $under AS DECIMAL(10,2) )";
}
1;
Index: cust_bill_owed.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_event/Condition/cust_bill_owed.pm,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -u -w -d -r1.3 -r1.3.4.1
--- cust_bill_owed.pm 22 Nov 2008 22:17:28 -0000 1.3
+++ cust_bill_owed.pm 5 Apr 2010 06:55:43 -0000 1.3.4.1
@@ -48,7 +48,7 @@
my $owed_sql = FS::cust_bill->owed_sql;
- "$owed_sql > CAST( $over AS numeric )";
+ "$owed_sql > CAST( $over AS DECIMAL(10,2) )";
}
1;
Index: balance_under.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_event/Condition/balance_under.pm,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -w -d -r1.2 -r1.2.4.1
--- balance_under.pm 22 Nov 2008 22:17:27 -0000 1.2
+++ balance_under.pm 5 Apr 2010 06:55:43 -0000 1.2.4.1
@@ -34,7 +34,7 @@
my $balance_sql = FS::cust_main->balance_sql;
- "$balance_sql <= CAST( $under AS numeric )";
+ "$balance_sql <= CAST( $under AS DECIMAL(10,2) )";
}
Index: balance_age.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_event/Condition/balance_age.pm,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -u -w -d -r1.3 -r1.3.4.1
--- balance_age.pm 22 Nov 2008 22:17:27 -0000 1.3
+++ balance_age.pm 5 Apr 2010 06:55:43 -0000 1.3.4.1
@@ -38,7 +38,7 @@
my $balance_sql = FS::cust_main->balance_date_sql( $age );
- "$balance_sql > CAST( $over AS numeric )";
+ "$balance_sql > CAST( $over AS DECIMAL(10,2) )";
}
sub order_sql {
Index: cust_bill_has_service.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_event/Condition/cust_bill_has_service.pm,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -w -d -r1.5 -r1.5.4.1
--- cust_bill_has_service.pm 22 Nov 2008 22:17:27 -0000 1.5
+++ cust_bill_has_service.pm 5 Apr 2010 06:55:43 -0000 1.5.4.1
@@ -38,14 +38,16 @@
}
sub condition_sql {
- my( $class, $table ) = @_;
+ my( $class, $table, %opt ) = @_;
+
+ my $integer = $opt{'driver_name'} =~ /^mysql/ ? 'UNSIGNED INTEGER' : 'INTEGER';
my $servicenum = $class->condition_sql_option('has_service');
my $sql = qq| 0 < ( SELECT COUNT(cs.svcpart)
FROM cust_bill_pkg cbp, cust_svc cs
WHERE cbp.invnum = cust_bill.invnum
AND cs.pkgnum = cbp.pkgnum
- AND cs.svcpart = CAST( $servicenum AS integer )
+ AND cs.svcpart = CAST( $servicenum AS $integer )
)
|;
return $sql;
Index: balance.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_event/Condition/balance.pm,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -w -d -r1.2 -r1.2.4.1
--- balance.pm 22 Nov 2008 22:17:27 -0000 1.2
+++ balance.pm 5 Apr 2010 06:55:43 -0000 1.2.4.1
@@ -40,7 +40,7 @@
my $balance_sql = FS::cust_main->balance_sql;
- "$balance_sql > CAST( $over AS numeric )";
+ "$balance_sql > CAST( $over AS DECIMAL(10,2) )";
}
More information about the freeside-commits
mailing list