X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=e39d1193a1b38312ac80fee5fbb25728db6d5ddc;hb=1936914faa606aa5114592851c0d94913f6a005d;hp=b41b0ec9927034a13f40834c928a2aa1bbf8b69b;hpb=4dbb09950c9f5596646537c12d991c99086fe7c1;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index b41b0ec99..e39d1193a 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -31,50 +31,47 @@ # #====================================================================== - use SL::AM; use SL::CA; use SL::Form; use SL::User; +use Data::Dumper; 1; -# end of main - - - -sub add { &{ "add_$form->{type}" } }; -sub edit { &{ "edit_$form->{type}" } }; -sub save { &{ "save_$form->{type}" } }; -sub delete { &{ "delete_$form->{type}" } }; +require "$form->{path}/common.pl"; +# end of main +sub add { &{"add_$form->{type}"} } +sub edit { &{"edit_$form->{type}"} } +sub save { &{"save_$form->{type}"} } +sub delete { &{"delete_$form->{type}"} } sub add_account { $lxdebug->enter_sub(); - - $form->{title} = "Add"; + $form->{title} = "Add"; $form->{charttype} = "A"; AM->get_account(\%myconfig, \%$form); - - $form->{callback} = "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}" unless $form->{callback}; + + $form->{callback} = + "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}" + unless $form->{callback}; &account_header; &form_footer; - + $lxdebug->leave_sub(); } - sub edit_account { $lxdebug->enter_sub(); - $form->{title} = "Edit"; AM->get_account(\%myconfig, \%$form); - + foreach my $item (split(/:/, $form->{link})) { $form->{$item} = "checked"; } @@ -85,122 +82,239 @@ sub edit_account { $lxdebug->leave_sub(); } - sub account_header { $lxdebug->enter_sub(); - $form->{title} = $locale->text("$form->{title} Account"); - - $checked{$form->{charttype}} = "checked"; + + $checked{ $form->{charttype} } = "checked"; $checked{"$form->{category}_"} = "checked"; $checked{CT_tax} = ($form->{CT_tax}) ? "" : "checked"; - + $form->{description} =~ s/\"/"/g; - - if (@{ $form->{TAXKEY} }) { - $form->{selecttaxkey} = ""; + } + foreach $item (@{ $form->{NEWACCOUNT} }) { + if ($item->{id} == $form->{new_chart_id}) { + $form->{selectnewaccount} .= + ""; + } elsif (!$form->{new_chart_valid}) { + $form->{selectnewaccount} .= + ""; + } + + } + } + + $newaccount = qq| + + + + + + + + + +
| . $locale->text('Folgekonto') . qq|| . $locale->text('Gültig ab') . qq|
+ + |; $form->{selectustva} = "