X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=3bb240f4c6488d30e8d70cb810948e15d5432019;hb=a4e6496231fadbe68c6bab601b20845e90c7d140;hp=95bea4dcdc826c5910f47f56e29c59178c65f416;hpb=d38be021dde6dae352b0d755d9574dfe2de9898d;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 95bea4dcd..3bb240f4c 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -31,12 +31,14 @@ # #====================================================================== +use SL::Auth; use SL::AM; use SL::CA; use SL::Form; use SL::User; use SL::USTVA; use SL::Iconv; +use SL::TODO; use CGI::Ajax; use CGI; @@ -53,17 +55,18 @@ sub delete { call_sub("delete_$form->{type}"); } sub save { call_sub("save_$form->{type}"); } sub edit { call_sub("edit_$form->{type}"); } sub continue { call_sub($form->{"nextsub"}); } +sub save_as_new { call_sub("save_as_new_$form->{type}"); } sub add_account { $lxdebug->enter_sub(); + $auth->assert('config'); + $form->{title} = "Add"; $form->{charttype} = "A"; AM->get_account(\%myconfig, \%$form); - $form->{callback} = - "$form->{script}?action=list_account&login=$form->{login}&password=$form->{password}" - unless $form->{callback}; + $form->{callback} = "am.pl?action=list_account" unless $form->{callback}; &account_header; &form_footer; @@ -74,6 +77,8 @@ sub add_account { sub edit_account { $lxdebug->enter_sub(); + $auth->assert('config'); + $form->{title} = "Edit"; AM->get_account(\%myconfig, \%$form); @@ -90,10 +95,12 @@ sub edit_account { sub account_header { $lxdebug->enter_sub(); + $auth->assert('config'); + if ( $form->{action} eq 'edit_account') { $form->{account_exists} = '1'; - } - + } + $form->{title} = $locale->text("$form->{title} Account"); $form->{"$form->{charttype}_checked"} = "checked"; @@ -102,9 +109,9 @@ sub account_header { $form->{select_tax} = ""; my @tax_report_pos = USTVA->report_variables({ - myconfig => \%myconfig, - form => $form, - type => '', + myconfig => \%myconfig, + form => $form, + type => '', attribute => 'position', calc => '', }); @@ -140,41 +147,41 @@ sub account_header { if ($item->{id} == $taxkey_used->{tax_id}) { $form->{ACCOUNT_TAXKEYS}[$i]{selecttaxkey} .= qq||; @@ -208,7 +215,7 @@ sub account_header { 14 => "Steuern, Versich., Beiträge", 15 => "Kfz-Steuern", 16 => "Kfz-Versicherungen", - 17 => "Sonst. Fahrtkosten", + 17 => "Sonst. Fahrzeugkosten", 18 => "Werbe- und Reisekosten", 19 => "Instandhaltung u. Werkzeuge", 20 => "Fachzeitschriften, Bücher", @@ -281,18 +288,18 @@ sub account_header { # this is for our parser only! Do not remove. # type=submit $locale->text('Add Account') # type=submit $locale->text('Edit Account') - + $form->{type} = "account"; # preselections category - + $select_category = q|\n|; %category = ( 'A' => $locale->text('Asset'), 'L' => $locale->text('Liability'), 'Q' => $locale->text('Equity'), - 'I' => $locale->text('Revenue'), + 'I' => $locale->text('Revenue'), 'E' => $locale->text('Expense'), 'C' => $locale->text('Costs'), ); @@ -304,7 +311,7 @@ sub account_header { } } - + # preselection chart type my $select_charttype = q{}; @@ -312,7 +319,7 @@ sub account_header { 'A' => $locale->text('Account'), 'H' => $locale->text('Header'), ); - + foreach $item ( sort({ $a <=> $b } keys %charttype) ) { if ($item eq $form->{charttype}) { $select_charttype .= qq|