diff options
-rwxr-xr-x | LedgerSMB/AM.pm | 13 | ||||
-rwxr-xr-x | LedgerSMB/Num2text.pm | 2 | ||||
-rwxr-xr-x | bin/am.pl | 2 |
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. # #====================================================================== # @@ -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} }) { |