diff options
Diffstat (limited to 'LedgerSMB/AM.pm')
-rwxr-xr-x | LedgerSMB/AM.pm | 13 |
1 files changed, 13 insertions, 0 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; |