Merge pull request #6 from cwittmer/fixFSF
[kivitendo-erp.git] / bin / mozilla / am.pl
index 62c645a..b3ec604 100644 (file)
@@ -24,7 +24,8 @@
 # GNU General Public License for more details.
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1335, USA.
 #======================================================================
 #
 # administration
@@ -45,6 +46,8 @@ use SL::TODO;
 use SL::DB::Printer;
 use SL::DB::Tax;
 use SL::DB::Language;
+use SL::DB::Default;
+use SL::DBUtils qw(selectall_array_query);
 use CGI;
 
 require "bin/mozilla/common.pl";
@@ -87,10 +90,17 @@ sub edit_account {
 
   my $form     = $main::form;
   my %myconfig = %main::myconfig;
+  my $defaults = SL::DB::Default->get;
 
   $main::auth->assert('config');
 
   $form->{title} = "Edit";
+  $form->{feature_balance} = $defaults->feature_balance;
+  $form->{feature_datev} = $defaults->feature_datev;
+  $form->{feature_erfolgsrechnung} = $defaults->feature_erfolgsrechnung;
+  $form->{feature_eurechnung} = $defaults->feature_eurechnung;
+  $form->{feature_ustva} = $defaults->feature_ustva;
+
   AM->get_account(\%myconfig, \%$form);
 
   foreach my $item (split(/:/, $form->{link})) {