From 32ec9551c2c00aa85c4479451e5d4d55d09679e0 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Mon, 17 Dec 2007 23:22:43 +0000 Subject: Batch enhancements git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1980 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Batch.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'LedgerSMB/Batch.pm') diff --git a/LedgerSMB/Batch.pm b/LedgerSMB/Batch.pm index 5c948f79..28be86f7 100644 --- a/LedgerSMB/Batch.pm +++ b/LedgerSMB/Batch.pm @@ -6,10 +6,26 @@ use base qw(LedgerSMB::DBObject); sub create { $self = shift @_; my ($ref) = $self->exec_method(funcname => 'batch_create'); - print STDERR "$ref, $ref->{batch_create}, " . join (':', keys %$ref); $self->{id} = $ref->{batch_create}; $self->{dbh}->commit; return $ref->{id}; } +sub get_search_criteria { + $self = shift @_; + @{$self->{batch_classes}} = $self->exec_method( + funcname => 'batch_list_classes' + ); + + @{$self->{batch_users}} = $self->exec_method( + funcname => 'batch_get_users' + ); +} + +sub get_search_results { + my ($self) = @_; + @{$self->{search_results}} = $self->exec_method(funcname => 'batch_search'); + return @{$self->{search_results}}; +} + 1; -- cgit v1.2.3