foreach my $del_obj (
grep { ! $edits{$_->$table_pkey()} }
- qsearch( $table, $hashref )
+ $self->process_o2m_qsearch( $table, $hashref )
) {
my $error = $del_obj->delete;
if ( $error ) {
}
foreach my $pkey_value ( keys %edits ) {
- my $old_obj = qsearchs( $table, { %$hashref, $table_pkey => $pkey_value } ),
+ my $old_obj = $self->process_o2m_qsearchs( $table, { %$hashref, $table_pkey => $pkey_value } );
my $add_param = $edits{$pkey_value};
my %hash = ( $table_pkey => $pkey_value,
map { $_ => $opt{'params'}->{$add_param."_$_"} }
'';
}
+sub process_o2m_qsearch { shift->qsearch( @_ ); }
+sub process_o2m_qsearchs { shift->qsearchs( @_ ); }
+
sub _load_table {
my( $self, $table ) = @_;
eval "use FS::$table";