X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fam.pl;h=d8eb1a2177a1a112cdddeb492ae960ac67e4d187;hb=84da0ba2f48ac09652557a5aca1a912b06fb0b0b;hp=b41b0ec9927034a13f40834c928a2aa1bbf8b69b;hpb=4dbb09950c9f5596646537c12d991c99086fe7c1;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index b41b0ec99..d8eb1a217 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -31,50 +31,49 @@ # #====================================================================== - 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 +84,243 @@ 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| | ++ |
---|