multiple payment options, RT#23741
[freeside.git] / FS / FS / o2m_Common.pm
index 4848649..4f6d2e7 100644 (file)
@@ -103,6 +103,7 @@ sub process_o2m {
                  map { $_ => $opt{'params'}->{$add_param."_$_"} }
                      @{ $opt{'fields'} }
                );
+    &{ $opt{'hash_callback'} }( \%hash ) if $opt{'hash_callback'};
     #next unless grep { $_ =~ /\S/ } values %hash;
 
     my $new_obj = "FS::$table"->new( { %$hashref, %hash } );
@@ -117,6 +118,7 @@ sub process_o2m {
 
     my %hash = map { $_ => $opt{'params'}->{$add_param."_$_"} }
                @{ $opt{'fields'} };
+    &{ $opt{'hash_callback'} }( \%hash ) if $opt{'hash_callback'};
     next unless grep { $_ =~ /\S/ } values %hash;
 
     my $add_obj = "FS::$table"->new( { %$hashref, %hash } );
@@ -131,8 +133,8 @@ sub process_o2m {
   '';
 }
 
-sub process_o2m_qsearch  { shift->qsearch( @_  ); }
-sub process_o2m_qsearchs { shift->qsearchs( @_ ); }
+sub process_o2m_qsearch  { my $self = shift; qsearch(  @_ ); }
+sub process_o2m_qsearchs { my $self = shift; qsearchs( @_ ); }
 
 sub _load_table {
   my( $self, $table ) = @_;