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

SF.net SVN: ledger-smb:[3493] trunk



Revision: 3493
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3493&view=rev
Author:   einhverfr
Date:     2011-07-11 13:46:38 +0000 (Mon, 11 Jul 2011)

Log Message:
-----------
Correcting load errors

Modified Paths:
--------------
    trunk/LedgerSMB/File/Order.pm
    trunk/LedgerSMB/File/Transaction.pm
    trunk/t/01-load.t

Modified: trunk/LedgerSMB/File/Order.pm
===================================================================
--- trunk/LedgerSMB/File/Order.pm	2011-07-11 11:19:11 UTC (rev 3492)
+++ trunk/LedgerSMB/File/Order.pm	2011-07-11 13:46:38 UTC (rev 3493)
@@ -24,7 +24,7 @@
 
 package LedgerSMB::File::Order;
 use strict;
-use base(LedgerSMB::File);
+use base qw(LedgerSMB::File);
 
 =head1 METHODS
 
@@ -51,13 +51,13 @@
 
 sub attach_all_from_order {
     my ($self, $args) = @_;
-    for $attach ($self->list({ref_key => $args->{int}, file_class => 2}){
+    for my $attach ($self->list({ref_key => $args->{int}, file_class => 2})){
         my $new_link = LedgerSMB::File::Transaction->new();
         $new_link->merge($attach);
         $new_link->dbobject($self->dbobject);
         $new_link->attach({no_commit => 1});
     }
-    for $link ($self->list_links({ref_key => $args->{int}, file_class => 2}){
+    for my $link ($self->list_links({ref_key => $args->{int}, file_class => 2})){
         next if !($link->{src_class} == 2 || $link->{src_class} == 1);
         my $new_link = LedgerSMB::File::Transaction->new();
         $new_link->merge($link);
@@ -77,13 +77,13 @@
 
 sub attach_all_from_transaction {
     my ($self, $args) = @_;
-    for $attach ($self->list({ref_key => $args->{int}, file_class => 1}){
+    for my $attach ($self->list({ref_key => $args->{int}, file_class => 1})){
         my $new_link = LedgerSMB::File::Transaction->new();
         $new_link->merge($attach);
         $new_link->dbobject($self->dbobject);
         $new_link->attach({no_commit => 1});
     }
-    for $link ($self->list_links({ref_key => $args->{int}, file_class => 1}){
+    for my $link ($self->list_links({ref_key => $args->{int}, file_class => 1})){
         next if !($link->{src_class} == 2 || $link->{src_class} == 1);
         my $new_link = LedgerSMB::File::Transaction->new();
         $new_link->merge($link);

Modified: trunk/LedgerSMB/File/Transaction.pm
===================================================================
--- trunk/LedgerSMB/File/Transaction.pm	2011-07-11 11:19:11 UTC (rev 3492)
+++ trunk/LedgerSMB/File/Transaction.pm	2011-07-11 13:46:38 UTC (rev 3493)
@@ -21,7 +21,7 @@
 
 package LedgerSMB::File::Transaction;
 use strict;
-use base(LedgerSMB::File);
+use base qw(LedgerSMB::File);
 
 =back
 
@@ -50,14 +50,14 @@
 
 sub attach_all_from_order {
     my ($self, $args) = @_;
-    for $attach ($self->list({ref_key => $args->{int}, file_class => 2}){
+    for my $attach ($self->list({ref_key => $args->{int}, file_class => 2})){
         my $new_link = LedgerSMB::File::Transaction->new();
         $new_link->merge($attach);
         $new_link->dbobject($self->dbobject);
         $new_link->attach({no_commit => 1});
     }
-    for $link ($self->list_links({ref_key => $args->{int}, file_class => 2}){
-        next if $link->{src_class} <> 2;
+    for my $link ($self->list_links({ref_key => $args->{int}, file_class => 2})){
+        next if $link->{src_class} != 2;
         my $new_link = LedgerSMB::File::Transaction->new();
         $new_link->merge($link);
         $new_link->dbobject($self->dbobject);

Modified: trunk/t/01-load.t
===================================================================
--- trunk/t/01-load.t	2011-07-11 11:19:11 UTC (rev 3492)
+++ trunk/t/01-load.t	2011-07-11 13:46:38 UTC (rev 3493)
@@ -2,7 +2,7 @@
 
 use strict;
 use warnings;
-use Test::More tests => 51;
+use Test::More tests => 54;
 
 use_ok('LedgerSMB');
 use_ok('LedgerSMB::AA');
@@ -51,6 +51,9 @@
 use_ok('LedgerSMB::Template::Elements');
 use_ok('LedgerSMB::Template::CSV');
 use_ok('LedgerSMB::Template::HTML');
+use_ok('LedgerSMB::File');
+use_ok('LedgerSMB::File::Transaction');
+use_ok('LedgerSMB::File::Order');
 SKIP: {
     eval{ require Template::Plugin::Latex};
     skip 'Template::Plugin::Latex not installed', 1 if @_;


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