[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5428] trunk/LedgerSMB/Scripts/vouchers.pm



Revision: 5428
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5428&view=rev
Author:   einhverfr
Date:     2012-12-27 09:06:23 +0000 (Thu, 27 Dec 2012)
Log Message:
-----------
Batch deletion now works

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/vouchers.pm

Modified: trunk/LedgerSMB/Scripts/vouchers.pm
===================================================================
--- trunk/LedgerSMB/Scripts/vouchers.pm	2012-12-27 09:04:38 UTC (rev 5427)
+++ trunk/LedgerSMB/Scripts/vouchers.pm	2012-12-27 09:06:23 UTC (rev 5428)
@@ -311,12 +311,14 @@
         list_batches($request);
         $request->finalize_request();
     }
-    for my $count (1 .. $batch->{rowcount}){
-        next unless $batch->{"batch_" . $batch->{"row_$count"}};
+    for my $count (1 .. $batch->{rowcount_}){
+        next unless $batch->{"select_" . $count};
         $batch->{batch_id} = $batch->{"row_$count"};
         $batch->delete;
     }
-    search_batch($request);
+    $request->{report_name} = 'unapproved'; 
+    $request->{search_type} = 'batches';
+    LedgerSMB::Scripts::reports::start_report($request);
 }
 
 eval { do "scripts/custom/vouchers.pl"};

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.