[freeside-commits] freeside/FS/FS cust_main.pm,1.462,1.463

Ivan,,, ivan at wavetail.420.am
Fri Oct 9 14:37:05 PDT 2009


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv9847

Modified Files:
	cust_main.pm 
Log Message:
add cust_pkg_ref option to charge

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.462
retrieving revision 1.463
diff -u -d -r1.462 -r1.463
--- cust_main.pm	8 Oct 2009 06:00:18 -0000	1.462
+++ cust_main.pm	9 Oct 2009 21:37:02 -0000	1.463
@@ -7169,6 +7169,9 @@
                                     #vendor taxation
                                     'taxproduct' => 2,  #part_pkg_taxproduct
                                     'override'   => {}, #XXX describe
+
+                                    #will be filled in with the new object
+                                    'cust_pkg_ref' => \$cust_pkg,
                                   }
                                 );
 
@@ -7184,6 +7187,7 @@
   my ( $pkg, $comment, $additional );
   my ( $setuptax, $taxclass );   #internal taxes
   my ( $taxproduct, $override ); #vendor (CCH) taxes
+  my $cust_pkg_ref = '';
   if ( ref( $_[0] ) ) {
     $amount     = $_[0]->{amount};
     $quantity   = exists($_[0]->{quantity}) ? $_[0]->{quantity} : 1;
@@ -7197,6 +7201,7 @@
     $additional = $_[0]->{additional} || [];
     $taxproduct = $_[0]->{taxproductnum};
     $override   = { '' => $_[0]->{tax_override} };
+    $cust_pkg_ref = exists($_[0]->{cust_pkg_ref}) ? $_[0]->{cust_pkg_ref} : '';
   } else {
     $amount     = shift;
     $quantity   = 1;
@@ -7268,6 +7273,8 @@
   if ( $error ) {
     $dbh->rollback if $oldAutoCommit;
     return $error;
+  } elsif ( $cust_pkg_ref ) {
+    ${$cust_pkg_ref} = $cust_pkg;
   }
 
   $dbh->commit or die $dbh->errstr if $oldAutoCommit;



More information about the freeside-commits mailing list