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

SF.net SVN: ledger-smb:[4337] trunk/LedgerSMB



Revision: 4337
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4337&view=rev
Author:   einhverfr
Date:     2012-02-20 06:48:22 +0000 (Mon, 20 Feb 2012)
Log Message:
-----------
More framework fixes

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject/Business_Unit.pm
    trunk/LedgerSMB/DBObject/Business_Unit_Class.pm
    trunk/LedgerSMB/DBObject_Moose.pm
    trunk/LedgerSMB/Scripts/business_unit.pm

Modified: trunk/LedgerSMB/DBObject/Business_Unit.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Business_Unit.pm	2012-02-20 05:35:28 UTC (rev 4336)
+++ trunk/LedgerSMB/DBObject/Business_Unit.pm	2012-02-20 06:48:22 UTC (rev 4337)
@@ -11,7 +11,7 @@
 
 =cut
 
-package LedgerSMB::DBObject::Business_Unit_Class;
+package LedgerSMB::DBObject::Business_Unit;
 use Moose;
 use LedgerSMB::DBObject_Moose;
 extends 'LedgerSMB::DBObject_Moose';

Modified: trunk/LedgerSMB/DBObject/Business_Unit_Class.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Business_Unit_Class.pm	2012-02-20 05:35:28 UTC (rev 4336)
+++ trunk/LedgerSMB/DBObject/Business_Unit_Class.pm	2012-02-20 06:48:22 UTC (rev 4337)
@@ -110,7 +110,7 @@
     my ($self) = @_;
     my @classes = $self->exec_method({funcname => 'business_unit_class__list'});
     for my $class (@classes){
-        $class = $self->new($class);
+        $class = $self->new(%$class);
     }
     return @classes;
 }

Modified: trunk/LedgerSMB/DBObject_Moose.pm
===================================================================
--- trunk/LedgerSMB/DBObject_Moose.pm	2012-02-20 05:35:28 UTC (rev 4336)
+++ trunk/LedgerSMB/DBObject_Moose.pm	2012-02-20 06:48:22 UTC (rev 4337)
@@ -54,7 +54,7 @@
 has '_roles' => (is => 'ro', isa => 'ArrayRef[Str]', required => '1');
 has '_user' => (is => 'ro', isa => 'HashRef[Any]', required => '1');
 has '_locale' => (is => 'ro', isa => 'LedgerSMB::Locale', required => '1');
-has '_request' => (is => 'ro', isa => 'HashRef[Any]', required => '1');
+has '_request' => (is => 'ro', isa => 'CGI::Simple', required => '1');
 
 
 my $logger = Log::Log4perl->get_logger('LedgerSMB::DBObject');

Modified: trunk/LedgerSMB/Scripts/business_unit.pm
===================================================================
--- trunk/LedgerSMB/Scripts/business_unit.pm	2012-02-20 05:35:28 UTC (rev 4336)
+++ trunk/LedgerSMB/Scripts/business_unit.pm	2012-02-20 06:48:22 UTC (rev 4337)
@@ -7,6 +7,7 @@
 package LedgerSMB::Scripts::business_unit;
 use LedgerSMB::DBObject::Business_Unit_Class;
 use LedgerSMB::DBObject::Business_Unit;
+use LedgerSMB::Template;
 
 =head1 SYNOPSIS
 
@@ -24,6 +25,11 @@
 
 sub list_classes {
     my ($request) = @_;
+    my $bu_class = LedgerSMB::DBObject::Business_Unit_Class->new(%$request);
+    @{$request->{classes}} = $bu_class->list;
+    my $template = LedgerSMB::Template->new(
+    );
+    $template->render($request);
 }
 
 =item add
@@ -34,6 +40,7 @@
 
 sub add {
     my ($request) = @_;
+    
 }
 
 =item edit

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