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

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



Revision: 5023
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5023&view=rev
Author:   einhverfr
Date:     2012-07-21 12:54:00 +0000 (Sat, 21 Jul 2012)
Log Message:
-----------
COA settings now showing properly in Defaults screen

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/configuration.pm
    trunk/LedgerSMB/Setting.pm
    trunk/LedgerSMB.pm
    trunk/Makefile.PL

Modified: trunk/LedgerSMB/Scripts/configuration.pm
===================================================================
--- trunk/LedgerSMB/Scripts/configuration.pm	2012-07-21 12:15:07 UTC (rev 5022)
+++ trunk/LedgerSMB/Scripts/configuration.pm	2012-07-21 12:54:00 UTC (rev 5023)
@@ -84,18 +84,27 @@
     my @language_code_list =
              $request->call_procedure(procname=> 'person__list_languages');
 
-
     my %selects = (
         'fxloss_accno_id' => {name => 'fxloss_accno_id', 
-                           options => $setting_handle->accounts_by_link('FX_loss')},
+                           options => $setting_handle->accounts_by_link('FX_loss'),
+                         text_attr => 'text',
+                        value_attr => 'id'},
         'fxgain_accno_id' => {name => 'fxgain_accno_id', 
-                           options => $setting_handle->accounts_by_link('FX_gain')},
+                         text_attr => 'text',
+                           options => $setting_handle->accounts_by_link('FX_gain'),
+                        value_attr => 'id'},
         'expense_accno_id' => {name => 'expense_accno_id', 
-                            options => $setting_handle->accounts_by_link('IC_expense')},
+                            options =>  $setting_handle->accounts_by_link('IC_expense'),
+                         text_attr => 'text',
+                        value_attr => 'id'},
         'income_accno_id' => {name => 'income_accno_id',
-                           options => $setting_handle->accounts_by_link('IC_income')},
+                           options => $setting_handle->accounts_by_link('IC_income'),
+                         text_attr => 'text',
+                        value_attr => 'id'},
         'inventory_accno_id' => {name => 'inventory_accno_id', 
-                     options => $setting_handle->accounts_by_link('IC')},
+                     options => $setting_handle->accounts_by_link('IC'),
+                   text_attr => 'text',
+                  value_attr => 'id'},
 	'default_country' => {name   => 'default_country', 
 			     options => ..hidden..,
 			     default_values => [$request->{'default_country'}],

Modified: trunk/LedgerSMB/Setting.pm
===================================================================
--- trunk/LedgerSMB/Setting.pm	2012-07-21 12:15:07 UTC (rev 5022)
+++ trunk/LedgerSMB/Setting.pm	2012-07-21 12:54:00 UTC (rev 5023)
@@ -185,5 +185,8 @@
     my ($self, $link) = @_;
     my @results = $self->call_procedure(procname => 'account__get_by_link_desc',
                               args => [$link]);
+    for my $ref (@results){
+        $ref->{text} = "$ref->{accno} -- $ref->{description}";
+    }
     return ..hidden..;
 }

Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm	2012-07-21 12:15:07 UTC (rev 5022)
+++ trunk/LedgerSMB.pm	2012-07-21 12:54:00 UTC (rev 5023)
@@ -207,7 +207,7 @@
 use LedgerSMB::PGDate;
 use LedgerSMB::Sysconfig;
 use Data::Dumper;
-use Error;
+use Contextual::Return;
 use LedgerSMB::App_State;
 use LedgerSMB::Auth;
 use LedgerSMB::Session;

Modified: trunk/Makefile.PL
===================================================================
--- trunk/Makefile.PL	2012-07-21 12:15:07 UTC (rev 5022)
+++ trunk/Makefile.PL	2012-07-21 12:54:00 UTC (rev 5023)
@@ -10,6 +10,7 @@
 
 perl_version '5.8.1';
 
+requires 'Contextual::Return';
 requires 'Data::Dumper';
 requires 'Log::Log4perl';
 requires 'Locale::Maketext';

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