X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fam.pl;h=d8eb1a2177a1a112cdddeb492ae960ac67e4d187;hb=84da0ba2f48ac09652557a5aca1a912b06fb0b0b;hp=306cf65259c66c8cff754cc3d9580a4f78db0595;hpb=9ecdc996e7a73cede3cb8fd0e5617154f0c95367;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 306cf6525..d8eb1a217 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -40,6 +40,10 @@ use Data::Dumper; 1; + + +require "$form->{path}/common.pl"; + # end of main sub add { &{"add_$form->{type}"} } @@ -92,14 +96,13 @@ sub account_header { $form->{description} =~ s/\"/"/g; if (@{ $form->{TAXKEY} }) { - $form->{selecttaxkey} = "Keine Steuer 0%\n"; foreach $item (@{ $form->{TAXKEY} }) { - if ($item->{taxkey} == $form->{taxkey_id}) { + if ($item->{tax} == $form->{tax}) { $form->{selecttaxkey} .= - "{taxkey} selected>$item->{taxdescription}\n"; + "{tax} selected>$item->{taxdescription}\n"; } else { $form->{selecttaxkey} .= - "{taxkey}>$item->{taxdescription}\n"; + "{tax}>$item->{taxdescription}\n"; } } @@ -108,8 +111,9 @@ sub account_header { $taxkey = qq| | . $locale->text('Steuersatz') . qq| - $form->{selecttaxkey} - + $form->{selecttaxkey} + | . $locale->text('Gültig ab') . qq| + |; if (@{ $form->{NEWACCOUNT} }) { @@ -173,10 +177,14 @@ sub account_header { 76 => $locale->text('UStVA-Nr. 76'), 77 => $locale->text('UStVA-Nr. 77'), 80 => $locale->text('UStVA-Nr. 80'), + 81 => $locale->text('UStVA-Nr. 81 left'), + 811 => $locale->text('UStVA-Nr. 81 right'), 84 => $locale->text('UStVA-Nr. 84'), 85 => $locale->text('UStVA-Nr. 85'), 86 => $locale->text('UStVA-Nr. 86 left'), 861 => $locale->text('UStVA-Nr. 86 right'), + 89 => $locale->text('UStVA-Nr. 89 left'), + 891 => $locale->text('UStVA-Nr. 89 right'), 91 => $locale->text('UStVA-Nr. 91'), 93 => $locale->text('UStVA-Nr. 93 left'), 931 => $locale->text('UStVA-Nr. 93 right'), @@ -362,7 +370,9 @@ sub account_header { | . $locale->text('Revenue') . qq|\n | - . $locale->text('Expense') . qq| + . $locale->text('Expense') . qq| + | + . $locale->text('Costs') . qq| | @@ -490,11 +500,6 @@ sub form_footer { . $locale->text('Delete') . qq|">|; } - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - print qq| @@ -529,36 +534,7 @@ sub list_account { $callback = "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}"; - @column_index = qw(accno gifi_accno description debit credit link); - - $column_header{accno} = qq|| . $locale->text('Account') . qq||; - $column_header{gifi_accno} = - qq|| . $locale->text('GIFI') . qq||; - $column_header{description} = - qq|| . $locale->text('Description') . qq||; - $column_header{debit} = qq|| . $locale->text('Debit') . qq||; - $column_header{credit} = qq|| . $locale->text('Credit') . qq||; - $column_header{link} = qq|| . $locale->text('Link') . qq||; - $form->header; - $colspan = $#column_index + 1; - - print qq| - - - - - $form->{title} - - - -|; - - map { print "$column_header{$_}\n" } @column_index; - - print qq| - -|; # escape callback $callback = $form->escape($callback); @@ -577,50 +553,66 @@ sub list_account { $form->format_amount(\%myconfig, -$ca->{amount}, 2, " "); } - $ca->{link} =~ s/://og; - - if ($ca->{charttype} eq "H") { - print qq||; - - $column_data{accno} = - qq|{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}|; - $column_data{gifi_accno} = - qq|{script}?action=edit_gifi&accno=$ca->{gifi_accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{gifi_accno} |; - $column_data{description} = qq|$ca->{description} |; - $column_data{debit} = qq| |; - $column_data{credit} = qq| |; - $column_data{link} = qq| |; - - } else { - $i++; - $i %= 2; - print qq| -|; - $column_data{accno} = - qq|{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}|; - $column_data{gifi_accno} = - qq|{script}?action=edit_gifi&accno=$ca->{gifi_accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{gifi_accno} |; - $column_data{description} = qq|$ca->{description} |; - $column_data{debit} = qq|$ca->{debit}|; - $column_data{credit} = qq|$ca->{credit}|; - $column_data{link} = qq|$ca->{link} |; - + my @links = split( q{:}, $ca->{link}); + + $ca->{link} = q{}; + + foreach my $link (@links){ + $link = ( $link eq 'AR') ? $locale->text('Account Link AR') + : ( $link eq 'AP') ? $locale->text('Account Link AP') + : ( $link eq 'IC') ? $locale->text('Account Link IC') + : ( $link eq 'AR_amount' ) ? $locale->text('Account Link AR_amount') + : ( $link eq 'AR_paid' ) ? $locale->text('Account Link AR_paid') + : ( $link eq 'AR_tax' ) ? $locale->text('Account Link AR_tax') + : ( $link eq 'AP_amount' ) ? $locale->text('Account Link AP_amount') + : ( $link eq 'AP_paid' ) ? $locale->text('Account Link AP_paid') + : ( $link eq 'AP_tax' ) ? $locale->text('Account Link AP_tax') + : ( $link eq 'IC_sale' ) ? $locale->text('Account Link IC_sale') + : ( $link eq 'IC_cogs' ) ? $locale->text('Account Link IC_cogs') + : ( $link eq 'IC_taxpart' ) ? $locale->text('Account Link IC_taxpart') + : ( $link eq 'IC_income' ) ? $locale->text('Account Link IC_income') + : ( $link eq 'IC_expense' ) ? $locale->text('Account Link IC_expense') + : ( $link eq 'IC_taxservice' ) ? $locale->text('Account Link IC_taxservice') + : ( $link eq 'CT_tax' ) ? $locale->text('Account Link CT_tax') + : $locale->text('Unknown Link') . ': ' . $link; + + $ca->{link} .= qq|[| . $link . qq|] |; } - - map { print "$column_data{$_}\n" } @column_index; - - print "\n"; + + $ca->{startdate} =~ s/,//og; + $ca->{tk_ustva} =~ s/,//og; + $ca->{taxkey} =~ s/,//og; + $ca->{taxaccount} =~ s/,//og; + $ca->{taxdescription} =~ s/,//og; + $ca->{datevautomatik} = ($ca->{datevautomatik}) ? $locale->text('On'):q{}; + + $ca->{category} = ($ca->{category} eq 'A') ? $locale->text('Account Category A') + : ($ca->{category} eq 'E') ? $locale->text('Account Category E') + : ($ca->{category} eq 'L') ? $locale->text('Account Category L') + : ($ca->{category} eq 'I') ? $locale->text('Account Category I') + : ($ca->{category} eq 'Q') ? $locale->text('Account Category Q') + : ($ca->{category} eq 'C') ? $locale->text('Account Category C') + : ($ca->{category} eq 'G') ? $locale->text('Account Category G') + : $locale->text('Unknown Category') . ': ' . $ca->{category}; + + $ca->{link_edit_account} = + qq|$form->{script}?action=edit_account&id=$ca->{id}| + .qq|&path=$form->{path}&login=$form->{login}| + .qq|&password=$form->{password}&callback=$callback|; } - - print qq| - - - - -