[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [424] trunk
- Subject: SF.net SVN: ledger-smb: [424] trunk
- From: ..hidden..
- Date: Tue, 31 Oct 2006 09:56:43 -0800
Revision: 424
http://svn.sourceforge.net/ledger-smb/?rev=424&view=rev
Author: einhverfr
Date: 2006-10-31 09:56:40 -0800 (Tue, 31 Oct 2006)
Log Message:
-----------
UNTESTED fix for system->defaults
Modified Paths:
--------------
trunk/LedgerSMB/AM.pm
trunk/LedgerSMB/Num2text.pm
trunk/bin/am.pl
Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm 2006-10-31 06:53:40 UTC (rev 423)
+++ trunk/LedgerSMB/AM.pm 2006-10-31 17:56:40 UTC (rev 424)
@@ -1835,5 +1835,18 @@
}
+sub get_all_defaults{
+ my ($self, $form) = @_;
+ my $dbh = $form->{dbh};
+ my $query = "select setting_key, value FROM defaults";
+ $sth = $dbh->prepare($query);
+ $sth->execute;
+ while (($skey, $value) = $sth->fetchrow_array()){
+ $form->{$skey} = $value;
+ }
+ $self->defaultaccounts(undef, $form);
+ $dbh->commit;
+}
+
1;
Modified: trunk/LedgerSMB/Num2text.pm
===================================================================
--- trunk/LedgerSMB/Num2text.pm 2006-10-31 06:53:40 UTC (rev 423)
+++ trunk/LedgerSMB/Num2text.pm 2006-10-31 17:56:40 UTC (rev 424)
@@ -23,7 +23,7 @@
#
#======================================================================
#
-# This file has NOT undergone whitespace cleanup.
+# This file has undergone whitespace cleanup.
#
#======================================================================
#
Modified: trunk/bin/am.pl
===================================================================
--- trunk/bin/am.pl 2006-10-31 06:53:40 UTC (rev 423)
+++ trunk/bin/am.pl 2006-10-31 17:56:40 UTC (rev 424)
@@ -1693,7 +1693,7 @@
sub defaults {
# get defaults for account numbers and last numbers
- AM->defaultaccounts(\%myconfig, \%$form);
+ AM->get_all_defaults(\%$form);
foreach $key (keys %{ $form->{accno} }) {
foreach $accno (sort keys %{ $form->{accno}{$key} }) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.