X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=d0415618717701f7910e3d82d7067b12620eeaa7;hb=6755770b9e487756da69b7e0dcc6efb88513170e;hp=9e2aff932ee9f5b45c789519c7a8ac72a25c342b;hpb=d05861aff6d05095c5e1711c0a7db6887f489f2e;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 9e2aff932..d04156187 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -24,52 +24,87 @@ # 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 # #====================================================================== +use utf8; + +use List::MoreUtils qw(any); + +use SL::Auth; +use SL::Auth::PasswordPolicy; use SL::AM; use SL::CA; use SL::Form; +use SL::Helper::Flash; +use SL::Helper::UserPreferences; use SL::User; +use SL::USTVA; +use SL::Iconv; +use SL::Locale::String qw(t8); +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 conv_dateq); +use CGI; -use Data::Dumper; +require "bin/mozilla/common.pl"; -1; +use strict; -require "$form->{path}/common.pl"; +1; # 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 { call_sub("add_$main::form->{type}"); } +sub delete { call_sub("delete_$main::form->{type}"); } +sub save { call_sub("save_$main::form->{type}"); } +sub edit { call_sub("edit_$main::form->{type}"); } +sub continue { call_sub($main::form->{"nextsub"}); } +sub save_as_new { call_sub("save_as_new_$main::form->{type}"); } sub add_account { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); + + my $form = $main::form; + my %myconfig = %main::myconfig; + + $main::auth->assert('config'); $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} = "am.pl?action=list_account" unless $form->{callback}; &account_header; - &form_footer; - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } sub edit_account { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); + + 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})) { @@ -77,495 +112,364 @@ sub edit_account { } &account_header; - &form_footer; - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } sub account_header { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); + + my $form = $main::form; + my %myconfig = %main::myconfig; + my $locale = $main::locale; + + $main::auth->assert('config'); + + if ( $form->{action} eq 'edit_account') { + $form->{account_exists} = '1'; + } $form->{title} = $locale->text("$form->{title} Account"); - $checked{ $form->{charttype} } = "checked"; - $checked{"$form->{category}_"} = "checked"; - $checked{CT_tax} = ($form->{CT_tax}) ? "" : "checked"; + $form->{"$form->{charttype}_checked"} = "checked"; + $form->{"$form->{category}_checked"} = "checked"; + + $form->{select_tax} = ""; - $form->{description} =~ s/\"/"/g; + my @tax_report_pos = USTVA->report_variables({ + myconfig => \%myconfig, + form => $form, + type => '', + attribute => 'position', + calc => '', + }); if (@{ $form->{TAXKEY} }) { - $form->{selecttaxkey} = ""; + $form->{selectnewaccount} = qq||; } - foreach $item (@{ $form->{NEWACCOUNT} }) { + foreach my $item (@{ $form->{NEWACCOUNT} }) { if ($item->{id} == $form->{new_chart_id}) { $form->{selectnewaccount} .= - ""; + qq||; } elsif (!$form->{new_chart_valid}) { $form->{selectnewaccount} .= - ""; + qq||; } } } - $newaccount = qq| - - - - - - - - - -
| . $locale->text('Folgekonto') . qq|| . $locale->text('Gültig ab') . qq|
- - |; - - $form->{selectustva} = "\n|; + my %eur = %{ AM->get_eur_categories(\%myconfig, $form) }; + foreach my $item (sort({ $a <=> $b } keys(%eur))) { + my $text = H($::locale->{iconv_utf8}->convert($eur{$item})); + if ($item == $form->{pos_eur}) { + $select_eur .= qq|\n|; } else { - $form->{selectustva} .= "\n|; } } - $ustva = qq| - - | . $locale->text('Umsatzsteuervoranmeldung') . qq| - - - |; - - $form->{selecteur} = "\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 { - $form->{selecteur} .= "\n|; } } - $eur = qq| - - | . $locale->text('EUER') . qq| - - - |; - - $form->{selectbwa} = "\n|; + + my %bwapos = %{ AM->get_bwa_categories(\%myconfig, $form) }; + foreach my $item (sort({ $a <=> $b } keys %bwapos)) { + my $text = H($::locale->{iconv_utf8}->convert($bwapos{$item})); if ($item == $form->{pos_bwa}) { - $form->{selectbwa} .= "\n|; + foreach my $item ((1, 2, 3, 4)) { + if ($item == $form->{pos_bilanz}) { + $select_bilanz .= qq|\n|; + + my %category = ( + 'A' => $locale->text('Asset'), + 'L' => $locale->text('Liability'), + 'Q' => $locale->text('Equity'), + 'I' => $locale->text('Revenue'), + 'E' => $locale->text('Expense'), + 'C' => $locale->text('Costs'), + ); + foreach my $item ( sort({ $a <=> $b } keys %category) ) { + if ($item eq $form->{category}) { + $select_category .= qq|" } - sort({ $a->{"accno"} cmp $b->{"accno"} } - values(%{$acc_type_map{$type}})))); - } - - if ($form->{id}) { - $form->{selectIC} =~ s/selected//g; - $form->{selectIC} =~ s/ value=$form->{inventory_accno_id}/ value=$form->{inventory_accno_id} selected/; - $form->{selectIC_income} =~ s/selected//g; - $form->{selectIC_income} =~ s/ value=$form->{income_accno_id_0}/ value=$form->{income_accno_id_0} selected/; - $form->{selectIC_expense} =~ s/selected//g; - $form->{selectIC_expense} =~ s/ value=$form->{expense_accno_id_0}/ value=$form->{expense_accno_id_0} selected/; - } - - if (!$eur) { - $linkaccounts = qq| - - | . $locale->text('Inventory') . qq| - - - |; - } else { - $linkaccounts = qq| - {inventory_accno_id}>|; - } - - - $linkaccounts .= qq| - - | . $locale->text('Erlöse Inland') . qq| - - - - | . $locale->text('Aufwand Inland') . qq| - - |; - if ($form->{id}) { - $form->{selectIC_income} =~ s/selected//g; - $form->{selectIC_income} =~ s/ value=$form->{income_accno_id_1}/ value=$form->{income_accno_id_1} selected/; - $form->{selectIC_expense} =~ s/selected//g; - $form->{selectIC_expense} =~ s/ value=$form->{expense_accno_id_1}/ value=$form->{expense_accno_id_1} selected/; - } - $linkaccounts .= qq| - | . $locale->text('Erlöse EU m. UStId') . qq| - - - - | . $locale->text('Aufwand EU m UStId') . qq| - - |; - - if ($form->{id}) { - $form->{selectIC_income} =~ s/selected//g; - $form->{selectIC_income} =~ s/ value=$form->{income_accno_id_2}/ value=$form->{income_accno_id_2} selected/; - $form->{selectIC_expense} =~ s/selected//g; - $form->{selectIC_expense} =~ s/ value=$form->{expense_accno_id_2}/ value=$form->{expense_accno_id_2} selected/; - } - - $linkaccounts .= qq| - | . $locale->text('Erlöse EU o. UStId') . qq| - - - - | . $locale->text('Aufwand EU o. UStId') . qq| - - |; - - if ($form->{id}) { - $form->{selectIC_income} =~ s/selected//g; - $form->{selectIC_income} =~ s/ value=$form->{income_accno_id_3}/ value=$form->{income_accno_id_3} selected/; - $form->{selectIC_expense} =~ s/selected//g; - $form->{selectIC_expense} =~ s/ value=$form->{expense_accno_id_3}/ value=$form->{expense_accno_id_3} selected/; - } - - $linkaccounts .= qq| - | . $locale->text('Erlöse Ausland') . qq| - - - - | . $locale->text('Aufwand Ausland') . qq| - - -|; - - - $form->header; - - print qq| - - -
{script}> - -{id}> - - - - - - - - - - - - $linkaccounts - - -
$form->{title}
| . $locale->text('Buchungsgruppe') . qq|

-|; - - $lxdebug->leave_sub(); -} - -sub save_buchungsgruppe { - $lxdebug->enter_sub(); - - $form->isblank("description", $locale->text('Description missing!')); - - AM->save_buchungsgruppe(\%myconfig, \%$form); - $form->redirect($locale->text('Buchungsgruppe gespeichert!')); - - $lxdebug->leave_sub(); -} - -sub delete_buchungsgruppe { - $lxdebug->enter_sub(); - - AM->delete_buchungsgruppe(\%myconfig, \%$form); - $form->redirect($locale->text('Buchungsgruppe gelöscht!')); - - $lxdebug->leave_sub(); -} - - -sub add_printer { - $lxdebug->enter_sub(); - - $form->{title} = "Add"; - - $form->{callback} = - "$form->{script}?action=add_printer&path=$form->{path}&login=$form->{login}&password=$form->{password}" - unless $form->{callback}; - - &printer_header; - &form_footer; - - $lxdebug->leave_sub(); -} - -sub edit_printer { - $lxdebug->enter_sub(); - - $form->{title} = "Edit"; - - AM->get_printer(\%myconfig, \%$form); - - &printer_header; - - $form->{orphaned} = 1; - &form_footer; - - $lxdebug->leave_sub(); -} - -sub list_printer { - $lxdebug->enter_sub(); - - AM->printer(\%myconfig, \%$form); - - $form->{callback} = - "$form->{script}?action=list_printer&path=$form->{path}&login=$form->{login}&password=$form->{password}"; - - $callback = $form->escape($form->{callback}); - - $form->{title} = $locale->text('Printer'); - - @column_index = qw(printer_description printer_command template_code); - - $column_header{printer_description} = - qq|| - . $locale->text('Printer Description') - . qq||; - $column_header{printer_command} = - qq|| - . $locale->text('Printer Command') - . qq||; - $column_header{template_code} = - qq|| - . $locale->text('Template Code') - . qq||; - - $form->header; - - print qq| - - - - - - - - - - - - - -
$form->{title}
- - -|; - - map { print "$column_header{$_}\n" } @column_index; - - print qq| - -|; - - foreach $ref (@{ $form->{ALL} }) { - - $i++; - $i %= 2; - - print qq| - -|; - - - $column_data{printer_description} = - qq||; - $column_data{printer_command} = qq||; - $column_data{template_code} = - qq||; - - map { print "$column_data{$_}\n" } @column_index; - - print qq| - -|; - } - - print qq| -
{script}?action=edit_printer&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{printer_description}$ref->{printer_command}$ref->{template_code}
-

- -
-{script}> - - - - - -{path}> -{login}> -{password}> - -|; - - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - - print qq| - -
- - - -|; - - $lxdebug->leave_sub(); -} - -sub printer_header { - $lxdebug->enter_sub(); - - $form->{title} = $locale->text("$form->{title} Printer"); - - # $locale->text('Add Printer') - # $locale->text('Edit Printer') - - $form->{printer_description} =~ s/\"/"/g; - $form->{template_code} =~ s/\"/"/g; - $form->{printer_command} =~ s/\"/"/g; - - - $form->header; - - print qq| - - -
{script}> - -{id}> - - - - - - - - - - - - - - - - - - - - - -
$form->{title}
| . $locale->text('Printer') . qq|
| . $locale->text('Printer Command') . qq|
| . $locale->text('Template Code') . qq|

-|; - - $lxdebug->leave_sub(); -} - -sub save_printer { - $lxdebug->enter_sub(); - - $form->isblank("printer_description", $locale->text('Description missing!')); - $form->isblank("printer_command", $locale->text('Printer Command missing!')); - AM->save_printer(\%myconfig, \%$form); - $form->redirect($locale->text('Printer saved!')); - - $lxdebug->leave_sub(); -} - -sub delete_printer { - $lxdebug->enter_sub(); - - AM->delete_printer(\%myconfig, \%$form); - $form->redirect($locale->text('Printer deleted!')); - - $lxdebug->leave_sub(); -} - - -sub add_payment { - $lxdebug->enter_sub(); - - $form->{title} = "Add"; - - $form->{callback} = - "$form->{script}?action=add_payment&path=$form->{path}&login=$form->{login}&password=$form->{password}" - unless $form->{callback}; - - &payment_header; - &form_footer; - - $lxdebug->leave_sub(); -} - -sub edit_payment { - $lxdebug->enter_sub(); - - $form->{title} = "Edit"; - - AM->get_payment(\%myconfig, \%$form); - - &payment_header; - - $form->{orphaned} = 1; - &form_footer; - - $lxdebug->leave_sub(); -} - -sub list_payment { - $lxdebug->enter_sub(); - - AM->payment(\%myconfig, \%$form); - - $form->{callback} = - "$form->{script}?action=list_payment&path=$form->{path}&login=$form->{login}&password=$form->{password}"; - - $callback = $form->escape($form->{callback}); - - $form->{title} = $locale->text('Payment Terms'); - - @column_index = qw(description description_long terms_netto terms_skonto percent_skonto); - - $column_header{description} = - qq|| - . $locale->text('Description') - . qq||; - $column_header{description_long} = - qq|| - . $locale->text('Long Description') - . qq||; - $column_header{terms_netto} = - qq|| - . $locale->text('Netto Terms') - . qq||; - $column_header{terms_skonto} = - qq|| - . $locale->text('Skonto Terms') - . qq||; - $column_header{percent_skonto} = - qq|| - . $locale->text('Skonto') - . qq| %|; - - $form->header; - - print qq| - - - - - - - - - - - - - -
$form->{title}
- - -|; - - map { print "$column_header{$_}\n" } @column_index; - - print qq| - -|; - - foreach $ref (@{ $form->{ALL} }) { - - $i++; - $i %= 2; - - print qq| - -|; - - - $column_data{description} = - qq||; - $column_data{description_long} = qq||; - $column_data{terms_netto} = - qq||; - $column_data{terms_skonto} = - qq||; - $column_data{percent_skonto} = - qq||; - map { print "$column_data{$_}\n" } @column_index; - - print qq| - -|; - } - - print qq| -
{script}?action=edit_payment&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description}$ref->{description_long}$ref->{terms_netto}$ref->{terms_skonto}$ref->{percent_skonto} %
-

- -
-{script}> - - - - - -{path}> -{login}> -{password}> - -|; - - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - - print qq| - -
- - - -|; - - $lxdebug->leave_sub(); -} - -sub payment_header { - $lxdebug->enter_sub(); - - $form->{title} = $locale->text("$form->{title} Payment Terms"); - - # $locale->text('Add Payment Terms') - # $locale->text('Edit Payment Terms') - - $form->{description} =~ s/\"/"/g; - - - - $form->header; - - print qq| - - -
{script}> - -{id}> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$form->{title}
| . $locale->text('Description') . qq|
| . $locale->text('Ranking') . qq|
| . $locale->text('Long Description') . qq|
| . $locale->text('Netto Terms') . qq|
| . $locale->text('Skonto Terms') . qq|
| . $locale->text('Skonto') . qq| %

-|; - - $lxdebug->leave_sub(); -} - -sub save_payment { - $lxdebug->enter_sub(); - - $form->isblank("description", $locale->text('Language missing!')); - AM->save_payment(\%myconfig, \%$form); - $form->redirect($locale->text('Payment Terms saved!')); - - $lxdebug->leave_sub(); -} - -sub delete_payment { - $lxdebug->enter_sub(); - - AM->delete_payment(\%myconfig, \%$form); - $form->redirect($locale->text('Payment terms deleted!')); - - $lxdebug->leave_sub(); -} - -sub add_sic { - $lxdebug->enter_sub(); - - $form->{title} = "Add"; - - $form->{callback} = - "$form->{script}?action=add_sic&path=$form->{path}&login=$form->{login}&password=$form->{password}" - unless $form->{callback}; - - &sic_header; - &form_footer; - - $lxdebug->leave_sub(); -} - -sub edit_sic { - $lxdebug->enter_sub(); - - $form->{title} = "Edit"; - - AM->get_sic(\%myconfig, \%$form); - - &sic_header; - - $form->{orphaned} = 1; - &form_footer; - - $lxdebug->leave_sub(); -} - -sub list_sic { - $lxdebug->enter_sub(); - - AM->sic(\%myconfig, \%$form); - - $form->{callback} = - "$form->{script}?action=list_sic&path=$form->{path}&login=$form->{login}&password=$form->{password}"; - - $callback = $form->escape($form->{callback}); - - $form->{title} = $locale->text('Standard Industrial Codes'); - - @column_index = qw(code description); - - $column_header{code} = - qq|| . $locale->text('Code') . qq||; - $column_header{description} = - qq|| . $locale->text('Description') . qq||; - - $form->header; - - print qq| - - - - - - - - - - - - - -
$form->{title}
- - -|; - - map { print "$column_header{$_}\n" } @column_index; - - print qq| - -|; - - foreach $ref (@{ $form->{ALL} }) { - - $i++; - $i %= 2; - - if ($ref->{sictype} eq 'H') { - print qq| - -|; - $column_data{code} = - qq||; - $column_data{description} = qq||; - - } else { - print qq| - -|; - - $column_data{code} = - qq||; - $column_data{description} = qq||; - - } - - map { print "$column_data{$_}\n" } @column_index; - - print qq| - -|; - } - - print qq| -
{script}?action=edit_sic&code=$ref->{code}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{code}$ref->{description}
{script}?action=edit_sic&code=$ref->{code}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{code}$ref->{description}
-

- -
-{script}> - - - - - -{path}> -{login}> -{password}> - -|; - - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - - print qq| -
- - - -|; - - $lxdebug->leave_sub(); -} - -sub sic_header { - $lxdebug->enter_sub(); - - $form->{title} = $locale->text("$form->{title} SIC"); - - # $locale->text('Add SIC') - # $locale->text('Edit SIC') - - $form->{code} =~ s/\"/"/g; - $form->{description} =~ s/\"/"/g; - - $checked = ($form->{sictype} eq 'H') ? "checked" : ""; - - $form->header; +sub save_warehouse { + $main::lxdebug->enter_sub(); - print qq| - - -
{script}> - - -{code}> - - - - - - - - - - - - - - - - - - - - -
$form->{title}
| . $locale->text('Code') . qq|{code}>
| - . $locale->text('Heading') . qq|
| . $locale->text('Description') . qq|

-|; - - $lxdebug->leave_sub(); -} + my $form = $main::form; + my %myconfig = %main::myconfig; + my $locale = $main::locale; -sub save_sic { - $lxdebug->enter_sub(); + $main::auth->assert('config'); - $form->isblank("code", $locale->text('Code missing!')); $form->isblank("description", $locale->text('Description missing!')); - AM->save_sic(\%myconfig, \%$form); - $form->redirect($locale->text('SIC saved!')); - - $lxdebug->leave_sub(); -} - -sub delete_sic { - $lxdebug->enter_sub(); - AM->delete_sic(\%myconfig, \%$form); - $form->redirect($locale->text('SIC deleted!')); + $form->{number_of_new_bins} = $form->parse_amount(\%myconfig, $form->{number_of_new_bins}); - $lxdebug->leave_sub(); -} + AM->save_warehouse(\%myconfig, $form); -sub display_stylesheet { - $lxdebug->enter_sub(); + $form->{callback} .= '&saved_message=' . E($locale->text('Warehouse saved.')) if ($form->{callback}); - $form->{file} = "css/$myconfig{stylesheet}"; - &display_form; + $form->redirect($locale->text('Warehouse saved.')); - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } -sub display_form { - $lxdebug->enter_sub(); - - $form->{file} =~ s/^(.:)*?\/|\.\.\///g; - $form->{file} =~ s/^\/*//g; - $form->{file} =~ s/$userspath//; - - $form->error("$!: $form->{file}") unless -f $form->{file}; - - AM->load_template(\%$form); - - $form->{title} = $form->{file}; - - # if it is anything but html - if ($form->{file} !~ /\.html$/) { - $form->{body} = "
\n$form->{body}\n
"; - } - - $form->header; - - print qq| - - -$form->{body} - -{script}> +sub delete_warehouse { + $main::lxdebug->enter_sub(); -{file}> - + my $form = $main::form; + my %myconfig = %main::myconfig; + my $locale = $main::locale; -{path}> -{login}> -{password}> + $main::auth->assert('config'); -|; + if (AM->delete_warehouse(\%myconfig, $form)) { + $form->{callback} .= '&saved_message=' . E($locale->text('Warehouse deleted.')) if ($form->{callback}); + $form->redirect($locale->text('Warehouse deleted.')); - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; + } else { + $form->error($locale->text('The warehouse could not be deleted because it has already been used.')); } - print qq| -
- - - -|; - - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } -sub edit_template { - $lxdebug->enter_sub(); - - AM->load_template(\%$form); - - $form->{title} = $locale->text('Edit Template'); - - # convert   to &nbsp; - $form->{body} =~ s/ /&nbsp;/gi; - - $form->header; - - print qq| - - -
{script}> - -{file}> - - -{path}> -{login}> -{password}> - - - - - -
-|; - - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - - print q| -
+sub save_bin { + $main::lxdebug->enter_sub(); + my $form = $main::form; + my %myconfig = %main::myconfig; + my $locale = $main::locale; - - -|; + $main::auth->assert('config'); - $lxdebug->leave_sub(); -} + AM->save_bins(\%myconfig, $form); -sub save_template { - $lxdebug->enter_sub(); + $form->{callback} .= '&saved_message=' . E($locale->text('Bins saved.')) if ($form->{callback}); - AM->save_template(\%$form); - $form->redirect($locale->text('Template saved!')); + $form->redirect($locale->text('Bins saved.')); - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } -sub config { - $lxdebug->enter_sub(); - - # get defaults for account numbers and last numbers - AM->defaultaccounts(\%myconfig, \%$form); - - foreach $item (qw(mm-dd-yy mm/dd/yy dd-mm-yy dd/mm/yy dd.mm.yy yyyy-mm-dd)) { - $dateformat .= - ($item eq $myconfig{dateformat}) - ? "