X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/422f2f17365ea7879c14b902c5db1e4cd7023e48..1b9a64fa292f375c82b4af788d0606354bc4e8ff:/bin/mozilla/am.pl diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 1b4fd5f1e..b3ec6045c 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -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})) { @@ -256,6 +266,20 @@ sub account_header { } + my $select_er = q|\n|; + my %er = ( + 1 => "Ertrag", + 6 => "Aufwand"); + foreach my $item (sort({ $a <=> $b } keys(%er))) { + my $text = H($::locale->{iconv_utf8}->convert($er{$item})); + if ($item == $form->{pos_er}) { + $select_er .= qq|\n|; + } else { + $select_er .= qq|\n|; + } + + } + my $select_bwa = q|\n|; my %bwapos = ( @@ -358,6 +382,7 @@ sub account_header { select_bwa => $select_bwa, select_bilanz => $select_bilanz, select_eur => $select_eur, + select_er => $select_er, }; # Ausgabe des Templates @@ -1619,7 +1644,7 @@ sub delete_warehouse { $form->header(); print $form->parse_html_template('am/confirm_delete_warehouse'); - ::end_of_request(); + $::dispatcher->end_request; } if (AM->delete_warehouse(\%myconfig, $form)) {