summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/AM.pm13
-rwxr-xr-xLedgerSMB/Num2text.pm2
-rwxr-xr-xbin/am.pl2
3 files changed, 15 insertions, 2 deletions
diff --git a/LedgerSMB/AM.pm b/LedgerSMB/AM.pm
index 25415a15..8014c41e 100755
--- a/LedgerSMB/AM.pm
+++ b/LedgerSMB/AM.pm
@@ -1835,5 +1835,18 @@ sub post_yearend {
}
+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;
diff --git a/LedgerSMB/Num2text.pm b/LedgerSMB/Num2text.pm
index bd66bcfa..74ed8a4a 100755
--- a/LedgerSMB/Num2text.pm
+++ b/LedgerSMB/Num2text.pm
@@ -23,7 +23,7 @@
#
#======================================================================
#
-# This file has NOT undergone whitespace cleanup.
+# This file has undergone whitespace cleanup.
#
#======================================================================
#
diff --git a/bin/am.pl b/bin/am.pl
index 5015660e..76423e9a 100755
--- a/bin/am.pl
+++ b/bin/am.pl
@@ -1693,7 +1693,7 @@ sub save_template {
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} }) {