[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3654] trunk
- Subject: SF.net SVN: ledger-smb:[3654] trunk
- From: ..hidden..
- Date: Mon, 15 Aug 2011 22:59:38 +0000
Revision: 3654
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3654&view=rev
Author: einhverfr
Date: 2011-08-15 22:59:37 +0000 (Mon, 15 Aug 2011)
Log Message:
-----------
Move towards coa loading
Modified Paths:
--------------
trunk/UI/setup/select_coa.html
trunk/scripts/setup.pl
Modified: trunk/UI/setup/select_coa.html
===================================================================
--- trunk/UI/setup/select_coa.html 2011-08-15 22:23:21 UTC (rev 3653)
+++ trunk/UI/setup/select_coa.html 2011-08-15 22:59:37 UTC (rev 3654)
@@ -28,8 +28,8 @@
INCLUDE select element_data = {
options = coa_lcs
name = 'coa_lc'
- text_attr = 'country'
- value_attr = 'name'
+ text_attr = 'code'
+ value_attr = 'code'
};
END ?>
</div>
Modified: trunk/scripts/setup.pl
===================================================================
--- trunk/scripts/setup.pl 2011-08-15 22:23:21 UTC (rev 3653)
+++ trunk/scripts/setup.pl 2011-08-15 22:59:37 UTC (rev 3654)
@@ -156,9 +156,13 @@
use LedgerSMB::Sysconfig;
my ($request) = @_;
my $creds = LedgerSMB::Auth::get_credentials();
+
+
+ # ENVIRONMENT NECESSARY
$ENV{PGUSER} = $creds->{login};
$ENV{PGPASSWORD} = $creds->{password};
$ENV{PGDATABASE} = $request->{database};
+
my $database = LedgerSMB::Database->new(
{username => $creds->{login},
company_name => $request->{database},
@@ -166,6 +170,17 @@
);
$database->create_and_load();
$database->process_roles('Roles.sql');
+
+ #COA Directories
+ opendir(COA, 'sql/coa');
+ my @coa = !/^(\.\.?|[Ss]ample.*)$/, readdir(COA);
+ closedir(COA);
+
+ $request->{coa_lcs} =[];
+ foreach my $lcs (@coa){
+ push @{$request->{coa_lcs}}, {code => $lcs};
+ }
+
$template = LedgerSMB::Template->new(
path => 'UI/setup',
template => 'select_coa',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.