[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6731] trunk/LedgerSMB
- Subject: SF.net SVN: ledger-smb:[6731] trunk/LedgerSMB
- From: ..hidden..
- Date: Tue, 4 Feb 2014 04:30:43 +0000
Revision: 6731
http://sourceforge.net/p/ledger-smb/code/6731
Author: einhverfr
Date: 2014-02-04 04:30:43 +0000 (Tue, 04 Feb 2014)
Log Message:
-----------
Fixing typo in unlock perl function
Modified Paths:
--------------
trunk/LedgerSMB/Batch.pm
trunk/LedgerSMB/Report/Unapproved/Batch_Detail.pm
trunk/LedgerSMB/Report/Unapproved/Batch_Overview.pm
trunk/LedgerSMB/Scripts/vouchers.pm
Modified: trunk/LedgerSMB/Batch.pm
===================================================================
--- trunk/LedgerSMB/Batch.pm 2014-02-04 04:28:07 UTC (rev 6730)
+++ trunk/LedgerSMB/Batch.pm 2014-02-04 04:30:43 UTC (rev 6731)
@@ -62,7 +62,7 @@
sub unlock{
my ($self, $id) = @_;
- $self->call_procedure(procname => 'batch__unlick', args => [$id]);
+ $self->call_procedure(procname => 'batch__unlock', args => [$id]);
}
=item get_search_criteria
Modified: trunk/LedgerSMB/Report/Unapproved/Batch_Detail.pm
===================================================================
--- trunk/LedgerSMB/Report/Unapproved/Batch_Detail.pm 2014-02-04 04:28:07 UTC (rev 6730)
+++ trunk/LedgerSMB/Report/Unapproved/Batch_Detail.pm 2014-02-04 04:30:43 UTC (rev 6731)
@@ -201,6 +201,13 @@
text => LedgerSMB::Report::text('Delete Vouchers'),
value => 'vouchers_delete',
class => 'submit',
+ },
+ {
+ name => 'action',
+ type => 'submit',
+ text => LedgerSMB::Report::text('Unlock Batch'),
+ value => 'batch_unlock',
+ class => 'submit',
}]);
my @rows = $self->exec_method({funcname => 'voucher__list'});
for my $ref (@rows){
Modified: trunk/LedgerSMB/Report/Unapproved/Batch_Overview.pm
===================================================================
--- trunk/LedgerSMB/Report/Unapproved/Batch_Overview.pm 2014-02-04 04:28:07 UTC (rev 6730)
+++ trunk/LedgerSMB/Report/Unapproved/Batch_Overview.pm 2014-02-04 04:30:43 UTC (rev 6731)
@@ -243,6 +243,12 @@
text => LedgerSMB::Report::text('Delete'),
value => 'batch_delete',
class => 'submit',
+ },{
+ name => 'action',
+ type => 'submit',
+ text => LedgerSMB::Report::text('Unlock'),
+ value => 'batch_unlock',
+ class => 'submit',
}]);
my @rows = $self->exec_method({funcname => 'batch__search'});
for my $r (@rows){
Modified: trunk/LedgerSMB/Scripts/vouchers.pm
===================================================================
--- trunk/LedgerSMB/Scripts/vouchers.pm 2014-02-04 04:28:07 UTC (rev 6730)
+++ trunk/LedgerSMB/Scripts/vouchers.pm 2014-02-04 04:30:43 UTC (rev 6731)
@@ -295,6 +295,29 @@
LedgerSMB::Scripts::reports::start_report($request);
}
+=item batch_unlock
+
+Unlocks selected batches
+
+=cut
+
+sub batch_unlock {
+ my ($request) = @_;
+ my $batch = LedgerSMB::Batch->new(base => $request);
+ if ($request->{batch_id}){
+ $batch->unlock($request->{batch_id});
+ } else {
+ for my $count (1 .. $batch->{rowcount_}){
+ next unless $batch->{"select_" . $count};
+ $batch->{batch_id} = $batch->{"row_$count"};
+ $batch->unlock($request->{"row_$count"});
+ }
+ }
+ $request->{report_name} = 'unapproved';
+ $request->{search_type} = 'batches';
+ LedgerSMB::Scripts::reports::start_report($request);
+}
+
=item batch_delete
Deletes selected batches
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits