[freeside-commits] freeside/FS/FS part_pkg.pm, 1.96, 1.97 cust_bill_ApplicationCommon.pm, 1.11, 1.12
Ivan,,,
ivan at wavetail.420.am
Sun Aug 23 23:40:00 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv4092/FS/FS
Modified Files:
part_pkg.pm cust_bill_ApplicationCommon.pm
Log Message:
(start of) customer move script, RT#5351
Index: part_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg.pm,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- part_pkg.pm 20 Jul 2009 14:26:12 -0000 1.96
+++ part_pkg.pm 24 Aug 2009 06:39:58 -0000 1.97
@@ -1,7 +1,7 @@
package FS::part_pkg;
use strict;
-use vars qw( @ISA %plans $DEBUG $setup_hack );
+use vars qw( @ISA %plans $DEBUG $setup_hack $skip_pkg_svc_hack );
use Carp qw(carp cluck confess);
use Scalar::Util qw( blessed );
use Time::Local qw( timelocal_nocheck );
@@ -23,6 +23,7 @@
@ISA = qw( FS::m2m_Common FS::option_Common );
$DEBUG = 0;
$setup_hack = 0;
+$skip_pkg_svc_hack = 0;
=head1 NAME
@@ -217,26 +218,30 @@
}
}
- warn " inserting pkg_svc records" if $DEBUG;
- my $pkg_svc = $options{'pkg_svc'} || {};
- foreach my $part_svc ( qsearch('part_svc', {} ) ) {
- my $quantity = $pkg_svc->{$part_svc->svcpart} || 0;
- my $primary_svc =
- ( $options{'primary_svc'} && $options{'primary_svc'}==$part_svc->svcpart )
- ? 'Y'
- : '';
+ unless ( $skip_pkg_svc_hack ) {
- my $pkg_svc = new FS::pkg_svc( {
- 'pkgpart' => $self->pkgpart,
- 'svcpart' => $part_svc->svcpart,
- 'quantity' => $quantity,
- 'primary_svc' => $primary_svc,
- } );
- my $error = $pkg_svc->insert;
- if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- return $error;
+ warn " inserting pkg_svc records" if $DEBUG;
+ my $pkg_svc = $options{'pkg_svc'} || {};
+ foreach my $part_svc ( qsearch('part_svc', {} ) ) {
+ my $quantity = $pkg_svc->{$part_svc->svcpart} || 0;
+ my $primary_svc =
+ ( $options{'primary_svc'} && $options{'primary_svc'}==$part_svc->svcpart )
+ ? 'Y'
+ : '';
+
+ my $pkg_svc = new FS::pkg_svc( {
+ 'pkgpart' => $self->pkgpart,
+ 'svcpart' => $part_svc->svcpart,
+ 'quantity' => $quantity,
+ 'primary_svc' => $primary_svc,
+ } );
+ my $error = $pkg_svc->insert;
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
}
+
}
if ( $options{'cust_pkg'} ) {
Index: cust_bill_ApplicationCommon.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_ApplicationCommon.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- cust_bill_ApplicationCommon.pm 30 Jul 2009 06:42:31 -0000 1.11
+++ cust_bill_ApplicationCommon.pm 24 Aug 2009 06:39:58 -0000 1.12
@@ -1,7 +1,7 @@
package FS::cust_bill_ApplicationCommon;
use strict;
-use vars qw( @ISA $DEBUG $me );
+use vars qw( @ISA $DEBUG $me $skip_apply_to_lineitems_hack );
use List::Util qw(min);
use FS::Schema qw( dbdef );
use FS::Record qw( qsearch qsearchs dbh );
@@ -11,6 +11,8 @@
$DEBUG = 0;
$me = '[FS::cust_bill_ApplicationCommon]';
+$skip_apply_to_lineitems_hack = 0;
+
=head1 NAME
FS::cust_bill_ApplicationCommon - Base class for bill application classes
@@ -113,6 +115,8 @@
sub apply_to_lineitems {
my $self = shift;
+ return '' if $skip_apply_to_lineitems_hack;
+
my @apply = ();
my $conf = new FS::Conf;
More information about the freeside-commits
mailing list